[Freeswitch-svn] [commit] r7534 - in freeswitch/trunk/src: . mod/applications/mod_dptools

Freeswitch SVN anthm at freeswitch.org
Tue Feb 5 20:05:02 EST 2008


Author: anthm
Date: Tue Feb  5 20:05:01 2008
New Revision: 7534

Modified:
   freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c
   freeswitch/trunk/src/switch_core_session.c

Log:
tweak cause code

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	Tue Feb  5 20:05:01 2008
@@ -1352,6 +1352,7 @@
 
 	if (switch_xml_locate_user("id", user, domain, NULL, &xml, &x_domain, &x_user, params) != SWITCH_STATUS_SUCCESS) {
 		switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "can't find user [%s@%s]\n", user, domain);
+		cause = SWITCH_CAUSE_SUBSCRIBER_ABSENT;
 		goto done;
 	}
 

Modified: freeswitch/trunk/src/switch_core_session.c
==============================================================================
--- freeswitch/trunk/src/switch_core_session.c	(original)
+++ freeswitch/trunk/src/switch_core_session.c	Tue Feb  5 20:05:01 2008
@@ -244,9 +244,11 @@
 		}
 	}
 
-	switch_assert(*new_session != NULL);
-	
-	if (*new_session) {
+	if (!*new_session) {
+		switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "outgoing method for endpoint: [%s] returned: [%s] but there is no new session!\n", 
+						  endpoint_name, switch_channel_cause2str(cause));
+		return SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER;
+	} else {
 		switch_caller_profile_t *profile = NULL, *peer_profile = NULL, *cloned_profile = NULL;
 		switch_event_t *event;
 		switch_channel_t *peer_channel = switch_core_session_get_channel(*new_session);



More information about the Freeswitch-svn mailing list