use the record route, luke.

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7887 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris 2008-03-13 23:19:55 +00:00
parent dece9e8280
commit c54e0302a0
1 changed files with 10 additions and 1 deletions

View File

@ -2607,7 +2607,16 @@ void sofia_handle_sip_i_invite(nua_t *nua, sofia_profile_t *profile, nua_handle_
if (sip->sip_to && sip->sip_to->a_url) {
const char *host, *user;
int port;
sofia_transport_t transport = sofia_glue_url2transport(sip->sip_contact->m_url);
sofia_transport_t transport;
url_t *transport_url;
if (sip->sip_record_route && sip->sip_record_route->r_url) {
transport_url = sip->sip_record_route->r_url;
} else {
transport_url = sip->sip_contact->m_url;
}
transport = sofia_glue_url2transport(transport_url);
url_set_chanvars(session, sip->sip_to->a_url, sip_to);
if (switch_channel_get_variable(channel, "sip_to_uri")) {