[Freeswitch-svn] [commit] r8760 - freeswitch/trunk/src

Freeswitch SVN anthm at freeswitch.org
Wed Jun 4 20:23:58 EDT 2008


Author: anthm
Date: Wed Jun  4 20:23:58 2008
New Revision: 8760

Modified:
   freeswitch/trunk/src/switch_ivr_originate.c

Log:
update

Modified: freeswitch/trunk/src/switch_ivr_originate.c
==============================================================================
--- freeswitch/trunk/src/switch_ivr_originate.c	(original)
+++ freeswitch/trunk/src/switch_ivr_originate.c	Wed Jun  4 20:23:58 2008
@@ -1195,7 +1195,7 @@
 				peer_channel = peer_channels[idx];
 			} else {
 				status = SWITCH_STATUS_FALSE;
-				if (caller_channel) {
+				if (caller_channel && peer_channel) {
 					process_import(session, peer_channel);
 				}
 				peer_channel = NULL;
@@ -1238,7 +1238,9 @@
 			if (status == SWITCH_STATUS_SUCCESS) {
 				if (caller_channel) {
 					switch_channel_set_variable(caller_channel, "originate_disposition", "call accepted");
-					process_import(session, peer_channel);
+					if (peer_channel) {
+						process_import(session, peer_channel);
+					}
 				}
 				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;



More information about the Freeswitch-svn mailing list