forked from Mirrors/freeswitch
add answer work tag to httapi
This commit is contained in:
parent
b2e06346d4
commit
41c1c1cb75
|
@ -230,6 +230,12 @@ action : Change url to submit to.
|
|||
temp-action : Change url to submit to. just for the next loop.
|
||||
|
||||
|
||||
<answer is-conference>
|
||||
: Answer the call
|
||||
|
||||
ATTRS:
|
||||
is-conference : true|false (set the conference flag for RFC4579 stuff.
|
||||
|
||||
|
||||
<hangup cause action>
|
||||
: Hangup the call
|
||||
|
|
|
@ -877,6 +877,19 @@ static switch_status_t parse_hangup(const char *tag_name, client_t *client, swit
|
|||
return SWITCH_STATUS_FALSE;
|
||||
}
|
||||
|
||||
static switch_status_t parse_answer(const char *tag_name, client_t *client, switch_xml_t tag, const char *body)
|
||||
{
|
||||
const char *conf = switch_xml_attr(tag, "is-conference");
|
||||
|
||||
if (conf && switch_true(conf)) {
|
||||
switch_channel_set_flag(client->channel, CF_CONFERENCE);
|
||||
}
|
||||
|
||||
switch_channel_answer(client->channel);
|
||||
|
||||
return SWITCH_STATUS_FALSE;
|
||||
}
|
||||
|
||||
static switch_status_t parse_record_call(const char *tag_name, client_t *client, switch_xml_t tag, const char *body)
|
||||
{
|
||||
const char *limit_ = switch_xml_attr(tag, "limit");
|
||||
|
@ -2997,6 +3010,7 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_httapi_load)
|
|||
bind_parser("sms", parse_sms);
|
||||
bind_parser("dial", parse_dial);
|
||||
bind_parser("pause", parse_playback);
|
||||
bind_parser("answer", parse_answer);
|
||||
bind_parser("hangup", parse_hangup);
|
||||
bind_parser("record", parse_record);
|
||||
bind_parser("recordCall", parse_record_call);
|
||||
|
|
Loading…
Reference in New Issue