add success cause for originate

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4091 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale 2007-01-30 03:17:10 +00:00
parent 07833b9e77
commit 9b474d2576
3 changed files with 3 additions and 0 deletions

View File

@ -783,6 +783,7 @@ typedef enum {
typedef enum {
SWITCH_CAUSE_UNALLOCATED = 0,
SWITCH_CAUSE_SUCCESS = 1,
SWITCH_CAUSE_NO_ROUTE_TRANSIT_NET = 2,
SWITCH_CAUSE_NO_ROUTE_DESTINATION = 3,
SWITCH_CAUSE_CHANNEL_UNACCEPTABLE = 6,

View File

@ -40,6 +40,7 @@ struct switch_cause_table {
static struct switch_cause_table CAUSE_CHART[] = {
{ "UNALLOCATED", SWITCH_CAUSE_UNALLOCATED },
{ "SUCCESS", SWITCH_CAUSE_SUCCESS },
{ "NO_ROUTE_TRANSIT_NET", SWITCH_CAUSE_NO_ROUTE_TRANSIT_NET },
{ "NO_ROUTE_DESTINATION", SWITCH_CAUSE_NO_ROUTE_DESTINATION },
{ "CHANNEL_UNACCEPTABLE", SWITCH_CAUSE_CHANNEL_UNACCEPTABLE },

View File

@ -2893,6 +2893,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
switch_channel_set_variable(caller_channel, "originate_disposition", "call accepted");
}
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Originate Resulted in Success: [%s]\n", switch_channel_get_name(peer_channel));
*cause = SWITCH_CAUSE_SUCCESS;
} else {
if (peer_channel) {
*cause = switch_channel_get_cause(peer_channel);