Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
727f099d
提交
727f099d
authored
1月 07, 2012
作者:
Anthony Minessale
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add continue tag
上级
0dfc0110
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
39 行增加
和
8 行删除
+39
-8
mod_httapi.c
src/mod/applications/mod_httapi/mod_httapi.c
+19
-0
mod_httapi_doc.txt
src/mod/applications/mod_httapi/mod_httapi_doc.txt
+20
-8
没有找到文件。
src/mod/applications/mod_httapi/mod_httapi.c
浏览文件 @
727f099d
...
@@ -259,6 +259,12 @@ static void console_clean_log(const char *level_str, const char *msg)
...
@@ -259,6 +259,12 @@ static void console_clean_log(const char *level_str, const char *msg)
switch_log_printf
(
SWITCH_CHANNEL_LOG_CLEAN
,
level
,
"%s"
,
switch_str_nil
(
msg
));
switch_log_printf
(
SWITCH_CHANNEL_LOG_CLEAN
,
level
,
"%s"
,
switch_str_nil
(
msg
));
}
}
static
switch_status_t
parse_continue
(
const
char
*
tag_name
,
client_t
*
client
,
switch_xml_t
tag
,
const
char
*
body
)
{
return
SWITCH_STATUS_SUCCESS
;
}
static
switch_status_t
parse_log
(
const
char
*
tag_name
,
client_t
*
client
,
switch_xml_t
tag
,
const
char
*
body
)
static
switch_status_t
parse_log
(
const
char
*
tag_name
,
client_t
*
client
,
switch_xml_t
tag
,
const
char
*
body
)
{
{
const
char
*
level
=
switch_xml_attr
(
tag
,
"level"
);
const
char
*
level
=
switch_xml_attr
(
tag
,
"level"
);
...
@@ -920,6 +926,16 @@ static switch_status_t parse_record(const char *tag_name, client_t *client, swit
...
@@ -920,6 +926,16 @@ static switch_status_t parse_record(const char *tag_name, client_t *client, swit
return
status
;
return
status
;
}
}
static
switch_status_t
parse_common
(
const
char
*
tag_name
,
client_t
*
client
,
switch_xml_t
tag
,
const
char
*
body
)
{
const
char
*
action
=
switch_xml_attr
(
tag
,
"action"
);
if
(
action
)
{
switch_event_add_header_string
(
client
->
params
,
SWITCH_STACK_BOTTOM
,
"url"
,
action
);
}
return
SWITCH_STATUS_SUCCESS
;
}
static
switch_status_t
parse_xml
(
client_t
*
client
)
static
switch_status_t
parse_xml
(
client_t
*
client
)
{
{
...
@@ -990,6 +1006,8 @@ static switch_status_t parse_xml(client_t *client)
...
@@ -990,6 +1006,8 @@ static switch_status_t parse_xml(client_t *client)
}
}
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_DEBUG
,
"Process Tag: [%s]
\n
"
,
tag
->
name
);
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_DEBUG
,
"Process Tag: [%s]
\n
"
,
tag
->
name
);
parse_common
(
tag
->
name
,
client
,
tag
,
expanded
);
handler
(
tag
->
name
,
client
,
tag
,
expanded
);
handler
(
tag
->
name
,
client
,
tag
,
expanded
);
if
(
expanded
&&
expanded
!=
tag
->
txt
)
{
if
(
expanded
&&
expanded
!=
tag
->
txt
)
{
...
@@ -2423,6 +2441,7 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_httapi_load)
...
@@ -2423,6 +2441,7 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_httapi_load)
bind_parser
(
"conference"
,
parse_conference
);
bind_parser
(
"conference"
,
parse_conference
);
bind_parser
(
"break"
,
parse_break
);
bind_parser
(
"break"
,
parse_break
);
bind_parser
(
"log"
,
parse_log
);
bind_parser
(
"log"
,
parse_log
);
bind_parser
(
"continue"
,
parse_continue
);
if
(
do_config
()
!=
SWITCH_STATUS_SUCCESS
)
{
if
(
do_config
()
!=
SWITCH_STATUS_SUCCESS
)
{
return
SWITCH_STATUS_FALSE
;
return
SWITCH_STATUS_FALSE
;
...
...
src/mod/applications/mod_httapi/mod_httapi_doc.txt
浏览文件 @
727f099d
...
@@ -150,25 +150,28 @@ gender : gender (fs param)
...
@@ -150,25 +150,28 @@ gender : gender (fs param)
<execute application>*DATA*</execute>
<execute application
data action
>*DATA*</execute>
: Execute a FreeSWITCH app.
: Execute a FreeSWITCH app.
ATTRS:
ATTRS:
application : The app to run
application : The app to run
action : Change url to submit to
data : Alternate source for app data
*DATA* : The app data
*DATA* : The app data
<sms to>DATA</sms>
<sms to
action
>DATA</sms>
: Send a SMS message.
: Send a SMS message.
ATTRS:
ATTRS:
to : The dest number
to : The dest number
action : Change url to submit to
*DATA* : The message data
*DATA* : The message data
<dial context dialplan caller-id-name caller-id-number>*DATA*</dial>
<dial context dialplan caller-id-name caller-id-number
action
>*DATA*</dial>
: Place an outbound call or transfer.
: Place an outbound call or transfer.
ATTRS:
ATTRS:
...
@@ -176,6 +179,7 @@ context : Dialplan context.
...
@@ -176,6 +179,7 @@ context : Dialplan context.
dialplan : Dialplan dialplan.
dialplan : Dialplan dialplan.
caller-id-name : Caller ID Name.
caller-id-name : Caller ID Name.
caller-id-number : Caller ID Number.
caller-id-number : Caller ID Number.
action : Change url to submit to
*DATA* : Number to dial or originate string
*DATA* : Number to dial or originate string
...
@@ -194,22 +198,22 @@ action : URL action to use.
...
@@ -194,22 +198,22 @@ action : URL action to use.
<conference profile>
<conference profile
action
>
: Start a conference call.
: Start a conference call.
ATTRS:
ATTRS:
profile : Conference profile to use.
profile : Conference profile to use.
action : Change url to submit to
<hangup cause action>
<hangup cause>
: Hangup the call
: Hangup the call
ATTRS:
ATTRS:
cause : Hangup cause
cause : Hangup cause
action : Change url to submit to
...
@@ -221,11 +225,19 @@ cause : Hangup cause
...
@@ -221,11 +225,19 @@ cause : Hangup cause
<log level clean>
<log level clean
action
>
: Exit the httapi application and continue in the dialplan.
: Exit the httapi application and continue in the dialplan.
ATTRS:
ATTRS:
level : The log level to use.
level : The log level to use.
clean : If true do not pring log prefix.
clean : If true do not pring log prefix.
action : Change url to submit to
<continue action>
: Just continue (no-op)
ATTRS:
action : Change url to submit to
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论