Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
e44d7919
提交
e44d7919
authored
4月 15, 2010
作者:
Mathieu Parent
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Skinny: Handle backspace
上级
7074b076
显示空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
28 行增加
和
2 行删除
+28
-2
skinny_protocol.c
src/mod/endpoints/mod_skinny/skinny_protocol.c
+15
-1
skinny_protocol.h
src/mod/endpoints/mod_skinny/skinny_protocol.h
+11
-0
skinny_tables.c
src/mod/endpoints/mod_skinny/skinny_tables.c
+1
-0
skinny_tables.h
src/mod/endpoints/mod_skinny/skinny_tables.h
+1
-1
没有找到文件。
src/mod/endpoints/mod_skinny/skinny_protocol.c
浏览文件 @
e44d7919
...
...
@@ -606,6 +606,7 @@ switch_status_t skinny_session_process_dest(switch_core_session_t *session, list
if
(
!
dest
)
{
if
(
backspace
)
{
/* backspace */
*
tech_pvt
->
caller_profile
->
destination_number
++
=
'\0'
;
send_back_space_request
(
listener
,
line_instance
,
tech_pvt
->
call_id
);
}
if
(
append_dest
!=
'\0'
&&
!
backspace
)
{
/* append digit */
tech_pvt
->
caller_profile
->
destination_number
=
switch_core_sprintf
(
tech_pvt
->
caller_profile
->
pool
,
...
...
@@ -615,7 +616,6 @@ switch_status_t skinny_session_process_dest(switch_core_session_t *session, list
send_start_tone
(
listener
,
SKINNY_TONE_DIALTONE
,
0
,
line_instance
,
tech_pvt
->
call_id
);
if
(
backspace
)
{
send_select_soft_keys
(
listener
,
line_instance
,
tech_pvt
->
call_id
,
SKINNY_KEY_SET_OFF_HOOK
,
0xffff
);
/* TODO: How to clear the screen? */
}
}
else
if
(
strlen
(
tech_pvt
->
caller_profile
->
destination_number
)
==
1
)
{
/* first digit */
send_stop_tone
(
listener
,
line_instance
,
tech_pvt
->
call_id
);
...
...
@@ -1476,6 +1476,20 @@ switch_status_t send_activate_call_plane(listener_t *listener,
return
skinny_send_reply
(
listener
,
message
);
}
switch_status_t
send_back_space_request
(
listener_t
*
listener
,
uint32_t
line_instance
,
uint32_t
call_id
)
{
skinny_message_t
*
message
;
message
=
switch_core_alloc
(
listener
->
pool
,
12
+
sizeof
(
message
->
data
.
back_space_req
));
message
->
type
=
BACK_SPACE_REQ_MESSAGE
;
message
->
length
=
4
+
sizeof
(
message
->
data
.
back_space_req
);
message
->
data
.
back_space_req
.
line_instance
=
line_instance
;
message
->
data
.
back_space_req
.
call_id
=
call_id
;
return
skinny_send_reply
(
listener
,
message
);
}
switch_status_t
send_dialed_number
(
listener_t
*
listener
,
char
called_party
[
24
],
uint32_t
line_instance
,
...
...
src/mod/endpoints/mod_skinny/skinny_protocol.h
浏览文件 @
e44d7919
...
...
@@ -457,6 +457,13 @@ struct unregister_ack_message {
uint32_t
unregister_status
;
};
/* BackSpaceReqMessage */
#define BACK_SPACE_REQ_MESSAGE 0x0119
struct
back_space_req_message
{
uint32_t
line_instance
;
uint32_t
call_id
;
};
/* DialedNumberMessage */
#define DIALED_NUMBER_MESSAGE 0x011D
struct
dialed_number_message
{
...
...
@@ -540,6 +547,7 @@ union skinny_data {
struct
clear_prompt_status_message
clear_prompt_status
;
struct
activate_call_plane_message
activate_call_plane
;
struct
unregister_ack_message
unregister_ack
;
struct
back_space_req_message
back_space_req
;
struct
dialed_number_message
dialed_number
;
struct
feature_stat_res_message
feature_res
;
struct
display_pri_notify_message
display_pri_notify
;
...
...
@@ -748,6 +756,9 @@ switch_status_t send_clear_prompt_status(listener_t *listener,
uint32_t
call_id
);
switch_status_t
send_activate_call_plane
(
listener_t
*
listener
,
uint32_t
line_instance
);
switch_status_t
send_back_space_request
(
listener_t
*
listener
,
uint32_t
line_instance
,
uint32_t
call_id
);
switch_status_t
send_dialed_number
(
listener_t
*
listener
,
char
called_party
[
24
],
uint32_t
line_instance
,
...
...
src/mod/endpoints/mod_skinny/skinny_tables.c
浏览文件 @
e44d7919
...
...
@@ -86,6 +86,7 @@ struct skinny_table SKINNY_MESSAGE_TYPES[] = {
{
"ClearPromptStatusMessage"
,
CLEAR_PROMPT_STATUS_MESSAGE
},
{
"ActivateCallPlaneMessage"
,
ACTIVATE_CALL_PLANE_MESSAGE
},
{
"UnregisterAckMessage"
,
UNREGISTER_ACK_MESSAGE
},
{
"BackSpaceReqMessage"
,
BACK_SPACE_REQ_MESSAGE
},
{
"DialedNumberMessage"
,
DIALED_NUMBER_MESSAGE
},
{
"FeatureResMessage"
,
FEATURE_STAT_RES_MESSAGE
},
{
"DisplayPriNotifyMessage"
,
DISPLAY_PRI_NOTIFY_MESSAGE
},
...
...
src/mod/endpoints/mod_skinny/skinny_tables.h
浏览文件 @
e44d7919
...
...
@@ -84,7 +84,7 @@ uint32_t func(const char *str)\
}
struct
skinny_table
SKINNY_MESSAGE_TYPES
[
5
6
];
struct
skinny_table
SKINNY_MESSAGE_TYPES
[
5
7
];
const
char
*
skinny_message_type2str
(
uint32_t
id
);
uint32_t
skinny_str2message_type
(
const
char
*
str
);
#define SKINNY_PUSH_MESSAGE_TYPES SKINNY_DECLARE_PUSH_MATCH(SKINNY_MESSAGE_TYPES)
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论