From 80c2465a75f3fbf244649b2b241b70175bbaedaf Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Thu, 10 Jan 2013 10:32:48 -0600 Subject: [PATCH] FS-5009 --- src/mod/endpoints/mod_sofia/sofia.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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)))) {