mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-14 23:34:13 +00:00
bunch of tweaks to make ivr more fun
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2351 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
1 parent
4f17ab7714
commit
c92e1cb79a
3 files changed
+93
-26
No files matched your search
@@ -1217,6 +1217,7 @@ static switch_status_t exosip_create_call(eXosip_event_t * event)
|
||||
|
||||
snprintf(name, sizeof(name), "Exosip/%s-%04x", event->request->from->url->username, rand() & 0xffff);
|
||||
switch_channel_set_name(channel, name);
|
||||
switch_channel_set_variable(channel, "endpoint_disposition", "INVITE");
|
||||
|
||||
if (osip_message_header_get_byname (event->request, "SrtpRealm", 0, &tedious)) {
|
||||
tech_pvt->realm = switch_core_session_strdup(session, osip_header_get_value(tedious));
|
||||
@@ -1503,31 +1504,31 @@ static void destroy_call_by_event(eXosip_event_t *event)
|
||||
|
||||
switch (event->type) {
|
||||
case EXOSIP_CALL_RELEASED:
|
||||
switch_channel_set_variable(channel, "exosip_disposition", "RELEASED");
|
||||
switch_channel_set_variable(channel, "endpoint_disposition", "RELEASED");
|
||||
cause = SWITCH_CAUSE_NORMAL_CLEARING;
|
||||
break;
|
||||
case EXOSIP_CALL_CLOSED:
|
||||
switch_channel_set_variable(channel, "exosip_disposition", "CLOSED");
|
||||
switch_channel_set_variable(channel, "endpoint_disposition", "CLOSED");
|
||||
cause = SWITCH_CAUSE_NORMAL_CLEARING;
|
||||
break;
|
||||
case EXOSIP_CALL_NOANSWER:
|
||||
switch_channel_set_variable(channel, "exosip_disposition", "NO ANSWER");
|
||||
switch_channel_set_variable(channel, "endpoint_disposition", "NO ANSWER");
|
||||
cause = SWITCH_CAUSE_NO_ANSWER;
|
||||
break;
|
||||
case EXOSIP_CALL_REQUESTFAILURE:
|
||||
switch_channel_set_variable(channel, "exosip_disposition", "REQUEST FAILURE");
|
||||
switch_channel_set_variable(channel, "endpoint_disposition", "REQUEST FAILURE");
|
||||
cause = SWITCH_CAUSE_REQUESTED_CHAN_UNAVAIL;
|
||||
break;
|
||||
case EXOSIP_CALL_SERVERFAILURE:
|
||||
switch_channel_set_variable(channel, "exosip_disposition", "SERVER FAILURE");
|
||||
switch_channel_set_variable(channel, "endpoint_disposition", "SERVER FAILURE");
|
||||
cause = SWITCH_CAUSE_CALL_REJECTED;
|
||||
break;
|
||||
case EXOSIP_CALL_GLOBALFAILURE:
|
||||
switch_channel_set_variable(channel, "exosip_disposition", "GLOBAL FAILURE");
|
||||
switch_channel_set_variable(channel, "endpoint_disposition", "GLOBAL FAILURE");
|
||||
cause = SWITCH_CAUSE_CALL_REJECTED;
|
||||
break;
|
||||
default:
|
||||
switch_channel_set_variable(channel, "exosip_disposition", "UNKNOWN");
|
||||
switch_channel_set_variable(channel, "endpoint_disposition", "UNKNOWN");
|
||||
cause = SWITCH_CAUSE_SWITCH_CONGESTION;
|
||||
break;
|
||||
}
|
||||
@@ -1736,6 +1737,8 @@ static void handle_answer(eXosip_event_t * event)
|
||||
return;
|
||||
}
|
||||
|
||||
switch_channel_set_variable(channel, "endpoint_disposition", "ANSWER");
|
||||
|
||||
|
||||
conn = eXosip_get_audio_connection(remote_sdp);
|
||||
remote_med = eXosip_get_audio_media(remote_sdp);
|
||||
|
||||
Reference in new issue
Block a user