]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
more
authorAnthony Minessale <anthm@freeswitch.org>
Thu, 13 Jan 2011 01:34:19 +0000 (19:34 -0600)
committerAnthony Minessale <anthm@freeswitch.org>
Thu, 13 Jan 2011 01:34:19 +0000 (19:34 -0600)
src/mod/endpoints/mod_sofia/sofia.c
src/switch_ivr_originate.c

index 67a7a6e582f2c924554650182f0ae3b75b768da3..1d8d6a9a212b2a68affa839276d01ce26cceaa04 100644 (file)
@@ -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)) {
index 822f40429858e263e8dfb35ea53ae3deb2aa1be3..d17105a46554f988e8bac9a5d2526b80d52a001b 100644 (file)
@@ -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