]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
update
authorAnthony Minessale <anthony.minessale@gmail.com>
Wed, 30 Apr 2008 20:03:20 +0000 (20:03 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Wed, 30 Apr 2008 20:03:20 +0000 (20:03 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8222 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/endpoints/mod_sofia/sofia.c

index eb2e21a6c6ae1dfa183df83ee3dc05a759ca33a1..088b4588714d93995a4f8820828b2a4f7c876adb 100644 (file)
@@ -2615,15 +2615,16 @@ void sofia_handle_sip_i_invite(nua_t *nua, sofia_profile_t *profile, nua_handle_
 
 
        if ((profile->pflags & PFLAG_AUTH_CALLS) || (!(profile->pflags & PFLAG_BLIND_AUTH) && (sip->sip_proxy_authorization || sip->sip_authorization))) {
-               if (strcmp(network_ip, profile->sipip)) {
+               int rport = ntohs(((struct sockaddr_in *) msg_addrinfo(nua_current_request(nua))->ai_addr)->sin_port);
+               if (!strcmp(network_ip, profile->sipip) && rport == profile->sip_port) {
+                       calling_myself++;
+               } else {
                        if (sofia_reg_handle_register(nua, profile, nh, sip, REG_INVITE, key, sizeof(key), &v_event)) {
                                if (v_event) {
                                        switch_event_destroy(&v_event);
                                }
                                return;
                        }
-               } else {
-                       calling_myself++;
                }
                is_auth++;
        }