]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fix broken fix
authorAnthony Minessale <anthony.minessale@gmail.com>
Wed, 29 Oct 2008 18:00:27 +0000 (18:00 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Wed, 29 Oct 2008 18:00:27 +0000 (18:00 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10192 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/endpoints/mod_sofia/mod_sofia.c

index ffdf824c97d17ab5b89e9e40d0693ebf037ba465..e8e106488a5bf4e5fc3a0c015646ae8996c4fab5 100644 (file)
@@ -1948,6 +1948,9 @@ static switch_call_cause_t sofia_outgoing_channel(switch_core_session_t *session
        switch_mutex_init(&tech_pvt->flag_mutex, SWITCH_MUTEX_NESTED, switch_core_session_get_pool(nsession));
 
        data = switch_core_session_strdup(nsession, outbound_profile->destination_number);
+       if ((dest_to = strchr(data, '^'))) {
+               *dest_to++ = '\0';
+       }
        profile_name = data;
 
        nchannel = switch_core_session_get_channel(nsession);
@@ -1988,10 +1991,6 @@ static switch_call_cause_t sofia_outgoing_channel(switch_core_session_t *session
 
                tech_pvt->transport = gateway_ptr->register_transport;
 
-               if ((dest_to = strchr(dest, '^'))) {
-                       *dest_to++ = '\0';
-               }
-
                /*
                 * Handle params, strip them off the destination and add them to the
                 * invite contact.