Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
ce88d572
提交
ce88d572
authored
8月 29, 2012
作者:
Anthony Minessale
提交者:
Ken Rice
9月 11, 2012
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add uuid_answer and uuid_pre_answer
上级
8672cf08
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
38 行增加
和
0 行删除
+38
-0
mod_commands.c
src/mod/applications/mod_commands/mod_commands.c
+38
-0
没有找到文件。
src/mod/applications/mod_commands/mod_commands.c
浏览文件 @
ce88d572
...
...
@@ -2738,6 +2738,40 @@ SWITCH_STANDARD_API(uuid_media_function)
return
SWITCH_STATUS_SUCCESS
;
}
SWITCH_STANDARD_API
(
uuid_pre_answer_function
)
{
char
*
uuid
=
(
char
*
)
cmd
;
switch_core_session_t
*
xsession
;
if
(
uuid
&&
(
xsession
=
switch_core_session_locate
(
uuid
)))
{
switch_channel_t
*
channel
=
switch_core_session_get_channel
(
xsession
);
switch_channel_pre_answer
(
channel
);
switch_core_session_rwunlock
(
session
);
}
else
{
stream
->
write_function
(
stream
,
"-ERROR
\n
"
);
}
return
SWITCH_STATUS_SUCCESS
;
}
SWITCH_STANDARD_API
(
uuid_answer_function
)
{
char
*
uuid
=
(
char
*
)
cmd
;
switch_core_session_t
*
xsession
;
if
(
uuid
&&
(
xsession
=
switch_core_session_locate
(
uuid
)))
{
switch_channel_t
*
channel
=
switch_core_session_get_channel
(
xsession
);
switch_channel_answer
(
channel
);
switch_core_session_rwunlock
(
session
);
}
else
{
stream
->
write_function
(
stream
,
"-ERROR
\n
"
);
}
return
SWITCH_STATUS_SUCCESS
;
}
#define BROADCAST_SYNTAX "<uuid> <path> [aleg|bleg|holdb|both]"
SWITCH_STANDARD_API
(
uuid_broadcast_function
)
{
...
...
@@ -5570,6 +5604,7 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_commands_load)
SWITCH_ADD_API
(
commands_api_interface
,
"url_encode"
,
"url encode a string"
,
url_encode_function
,
"<string>"
);
SWITCH_ADD_API
(
commands_api_interface
,
"user_data"
,
"find user data"
,
user_data_function
,
"<user>@<domain> [var|param|attr] <name>"
);
SWITCH_ADD_API
(
commands_api_interface
,
"user_exists"
,
"find a user"
,
user_exists_function
,
"<key> <user> <domain>"
);
SWITCH_ADD_API
(
commands_api_interface
,
"uuid_answer"
,
"answer"
,
uuid_answer_function
,
"<uuid>"
);
SWITCH_ADD_API
(
commands_api_interface
,
"uuid_audio"
,
"uuid_audio"
,
session_audio_function
,
AUDIO_SYNTAX
);
SWITCH_ADD_API
(
commands_api_interface
,
"uuid_break"
,
"Break"
,
break_function
,
BREAK_SYNTAX
);
SWITCH_ADD_API
(
commands_api_interface
,
"uuid_bridge"
,
"uuid_bridge"
,
uuid_bridge_function
,
""
);
...
...
@@ -5596,6 +5631,7 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_commands_load)
SWITCH_ADD_API
(
commands_api_interface
,
"uuid_media"
,
"media"
,
uuid_media_function
,
MEDIA_SYNTAX
);
SWITCH_ADD_API
(
commands_api_interface
,
"uuid_park"
,
"Park Channel"
,
park_function
,
PARK_SYNTAX
);
SWITCH_ADD_API
(
commands_api_interface
,
"uuid_phone_event"
,
"Send and event to the phone"
,
uuid_phone_event_function
,
PHONE_EVENT_SYNTAX
);
SWITCH_ADD_API
(
commands_api_interface
,
"uuid_pre_answer"
,
"pre_answer"
,
uuid_pre_answer_function
,
"<uuid>"
);
SWITCH_ADD_API
(
commands_api_interface
,
"uuid_preprocess"
,
"Pre-process Channel"
,
preprocess_function
,
PREPROCESS_SYNTAX
);
SWITCH_ADD_API
(
commands_api_interface
,
"uuid_record"
,
"session record"
,
session_record_function
,
SESS_REC_SYNTAX
);
SWITCH_ADD_API
(
commands_api_interface
,
"uuid_recovery_refresh"
,
"Send a recovery_refresh"
,
uuid_recovery_refresh
,
UUID_RECOVERY_REFRESH_SYNTAX
);
...
...
@@ -5719,6 +5755,8 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_commands_load)
switch_console_set_complete
(
"add uuid_displace ::console::list_uuid"
);
switch_console_set_complete
(
"add uuid_display ::console::list_uuid"
);
switch_console_set_complete
(
"add uuid_dump ::console::list_uuid"
);
switch_console_set_complete
(
"add uuid_answer ::console::list_uuid"
);
switch_console_set_complete
(
"add uuid_pre_answer ::console::list_uuid"
);
switch_console_set_complete
(
"add uuid_exists ::console::list_uuid"
);
switch_console_set_complete
(
"add uuid_fileman ::console::list_uuid"
);
switch_console_set_complete
(
"add uuid_flush_dtmf ::console::list_uuid"
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论