From: Marc Olivier Chouinard Date: Fri, 4 Oct 2013 19:47:19 +0000 (-0400) Subject: FS-5843 Give this a try X-Git-Tag: v1.5.8~44 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a34095a4b7466105655c892005259c3a169ac9d1;p=thirdparty%2Ffreeswitch.git FS-5843 Give this a try --- diff --git a/src/mod/applications/mod_callcenter/mod_callcenter.c b/src/mod/applications/mod_callcenter/mod_callcenter.c index e1a88a27dc..3286cea05a 100644 --- a/src/mod/applications/mod_callcenter/mod_callcenter.c +++ b/src/mod/applications/mod_callcenter/mod_callcenter.c @@ -1453,9 +1453,12 @@ static void *SWITCH_THREAD_FUNC outbound_agent_thread_run(switch_thread_t *threa switch_channel_process_export(member_channel, NULL, ovars, "cc_export_vars"); t_agent_called = local_epoch_time_now(NULL); + dialstr = switch_channel_expand_variables(member_channel, h->originate_string); status = switch_ivr_originate(NULL, &agent_session, &cause, dialstr, 60, NULL, cid_name ? cid_name : h->member_cid_name, h->member_cid_number, NULL, ovars, SOF_NONE, NULL); - switch_safe_free(dialstr); + if (dialstr != h->originate_string) { + switch_safe_free(dialstr); + } switch_safe_free(cid_name); switch_event_destroy(&ovars);