Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
33c05ead
提交
33c05ead
authored
4月 16, 2010
作者:
Anthony Minessale
提交者:
Brian West
4月 16, 2010
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add uuid_autoanswer command
上级
c9aabe2c
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
40 行增加
和
0 行删除
+40
-0
switch_types.h
src/include/switch_types.h
+1
-0
mod_commands.c
src/mod/applications/mod_commands/mod_commands.c
+33
-0
mod_sofia.c
src/mod/endpoints/mod_sofia/mod_sofia.c
+5
-0
switch_core_session.c
src/switch_core_session.c
+1
-0
没有找到文件。
src/include/switch_types.h
浏览文件 @
33c05ead
...
@@ -690,6 +690,7 @@ typedef enum {
...
@@ -690,6 +690,7 @@ typedef enum {
SWITCH_MESSAGE_INDICATE_PROXY_MEDIA
,
SWITCH_MESSAGE_INDICATE_PROXY_MEDIA
,
SWITCH_MESSAGE_INDICATE_APPLICATION_EXEC
,
SWITCH_MESSAGE_INDICATE_APPLICATION_EXEC
,
SWITCH_MESSAGE_INDICATE_APPLICATION_EXEC_COMPLETE
,
SWITCH_MESSAGE_INDICATE_APPLICATION_EXEC_COMPLETE
,
SWITCH_MESSAGE_INDICATE_AUTOANSWER
,
SWITCH_MESSAGE_INVALID
SWITCH_MESSAGE_INVALID
}
switch_core_session_message_types_t
;
}
switch_core_session_message_types_t
;
...
...
src/mod/applications/mod_commands/mod_commands.c
浏览文件 @
33c05ead
...
@@ -2347,6 +2347,37 @@ SWITCH_STANDARD_API(uuid_simplify_function)
...
@@ -2347,6 +2347,37 @@ SWITCH_STANDARD_API(uuid_simplify_function)
}
}
#define AUTOANSWER_SYNTAX "<uuid>"
SWITCH_STANDARD_API
(
uuid_autoanswer_function
)
{
switch_status_t
status
=
SWITCH_STATUS_SUCCESS
;
if
(
zstr
(
cmd
))
{
stream
->
write_function
(
stream
,
"-USAGE: %s
\n
"
,
AUTOANSWER_SYNTAX
);
}
else
{
switch_core_session_message_t
msg
=
{
0
};
switch_core_session_t
*
lsession
=
NULL
;
msg
.
message_id
=
SWITCH_MESSAGE_INDICATE_AUTOANSWER
;
msg
.
string_arg
=
cmd
;
msg
.
from
=
__FILE__
;
if
((
lsession
=
switch_core_session_locate
(
cmd
)))
{
status
=
switch_core_session_receive_message
(
lsession
,
&
msg
);
switch_core_session_rwunlock
(
lsession
);
}
}
if
(
status
==
SWITCH_STATUS_SUCCESS
)
{
stream
->
write_function
(
stream
,
"+OK Success
\n
"
);
}
else
{
stream
->
write_function
(
stream
,
"-ERR Operation Failed
\n
"
);
}
return
SWITCH_STATUS_SUCCESS
;
}
#define DEBUG_AUDIO_SYNTAX "<uuid> <read|write|both> <on|off>"
#define DEBUG_AUDIO_SYNTAX "<uuid> <read|write|both> <on|off>"
SWITCH_STANDARD_API
(
uuid_debug_audio_function
)
SWITCH_STANDARD_API
(
uuid_debug_audio_function
)
{
{
...
@@ -4202,6 +4233,7 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_commands_load)
...
@@ -4202,6 +4233,7 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_commands_load)
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_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
,
"user_exists"
,
"find a user"
,
user_exists_function
,
"<key> <user> <domain>"
);
SWITCH_ADD_API
(
commands_api_interface
,
"uuid_audio"
,
"uuid_audio"
,
session_audio_function
,
AUDIO_SYNTAX
);
SWITCH_ADD_API
(
commands_api_interface
,
"uuid_audio"
,
"uuid_audio"
,
session_audio_function
,
AUDIO_SYNTAX
);
SWITCH_ADD_API
(
commands_api_interface
,
"uuid_autoanswer"
,
"Force a ringing channel offhook"
,
uuid_autoanswer_function
,
AUTOANSWER_SYNTAX
);
SWITCH_ADD_API
(
commands_api_interface
,
"uuid_break"
,
"Break"
,
break_function
,
BREAK_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
,
""
);
SWITCH_ADD_API
(
commands_api_interface
,
"uuid_bridge"
,
"uuid_bridge"
,
uuid_bridge_function
,
""
);
SWITCH_ADD_API
(
commands_api_interface
,
"uuid_broadcast"
,
"broadcast"
,
uuid_broadcast_function
,
BROADCAST_SYNTAX
);
SWITCH_ADD_API
(
commands_api_interface
,
"uuid_broadcast"
,
"broadcast"
,
uuid_broadcast_function
,
BROADCAST_SYNTAX
);
...
@@ -4300,6 +4332,7 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_commands_load)
...
@@ -4300,6 +4332,7 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_commands_load)
switch_console_set_complete
(
"add uuid_audio ::console::list_uuid start write mute"
);
switch_console_set_complete
(
"add uuid_audio ::console::list_uuid start write mute"
);
switch_console_set_complete
(
"add uuid_audio ::console::list_uuid start write level"
);
switch_console_set_complete
(
"add uuid_audio ::console::list_uuid start write level"
);
switch_console_set_complete
(
"add uuid_audio ::console::list_uuid stop"
);
switch_console_set_complete
(
"add uuid_audio ::console::list_uuid stop"
);
switch_console_set_complete
(
"add uuid_autoanswer ::console::list_uuid"
);
switch_console_set_complete
(
"add uuid_break ::console::list_uuid all"
);
switch_console_set_complete
(
"add uuid_break ::console::list_uuid all"
);
switch_console_set_complete
(
"add uuid_break ::console::list_uuid both"
);
switch_console_set_complete
(
"add uuid_break ::console::list_uuid both"
);
switch_console_set_complete
(
"add uuid_bridge ::console::list_uuid ::console::list_uuid"
);
switch_console_set_complete
(
"add uuid_bridge ::console::list_uuid ::console::list_uuid"
);
...
...
src/mod/endpoints/mod_sofia/mod_sofia.c
浏览文件 @
33c05ead
...
@@ -1496,6 +1496,11 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi
...
@@ -1496,6 +1496,11 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi
}
}
break
;
break
;
case
SWITCH_MESSAGE_INDICATE_AUTOANSWER
:
{
nua_notify
(
tech_pvt
->
nh
,
NUTAG_NEWSUB
(
1
),
NUTAG_SUBSTATE
(
nua_substate_active
),
SIPTAG_EVENT_STR
(
"talk"
),
TAG_END
());
}
break
;
case
SWITCH_MESSAGE_INDICATE_SIMPLIFY
:
case
SWITCH_MESSAGE_INDICATE_SIMPLIFY
:
{
{
char
*
ref_to
,
*
ref_by
;
char
*
ref_to
,
*
ref_by
;
...
...
src/switch_core_session.c
浏览文件 @
33c05ead
...
@@ -555,6 +555,7 @@ static const char *message_names[] = {
...
@@ -555,6 +555,7 @@ static const char *message_names[] = {
"PROXY_MEDIA"
,
"PROXY_MEDIA"
,
"APPLICATION_EXEC"
,
"APPLICATION_EXEC"
,
"APPLICATION_EXEC_COMPLETE"
,
"APPLICATION_EXEC_COMPLETE"
,
"AUTOANSWER"
,
"INVALID"
"INVALID"
};
};
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论