Author: anthm Date: Wed Oct 29 14:00:27 2008 New Revision: 10192 Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c Log: fix broken fix Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c ============================================================================== --- freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c (original) +++ freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c Wed Oct 29 14:00:27 2008 @@ -1948,6 +1948,9 @@ 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 @@ 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.