Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
a1952b86
提交
a1952b86
authored
4月 09, 2010
作者:
Mathieu Parent
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Skinny: implement hold/resume
Also rework a bit softkey sets
上级
7e3c29c6
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
69 行增加
和
17 行删除
+69
-17
mod_skinny.c
src/mod/endpoints/mod_skinny/mod_skinny.c
+1
-10
skinny_protocol.c
src/mod/endpoints/mod_skinny/skinny_protocol.c
+67
-7
skinny_protocol.h
src/mod/endpoints/mod_skinny/skinny_protocol.h
+1
-0
没有找到文件。
src/mod/endpoints/mod_skinny/mod_skinny.c
浏览文件 @
a1952b86
...
...
@@ -642,16 +642,7 @@ int channel_on_hangup_callback(void *pArg, int argc, char **argv, char **columnN
send_set_lamp
(
listener
,
SKINNY_BUTTON_LINE
,
line_instance
,
SKINNY_LAMP_OFF
);
send_clear_prompt_status
(
listener
,
line_instance
,
call_id
);
if
(
call_state
==
SKINNY_CONNECTED
)
{
/* calling parties */
send_close_receive_channel
(
listener
,
call_id
,
/* uint32_t conference_id, */
helper
->
tech_pvt
->
party_id
,
/* uint32_t pass_thru_party_id, */
call_id
/* uint32_t conference_id2, */
);
send_stop_media_transmission
(
listener
,
call_id
,
/* uint32_t conference_id, */
helper
->
tech_pvt
->
party_id
,
/* uint32_t pass_thru_party_id, */
call_id
/* uint32_t conference_id2, */
);
skinny_session_stop_media
(
helper
->
tech_pvt
->
session
,
listener
,
line_instance
);
}
skinny_line_set_state
(
listener
,
line_instance
,
call_id
,
SKINNY_ON_HOOK
);
...
...
src/mod/endpoints/mod_skinny/skinny_protocol.c
浏览文件 @
a1952b86
...
...
@@ -784,17 +784,66 @@ switch_status_t skinny_session_hold_line(switch_core_session_t *session, listene
channel
=
switch_core_session_get_channel
(
session
);
tech_pvt
=
switch_core_session_get_private
(
session
);
/* TODO */
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_WARNING
,
"Hold is not implemented yet. Hanging up the line.
\n
"
);
switch_channel_hangup
(
channel
,
SWITCH_CAUSE_NORMAL_CLEARING
);
skinny_session_stop_media
(
session
,
listener
,
line_instance
);
switch_ivr_hold
(
session
,
NULL
,
1
);
send_define_current_time_date
(
listener
);
send_set_lamp
(
listener
,
SKINNY_BUTTON_LINE
,
line_instance
,
SKINNY_LAMP_WINK
);
skinny_line_set_state
(
listener
,
line_instance
,
tech_pvt
->
call_id
,
SKINNY_HOLD
);
send_select_soft_keys
(
listener
,
line_instance
,
tech_pvt
->
call_id
,
SKINNY_KEY_SET_ON_HOLD
,
0xffff
);
send_display_prompt_status
(
listener
,
0
,
"
\200\003
"
,
line_instance
,
tech_pvt
->
call_id
);
skinny_send_call_info
(
tech_pvt
->
session
,
listener
,
line_instance
);
send_set_speaker_mode
(
listener
,
SKINNY_SPEAKER_OFF
);
send_set_ringer
(
listener
,
SKINNY_RING_OFF
,
SKINNY_RING_FOREVER
,
0
,
tech_pvt
->
call_id
);
return
SWITCH_STATUS_SUCCESS
;
}
switch_status_t
skinny_session_unhold_line
(
switch_core_session_t
*
session
,
listener_t
*
listener
,
uint32_t
line_instance
)
{
/* TODO */
switch_channel_t
*
channel
=
NULL
;
private_t
*
tech_pvt
=
NULL
;
switch_assert
(
session
);
switch_assert
(
listener
);
switch_assert
(
listener
->
profile
);
channel
=
switch_core_session_get_channel
(
session
);
tech_pvt
=
switch_core_session_get_private
(
session
);
send_set_ringer
(
listener
,
SKINNY_RING_OFF
,
SKINNY_RING_FOREVER
,
0
,
tech_pvt
->
call_id
);
send_set_speaker_mode
(
listener
,
SKINNY_SPEAKER_ON
);
send_select_soft_keys
(
listener
,
line_instance
,
tech_pvt
->
call_id
,
SKINNY_KEY_SET_RING_OUT
,
0xffff
);
skinny_session_start_media
(
session
,
listener
,
line_instance
);
switch_ivr_unhold
(
session
);
send_set_lamp
(
listener
,
SKINNY_BUTTON_LINE
,
line_instance
,
SKINNY_LAMP_ON
);
return
SWITCH_STATUS_SUCCESS
;
}
switch_status_t
skinny_session_stop_media
(
switch_core_session_t
*
session
,
listener_t
*
listener
,
uint32_t
line_instance
)
{
switch_channel_t
*
channel
=
NULL
;
private_t
*
tech_pvt
=
NULL
;
switch_assert
(
session
);
switch_assert
(
listener
);
switch_assert
(
listener
->
profile
);
channel
=
switch_core_session_get_channel
(
session
);
tech_pvt
=
switch_core_session_get_private
(
session
);
send_close_receive_channel
(
listener
,
tech_pvt
->
call_id
,
/* uint32_t conference_id, */
tech_pvt
->
party_id
,
/* uint32_t pass_thru_party_id, */
tech_pvt
->
call_id
/* uint32_t conference_id2, */
);
send_stop_media_transmission
(
listener
,
tech_pvt
->
call_id
,
/* uint32_t conference_id, */
tech_pvt
->
party_id
,
/* uint32_t pass_thru_party_id, */
tech_pvt
->
call_id
/* uint32_t conference_id2, */
);
return
SWITCH_STATUS_SUCCESS
;
}
...
...
@@ -1840,10 +1889,21 @@ switch_status_t skinny_handle_soft_key_set_request(listener_t *listener, skinny_
message
->
data
.
soft_key_set
.
total_soft_key_set_count
=
11
;
/* TODO fill the set */
message
->
data
.
soft_key_set
.
soft_key_set
[
SKINNY_KEY_SET_ON_HOOK
].
soft_key_template_index
[
0
]
=
SOFTKEY_REDIAL
;
message
->
data
.
soft_key_set
.
soft_key_set
[
SKINNY_KEY_SET_ON_HOOK
].
soft_key_template_index
[
1
]
=
SOFTKEY_NEWCALL
;
message
->
data
.
soft_key_set
.
soft_key_set
[
SKINNY_KEY_SET_ON_HOOK
].
soft_key_template_index
[
0
]
=
SOFTKEY_NEWCALL
;
message
->
data
.
soft_key_set
.
soft_key_set
[
SKINNY_KEY_SET_ON_HOOK
].
soft_key_template_index
[
1
]
=
SOFTKEY_REDIAL
;
message
->
data
.
soft_key_set
.
soft_key_set
[
SKINNY_KEY_SET_OFF_HOOK
].
soft_key_template_index
[
0
]
=
SOFTKEY_BACKSPACE
;
message
->
data
.
soft_key_set
.
soft_key_set
[
SKINNY_KEY_SET_OFF_HOOK
].
soft_key_template_index
[
1
]
=
SOFTKEY_REDIAL
;
message
->
data
.
soft_key_set
.
soft_key_set
[
SKINNY_KEY_SET_CONNECTED
].
soft_key_template_index
[
0
]
=
SOFTKEY_ENDCALL
;
message
->
data
.
soft_key_set
.
soft_key_set
[
SKINNY_KEY_SET_CONNECTED
].
soft_key_template_index
[
1
]
=
SOFTKEY_HOLD
;
message
->
data
.
soft_key_set
.
soft_key_set
[
SKINNY_KEY_SET_RING_IN
].
soft_key_template_index
[
0
]
=
SOFTKEY_ENDCALL
;
message
->
data
.
soft_key_set
.
soft_key_set
[
SKINNY_KEY_SET_RING_IN
].
soft_key_template_index
[
1
]
=
SOFTKEY_ANSWER
;
message
->
data
.
soft_key_set
.
soft_key_set
[
SKINNY_KEY_SET_ON_HOLD
].
soft_key_template_index
[
0
]
=
SOFTKEY_RESUME
;
message
->
data
.
soft_key_set
.
soft_key_set
[
SKINNY_KEY_SET_ON_HOLD
].
soft_key_template_index
[
1
]
=
SOFTKEY_NEWCALL
;
message
->
data
.
soft_key_set
.
soft_key_set
[
SKINNY_KEY_SET_ON_HOLD
].
soft_key_template_index
[
2
]
=
SOFTKEY_ENDCALL
;
skinny_send_reply
(
listener
,
message
);
...
...
src/mod/endpoints/mod_skinny/skinny_protocol.h
浏览文件 @
a1952b86
...
...
@@ -630,6 +630,7 @@ switch_status_t skinny_session_answer(switch_core_session_t *session, listener_t
switch_status_t
skinny_session_start_media
(
switch_core_session_t
*
session
,
listener_t
*
listener
,
uint32_t
line_instance
);
switch_status_t
skinny_session_hold_line
(
switch_core_session_t
*
session
,
listener_t
*
listener
,
uint32_t
line_instance
);
switch_status_t
skinny_session_unhold_line
(
switch_core_session_t
*
session
,
listener_t
*
listener
,
uint32_t
line_instance
);
switch_status_t
skinny_session_stop_media
(
switch_core_session_t
*
session
,
listener_t
*
listener
,
uint32_t
line_instance
);
void
skinny_line_get
(
listener_t
*
listener
,
uint32_t
instance
,
struct
line_stat_res_message
**
button
);
void
skinny_speed_dial_get
(
listener_t
*
listener
,
uint32_t
instance
,
struct
speed_dial_stat_res_message
**
button
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论