]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
add origination_channel_name var for {} to choose the channel name value
authorAnthony Minessale <anthm@freeswitch.org>
Wed, 12 Jan 2011 23:48:49 +0000 (17:48 -0600)
committerAnthony Minessale <anthm@freeswitch.org>
Wed, 12 Jan 2011 23:48:49 +0000 (17:48 -0600)
src/switch_ivr_originate.c

index f31d0f5559c9f30ef056694a975f0a8b7f67e3c8..13d9506b17b66d62c57f6fa4f05dcd7baf9422c1 100644 (file)
@@ -2691,6 +2691,10 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
                                                originate_status[i].tagged = 1;
                                        }
 
+                                       if ((vvar = switch_channel_get_variable(originate_status[i].peer_channel, "origination_channel_name"))) {
+                                               switch_channel_set_name(originate_status[i].peer_channel, vvar);
+                                       }
+
                                        if ((vvar = switch_channel_get_variable(originate_status[i].peer_channel, "origination_callee_id_name"))) {
                                                switch_channel_set_profile_var(originate_status[i].peer_channel, "callee_id_name", vvar);
                                        }