From 1b91f811bdba30759946c23132579fc55f3579a1 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Wed, 12 Jan 2011 19:34:19 -0600 Subject: [PATCH] more --- src/mod/endpoints/mod_sofia/sofia.c | 3 +++ src/switch_ivr_originate.c | 3 +-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/mod/endpoints/mod_sofia/sofia.c b/src/mod/endpoints/mod_sofia/sofia.c index 67a7a6e582..1d8d6a9a21 100644 --- a/src/mod/endpoints/mod_sofia/sofia.c +++ b/src/mod/endpoints/mod_sofia/sofia.c @@ -7135,6 +7135,9 @@ void sofia_handle_sip_i_invite(nua_t *nua, sofia_profile_t *profile, nua_handle_ switch_channel_set_variable(channel, "sip_history_info", un->un_value); } } + } else if (!strcasecmp(un->un_name, "X-FS-Channel-Name") && !zstr(un->un_value)) { + switch_channel_set_name(channel, un->un_value); + switch_channel_set_variable(channel, "push_channel_name", "true"); } else if (!strcasecmp(un->un_name, "X-FS-Support")) { tech_pvt->x_freeswitch_support_remote = switch_core_session_strdup(session, un->un_value); } else if (!strncasecmp(un->un_name, "X-", 2) || !strncasecmp(un->un_name, "P-", 2)) { diff --git a/src/switch_ivr_originate.c b/src/switch_ivr_originate.c index 822f404298..d17105a465 100644 --- a/src/switch_ivr_originate.c +++ b/src/switch_ivr_originate.c @@ -2604,10 +2604,9 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess if (caller_channel && switch_true(switch_channel_get_variable(caller_channel, "push_channel_name"))) { char *new_name = switch_core_session_sprintf(session, "%s__B", switch_channel_get_name(caller_channel)); - //switch_channel_set_variable(originate_status[i].peer_channel, "origination_channel_name", new_name); switch_event_add_header_string(var_event, SWITCH_STACK_BOTTOM, "origination_channel_name", new_name); new_name = switch_core_session_sprintf(session, "_%s", switch_channel_get_name(caller_channel)); - switch_event_add_header_string(var_event, SWITCH_STACK_BOTTOM, "sip_h_X-Channel-Name", new_name); + switch_event_add_header_string(var_event, SWITCH_STACK_BOTTOM, "sip_h_X-FS-Channel-Name", new_name); } /* make a special var event with mixture of the {} and the [] vars to pass down as global vars to the outgoing channel