[Kamailio-Users] ACK/BYE problem with NAT

Dubravko Caric dubravko_caric at yahoo.com
Tue Jun 16 17:24:21 CEST 2009


sorry, I sent wrong part of cfg... 

        if((t_check_status("200|183|180") &&
search("Content_Type: application/sdp")) || search("Content-Type:
application/sdp")) {
                fix_nated_contact();
                force_rtp_proxy();
        }

I get this "incorect port 0..." error when it comes to "force_rtp_proxy" in above statement. flag 5 is not set so it never enters "isflagset(5)..." statement.


Dubravko




----- Original Message ----
From: Dubravko Caric <dubravko_caric at yahoo.com>
To: kamailio users <users at lists.kamailio.org>
Sent: Tuesday, June 16, 2009 5:10:06 PM
Subject: Re: [Kamailio-Users] ACK/BYE problem with NAT


Hi all,

...just to add that below change in "on_reply_route" will fix Contact header but RTP will still go to private IP address.  

        if((t_check_status("200|183|180") && search("Content_Type: application/sdp")) || search("Content-Type: application/sdp")) {
                fix_nated_contact();
        }

and when request comes to this part in "on_reply_route":

        if ((isflagset(5) || isbflagset(6)) && status=~"(183)|(2[0-9][0-9])") {
                force_rtp_proxy();
        }

I'm getting following ERROR:

Jun 16 16:38:43 [22390] DBG:nathelper:force_rtp_proxy: proxy reply: 0 "RTP_PROXY_PUBLIC_ADDRESS"
Jun 16 16:38:43 [22390] ERROR:nathelper:force_rtp_proxy: incorrect port 0 in reply from rtp proxy
Jun 16 16:38:43 [22390] DBG:tm:t_should_relay_response: T_code=180, new_code=200


Thanks a lot

Dubravko



----- Original Message ----
From: Dubravko Caric <dubravko_caric at yahoo.com>
To: kamailio users <users at lists.kamailio.org>
Sent: Tuesday, June 16, 2009 2:25:03 PM
Subject: [Kamailio-Users] ACK/BYE problem with NAT


Hi all,

I have a problem when calling from UAC#1 (public IP address) to UAC#2 (private IP address), call is dropping after 30 sec. STUN and ICE are disabled in UAC#2. Other way is working OK (UAC#2 --INVITE--> UAC#1), RTPProxy is in the middle,... 

Kamailio is aware that UAC#2 is behind NAT and adds received filed on REGISTER.

MySQL location table:
contact                                                                          received    
sip:bob at 10.2.4.18:1025;rinstance=24c6e191484e570a     sip:UAC#2_PUBLIC_IP_ADDRESS:55671

Why proxy is not aware that UAC#2 is behind NAT (for BYE and ACK) when call is initiated by UAC#1 and thus sends ACK/BYE to private IP address? Shouldn't Contact header be rewriten with NAT address/port and also a "c" filed in SDP with RTPProxy address? fix_nated_contact() sholud fix contact header for transaction-starting messages like ACK and BYE...

I'm using kamailio 1.5.1-tls and standard kamailio.cfg (to be sure that I'm not using my cfg which could be faulty)...

Thanks a lot

Dubravko


INVITE: *working OK*
#
U UAC#1_PUBLIC_IP_ADDRESS:24354 -> KAMAILIO_PUBLIC_IP_ADDRESS:5958
  INVITE sip:bob at example.com SIP/2.0....

U UAC#1_PUBLIC_IP_ADDRESS:5958 -> UAC#2_PUBLIC_IP_ADDRESS:55671
  INVITE sip:bob at 10.2.4.18:1025;rinstance=24c6e191484e570a SIP/2.0..


ACK (and BYE): *not working*
#
U UAC#1_PUBLIC_IP_ADDRESS:24354 -> KAMAILIO_PUBLIC_IP_ADDRESS:5958
  ACK sip:bob at 10.2.4.18:1025;rinstance=24c6e191484e570a SIP/2.0....
#
U KAMAILIO_PUBLIC_IP_ADDRESS:5958 -> UAC#2_PRIVATE_IP_ADDRESS:1025
  ACK sip:bib at 10.2.4.18:1025;rinstance=24c6e191484e570a SIP/2.0....



      

_______________________________________________
Kamailio (OpenSER) - Users mailing list
Users at lists.kamailio.org
http://lists.kamailio.org/cgi-bin/mailman/listinfo/users
http://lists.openser-project.org/cgi-bin/mailman/listinfo/users



      

_______________________________________________
Kamailio (OpenSER) - Users mailing list
Users at lists.kamailio.org
http://lists.kamailio.org/cgi-bin/mailman/listinfo/users
http://lists.openser-project.org/cgi-bin/mailman/listinfo/users



      




More information about the sr-users mailing list