add preAnswer and ringReady too
This commit is contained in:
parent
e884116c08
commit
fd67c19664
|
@ -237,6 +237,13 @@ ATTRS:
|
||||||
is-conference : true|false (set the conference flag for RFC4579 stuff.
|
is-conference : true|false (set the conference flag for RFC4579 stuff.
|
||||||
|
|
||||||
|
|
||||||
|
<preAnswer>
|
||||||
|
: Establish media on the call without answering.
|
||||||
|
|
||||||
|
<ringReady>
|
||||||
|
: Indicate ringing to an unaswered channel.
|
||||||
|
|
||||||
|
|
||||||
<hangup cause action>
|
<hangup cause action>
|
||||||
: Hangup the call
|
: Hangup the call
|
||||||
|
|
||||||
|
|
|
@ -879,6 +879,8 @@ static switch_status_t parse_hangup(const char *tag_name, client_t *client, swit
|
||||||
|
|
||||||
static switch_status_t parse_answer(const char *tag_name, client_t *client, switch_xml_t tag, const char *body)
|
static switch_status_t parse_answer(const char *tag_name, client_t *client, switch_xml_t tag, const char *body)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
if (!strcasecmp(tag_name, "answer")) {
|
||||||
const char *conf = switch_xml_attr(tag, "is-conference");
|
const char *conf = switch_xml_attr(tag, "is-conference");
|
||||||
|
|
||||||
if (conf && switch_true(conf)) {
|
if (conf && switch_true(conf)) {
|
||||||
|
@ -886,6 +888,11 @@ static switch_status_t parse_answer(const char *tag_name, client_t *client, swit
|
||||||
}
|
}
|
||||||
|
|
||||||
switch_channel_answer(client->channel);
|
switch_channel_answer(client->channel);
|
||||||
|
} else if (!strcasecmp(tag_name, "preAnswer")) {
|
||||||
|
switch_channel_pre_answer(client->channel);
|
||||||
|
} else if (!strcasecmp(tag_name, "ringReady")) {
|
||||||
|
switch_channel_ring_ready(client->channel);
|
||||||
|
}
|
||||||
|
|
||||||
return SWITCH_STATUS_FALSE;
|
return SWITCH_STATUS_FALSE;
|
||||||
}
|
}
|
||||||
|
@ -3011,6 +3018,8 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_httapi_load)
|
||||||
bind_parser("dial", parse_dial);
|
bind_parser("dial", parse_dial);
|
||||||
bind_parser("pause", parse_playback);
|
bind_parser("pause", parse_playback);
|
||||||
bind_parser("answer", parse_answer);
|
bind_parser("answer", parse_answer);
|
||||||
|
bind_parser("preAnswer", parse_answer);
|
||||||
|
bind_parser("ringReady", parse_answer);
|
||||||
bind_parser("hangup", parse_hangup);
|
bind_parser("hangup", parse_hangup);
|
||||||
bind_parser("record", parse_record);
|
bind_parser("record", parse_record);
|
||||||
bind_parser("recordCall", parse_record_call);
|
bind_parser("recordCall", parse_record_call);
|
||||||
|
|
Loading…
Reference in New Issue