]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fix rpid on gateways
authorAnthony Minessale <anthony.minessale@gmail.com>
Tue, 10 Apr 2007 02:25:29 +0000 (02:25 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Tue, 10 Apr 2007 02:25:29 +0000 (02:25 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4907 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/endpoints/mod_sofia/mod_sofia.c
src/mod/endpoints/mod_sofia/mod_sofia.h
src/mod/endpoints/mod_sofia/sofia_glue.c

index 10326be011656a340d44ca09a83692597e0b1b6b..7fad7f1a722a5753e29dbca590c4e3ee2037dfcf 100644 (file)
@@ -882,7 +882,7 @@ static switch_call_cause_t sofia_outgoing_channel(switch_core_session_t *session
                }
 
                profile = gateway_ptr->profile;
-               tech_pvt->from_str = switch_core_session_strdup(nsession, gateway_ptr->register_from);
+               tech_pvt->gateway_from_str = switch_core_session_strdup(nsession, gateway_ptr->register_from);
                if (!strchr(dest, '@')) {
                        tech_pvt->dest = switch_core_session_sprintf(nsession, "sip:%s@%s", dest, gateway_ptr->register_proxy + 4);
                } else {
index fa841903a86ba1897f12909bac79dd320d9e9427..042d3a1f757531e8271e98218fa58bbaf75f9ac4 100644 (file)
@@ -278,6 +278,7 @@ struct private_object {
        char *far_end_contact;
        char *contact_url;
        char *from_str;
+       char *gateway_from_str;
        char *rm_encoding;
        char *rm_fmtp;
        char *fmtp_out;
index 49ef4ac3fc50a399143563f452ed16a88702320f..ef5c8b337858569b72e1985aa8c8f69f5b269bf2 100644 (file)
@@ -417,7 +417,8 @@ switch_status_t sofia_glue_do_invite(switch_core_session_t *session)
                tech_pvt->nh = nua_handle(tech_pvt->profile->nua, NULL,
                                                                  NUTAG_URL(url),
                                                                  SIPTAG_TO_STR(tech_pvt->dest_to),
-                                                                 SIPTAG_FROM_STR(tech_pvt->from_str),
+                                                                 TAG_IF(tech_pvt->gateway_from_str, SIPTAG_FROM_STR(tech_pvt->gateway_from_str)),
+                                                                 TAG_IF(!tech_pvt->gateway_from_str, SIPTAG_FROM_STR(tech_pvt->from_str)),
                                                                  TAG_IF(tech_pvt->invite_contact, SIPTAG_CONTACT_STR(tech_pvt->invite_contact)),
                                                                  TAG_IF(!tech_pvt->invite_contact, SIPTAG_CONTACT_STR(tech_pvt->profile->url)),
                                                                  TAG_END());