[Freeswitch-svn] [commit] r8896 - in freeswitch/trunk/src: . include mod/applications/mod_dptools
Freeswitch SVN
anthm at freeswitch.org
Thu Jul 3 18:51:10 EDT 2008
Author: anthm
Date: Thu Jul 3 18:51:09 2008
New Revision: 8896
Modified:
freeswitch/trunk/src/include/switch_types.h
freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c
freeswitch/trunk/src/switch_channel.c
freeswitch/trunk/src/switch_ivr_originate.c
Log:
fix causes causing trouble (do make current)
Modified: freeswitch/trunk/src/include/switch_types.h
==============================================================================
--- freeswitch/trunk/src/include/switch_types.h (original)
+++ freeswitch/trunk/src/include/switch_types.h Thu Jul 3 18:51:09 2008
@@ -1107,8 +1107,8 @@
} switch_input_type_t;
typedef enum {
- SWITCH_CAUSE_UNALLOCATED = 0,
- SWITCH_CAUSE_SUCCESS = 1,
+ SWITCH_CAUSE_NONE = 0,
+ SWITCH_CAUSE_UNALLOCATED = 1,
SWITCH_CAUSE_NO_ROUTE_TRANSIT_NET = 2,
SWITCH_CAUSE_NO_ROUTE_DESTINATION = 3,
SWITCH_CAUSE_CHANNEL_UNACCEPTABLE = 6,
@@ -1157,6 +1157,7 @@
SWITCH_CAUSE_MANDATORY_IE_LENGTH_ERROR = 103,
SWITCH_CAUSE_PROTOCOL_ERROR = 111,
SWITCH_CAUSE_INTERWORKING = 127,
+ SWITCH_CAUSE_SUCCESS = 142,
SWITCH_CAUSE_ORIGINATOR_CANCEL = 487,
SWITCH_CAUSE_CRASH = 500,
SWITCH_CAUSE_SYSTEM_SHUTDOWN = 501,
Modified: freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c (original)
+++ freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c Thu Jul 3 18:51:09 2008
@@ -1919,7 +1919,7 @@
switch_xml_t x_domain = NULL, xml = NULL, x_user = NULL, x_param, x_params;
char *user = NULL, *domain = NULL;
const char *dest = NULL;
- static switch_call_cause_t cause = SWITCH_CAUSE_UNALLOCATED;
+ static switch_call_cause_t cause = SWITCH_CAUSE_NONE;
unsigned int timelimit = 60;
switch_channel_t *new_channel = NULL;
switch_event_t *params = NULL;
Modified: freeswitch/trunk/src/switch_channel.c
==============================================================================
--- freeswitch/trunk/src/switch_channel.c (original)
+++ freeswitch/trunk/src/switch_channel.c Thu Jul 3 18:51:09 2008
@@ -40,8 +40,8 @@
};
static struct switch_cause_table CAUSE_CHART[] = {
+ {"NONE", SWITCH_CAUSE_NONE},
{"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},
@@ -89,6 +89,7 @@
{"MANDATORY_IE_LENGTH_ERROR", SWITCH_CAUSE_MANDATORY_IE_LENGTH_ERROR},
{"PROTOCOL_ERROR", SWITCH_CAUSE_PROTOCOL_ERROR},
{"INTERWORKING", SWITCH_CAUSE_INTERWORKING},
+ {"SUCCESS", SWITCH_CAUSE_SUCCESS},
{"ORIGINATOR_CANCEL", SWITCH_CAUSE_ORIGINATOR_CANCEL},
{"CRASH", SWITCH_CAUSE_CRASH},
{"SYSTEM_SHUTDOWN", SWITCH_CAUSE_SYSTEM_SHUTDOWN},
@@ -143,7 +144,7 @@
SWITCH_DECLARE(switch_call_cause_t) switch_channel_str2cause(const char *str)
{
uint8_t x;
- switch_call_cause_t cause = SWITCH_CAUSE_UNALLOCATED;
+ switch_call_cause_t cause = SWITCH_CAUSE_NONE;
if (*str > 47 && *str < 58) {
cause = atoi(str);
@@ -192,7 +193,7 @@
switch_mutex_init(&(*channel)->dtmf_mutex, SWITCH_MUTEX_NESTED, pool);
switch_mutex_init(&(*channel)->flag_mutex, SWITCH_MUTEX_NESTED, pool);
switch_mutex_init(&(*channel)->profile_mutex, SWITCH_MUTEX_NESTED, pool);
- (*channel)->hangup_cause = SWITCH_CAUSE_UNALLOCATED;
+ (*channel)->hangup_cause = SWITCH_CAUSE_NONE;
(*channel)->name = "";
return SWITCH_STATUS_SUCCESS;
Modified: freeswitch/trunk/src/switch_ivr_originate.c
==============================================================================
--- freeswitch/trunk/src/switch_ivr_originate.c (original)
+++ freeswitch/trunk/src/switch_ivr_originate.c Thu Jul 3 18:51:09 2008
@@ -512,7 +512,7 @@
switch_frame_t write_frame = { 0 };
uint8_t pass = 0;
char key[80] = SWITCH_BLANK_STRING, file[512] = SWITCH_BLANK_STRING, *odata, *var;
- switch_call_cause_t reason = SWITCH_CAUSE_UNALLOCATED;
+ switch_call_cause_t reason = SWITCH_CAUSE_NONE;
uint8_t to = 0;
char *var_val, *vars = NULL;
const char *ringback_data = NULL;
@@ -754,7 +754,7 @@
char *p, *e = NULL;
const char *var_begin, *var_end;
- reason = SWITCH_CAUSE_UNALLOCATED;
+ reason = SWITCH_CAUSE_NONE;
memset(peer_names, 0, sizeof(peer_names));
peer_session = NULL;
memset(peer_sessions, 0, sizeof(peer_sessions));
@@ -1306,7 +1306,7 @@
done:
- *cause = SWITCH_CAUSE_UNALLOCATED;
+ *cause = SWITCH_CAUSE_NONE;
if (caller_channel && !switch_channel_ready(caller_channel)) {
status = SWITCH_STATUS_FALSE;
@@ -1377,7 +1377,7 @@
}
}
- if (*cause == SWITCH_CAUSE_SUCCESS || *cause == SWITCH_CAUSE_UNALLOCATED) {
+ if (*cause == SWITCH_CAUSE_SUCCESS || *cause == SWITCH_CAUSE_NONE) {
*cause = SWITCH_CAUSE_ORIGINATOR_CANCEL;
}
More information about the Freeswitch-svn
mailing list