From: Anthony Minessale Date: Wed, 4 Feb 2009 20:25:46 +0000 (+0000) Subject: tolerate missing user in the request uri X-Git-Tag: v1.0.3~455 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b26382fc8f7fae10c2c0db7adf6790bfb16818d8;p=thirdparty%2Ffreeswitch.git tolerate missing user in the request uri git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@11636 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- diff --git a/src/mod/endpoints/mod_sofia/sofia.c b/src/mod/endpoints/mod_sofia/sofia.c index cefe35a757..7e4da2bd6f 100644 --- a/src/mod/endpoints/mod_sofia/sofia.c +++ b/src/mod/endpoints/mod_sofia/sofia.c @@ -4113,10 +4113,18 @@ void sofia_handle_sip_i_invite(nua_t *nua, sofia_profile_t *profile, nua_handle_ } else { destination_number = sip->sip_request->rq_url->url_user; } - check_decode(destination_number, session); } - + if (!destination_number && sip->sip_to && sip->sip_to->a_url) { + destination_number = sip->sip_to->a_url->url_user; + } + + if (destination_number) { + check_decode(destination_number, session); + } else { + destination_number = "service"; + } + if (sip->sip_to && sip->sip_to->a_url) { const char *host, *user; int port;