From: Victor Torres Date: Fri, 17 Apr 2015 21:50:16 +0000 (-0300) Subject: FS-7445 fixes cc_outbound_cid_name_prefix X-Git-Tag: v1.6.2~573^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=69d5333bfc18342e856cadccf668432948c45374;p=thirdparty%2Ffreeswitch.git FS-7445 fixes cc_outbound_cid_name_prefix --- diff --git a/src/mod/applications/mod_callcenter/mod_callcenter.c b/src/mod/applications/mod_callcenter/mod_callcenter.c index 6db5f8a2cd..7f44601fe2 100644 --- a/src/mod/applications/mod_callcenter/mod_callcenter.c +++ b/src/mod/applications/mod_callcenter/mod_callcenter.c @@ -1506,19 +1506,18 @@ static void *SWITCH_THREAD_FUNC outbound_agent_thread_run(switch_thread_t *threa const char *cid_number = NULL; const char *cid_name_prefix = NULL; + if (!(cid_name = switch_channel_get_variable(member_channel, "effective_caller_id_name"))) { + cid_name = h->member_cid_name; + } + if (!(cid_number = switch_channel_get_variable(member_channel, "effective_caller_id_number"))) { + cid_number = h->member_cid_number; + } if ((cid_name_prefix = switch_channel_get_variable(member_channel, "cc_outbound_cid_name_prefix"))) { - cid_name_freeable = switch_mprintf("%s%s", cid_name_prefix, h->member_cid_name); + cid_name_freeable = switch_mprintf("%s%s", cid_name_prefix, cid_name); cid_name = cid_name_freeable; - switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(member_session), SWITCH_LOG_DEBUG, "Setting outbound caller_id_name to: %s\n", cid_name); - } else { - if (!(cid_name = switch_channel_get_variable(member_channel, "effective_caller_id_name"))) { - cid_name = h->member_cid_name; - } - - if (!(cid_number = switch_channel_get_variable(member_channel, "effective_caller_id_number"))) { - cid_number = h->member_cid_number; - } } + switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(member_session), SWITCH_LOG_DEBUG, "Setting outbound caller_id_name to: %s\n", cid_name); + switch_event_create(&ovars, SWITCH_EVENT_REQUEST_PARAMS); switch_event_add_header(ovars, SWITCH_STACK_BOTTOM, "cc_queue", "%s", h->queue_name); switch_event_add_header(ovars, SWITCH_STACK_BOTTOM, "cc_member_uuid", "%s", h->member_uuid);