[Freeswitch-svn] [commit] r6522 - freeswitch/trunk/src/mod/applications/mod_dptools

Freeswitch SVN anthm at freeswitch.org
Wed Dec 5 13:54:49 EST 2007


Author: anthm
Date: Wed Dec  5 13:54:49 2007
New Revision: 6522

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

Log:
update

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	Wed Dec  5 13:54:49 2007
@@ -1470,16 +1470,23 @@
 
 	if (dest) {
 		const char *var;
+		char *d_dest = NULL;
 		switch_channel_t *channel;
-
+		
 		channel = switch_core_session_get_channel(session);
 		if ((var = switch_channel_get_variable(channel, "call_timeout"))) {
 			timelimit = atoi(var);
 		}
+		
+		d_dest = switch_channel_expand_variables(channel, dest);
 
-		if (switch_ivr_originate(session, new_session, &cause, dest, timelimit, NULL, NULL, NULL, NULL) == SWITCH_STATUS_SUCCESS) {
+		if (switch_ivr_originate(session, new_session, &cause, d_dest, timelimit, NULL, NULL, NULL, NULL) == SWITCH_STATUS_SUCCESS) {
 			switch_core_session_rwunlock(*new_session);
 		}
+
+		if (d_dest != dest) {
+			switch_safe_free(d_dest);
+		}
 	}
 
 	if (xml) {



More information about the Freeswitch-svn mailing list