From 6ef6cbaf7aadfd4a8e7c3c0bcc21a287891138af Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Wed, 5 Dec 2007 18:54:49 +0000 Subject: [PATCH] update git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6522 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/applications/mod_dptools/mod_dptools.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/mod/applications/mod_dptools/mod_dptools.c b/src/mod/applications/mod_dptools/mod_dptools.c index 92c8228182..a73b30ee40 100644 --- a/src/mod/applications/mod_dptools/mod_dptools.c +++ b/src/mod/applications/mod_dptools/mod_dptools.c @@ -1470,16 +1470,23 @@ static switch_call_cause_t user_outgoing_channel(switch_core_session_t *session, 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) {