From: Anthony Minessale Date: Thu, 10 Jan 2013 16:32:48 +0000 (-0600) Subject: FS-5009 X-Git-Tag: v1.3.13~154 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=80c2465a75f3fbf244649b2b241b70175bbaedaf;p=thirdparty%2Ffreeswitch.git FS-5009 --- diff --git a/src/mod/endpoints/mod_sofia/sofia.c b/src/mod/endpoints/mod_sofia/sofia.c index 8abb8ed8d8..6029da396d 100644 --- a/src/mod/endpoints/mod_sofia/sofia.c +++ b/src/mod/endpoints/mod_sofia/sofia.c @@ -7746,6 +7746,21 @@ void sofia_handle_sip_i_invite(switch_core_session_t *session, nua_t *nua, sofia } } + if (!is_auth && sofia_test_pflag(profile, PFLAG_AUTH_CALLS) && sofia_test_pflag(profile, PFLAG_BLIND_AUTH)) { + char *user; + + if (!strcmp(network_ip, profile->sipip) && network_port == profile->sip_port) { + calling_myself++; + } + + if (sip && sip->sip_to) { + user = switch_core_session_sprintf(session, "%s@%s", sip->sip_to->a_url->url_user, sip->sip_to->a_url->url_host); + switch_ivr_set_user(session, user); + } + + is_auth++; + } + if (!is_auth && (sofia_test_pflag(profile, PFLAG_AUTH_CALLS) || (!sofia_test_pflag(profile, PFLAG_BLIND_AUTH) && (sip->sip_proxy_authorization || sip->sip_authorization)))) {