From b26382fc8f7fae10c2c0db7adf6790bfb16818d8 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Wed, 4 Feb 2009 20:25:46 +0000 Subject: [PATCH] tolerate missing user in the request uri git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@11636 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/endpoints/mod_sofia/sofia.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) 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;