fix issue with user channel and cid

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8825 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale
2008-06-23 19:04:17 +00:00
parent e55c99a143
commit f045bb9a8f
2 changed files with 19 additions and 7 deletions
@@ -1961,6 +1961,13 @@ static switch_call_cause_t user_outgoing_channel(switch_core_session_t *session,
char *d_dest = NULL;
switch_channel_t *channel;
switch_originate_flag_t myflags = SOF_NONE;
char *cid_name_override = NULL;
char *cid_num_override = NULL;
if (var_event) {
cid_name_override = switch_event_get_header(var_event, "origination_caller_id_name");
cid_num_override = switch_event_get_header(var_event, "origination_caller_id_number");
}
if (session) {
channel = switch_core_session_get_channel(session);
@@ -1992,7 +1999,8 @@ static switch_call_cause_t user_outgoing_channel(switch_core_session_t *session,
myflags |= SOF_NOBLOCK;
}
if (switch_ivr_originate(session, new_session, &cause, d_dest, timelimit, NULL, NULL, NULL, NULL, myflags) == SWITCH_STATUS_SUCCESS) {
if (switch_ivr_originate(session, new_session, &cause, d_dest, timelimit, NULL,
cid_name_override, cid_num_override, NULL, myflags) == SWITCH_STATUS_SUCCESS) {
const char *context;
switch_caller_profile_t *cp;