From kbdfck@gmail.com Fri Apr 17 12:13:36 2015 From: Dmitry Sytchev To: sr-users@lists.kamailio.org Subject: Re: [SR-Users] Kamailio relays ACK of 200 OK to itself Date: Fri, 17 Apr 2015 13:13:30 +0300 Message-ID: In-Reply-To: <5530D344.2080704@sipwise.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0668088306==" --===============0668088306== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi Daniel! I've tried Yealink and Cisco SPA-303 They send very similar ACKs, the problem seems to be not in their SIP stacks. Original ACK URI is correct uri from 200 OK contact. Route: header is set to correct value from Record-Route from 200 OK. Maybe my NAT handling code makes something wrong with original ACK... There is kinda unusual IP setup on machine - there is quagga daemon, there are many public IPs and one of machine's public IP addresses is set as /32 on loopback to be announced with BGP. But routing is correct, so I don't think there are issues with this. mhomed =3D 1 in kamailo config. I'll get full SIP dumps and post it there. Thanks! 2015-04-17 12:32 GMT+03:00 Daniel Grotti : > Hi, > please also check if you have set aliases (kamailio.cfg global > parameters) to the IP address in the R-URI. > > > -- > Daniel Grotti > VoIP Engineer > > > Sipwise GmbH > Europaring F15 | 2345 Brunn am Gebirge, Austria | www.sipwise.com > > On 04/16/2015 07:23 PM, Dmitry Sytchev wrote: >> Hi all! >> >> I can't make my Kamailio to correctly relay stateful ACKs for 200 >> OK. It takes URI from Route: header and trying relay it to itself >> instead of sending it to host sent 200 OK. >> I don't understand why it can't match transaction and relay to correct hos= t. >> >> Seems BYEs aren't relayed correctly either... >> >> 192.168.4.218 -> NAT 1.2.2.94 -> Kamailo (1.2.3.46, 1.2.2.219) -> 172.19.1= 26.105 >> >> 192.168.4.218 sends INVITE to 1.2.3.45 which relays it to 172.19.126.105. >> >> After 172.19.126.105 answers with 200 OK, it never gets ACK for it >> back. Instead, ACK relayed by proxy to 1.2.3.46 (one of proxy >> addresses). >> >> Example of original ACK: >> ACK sip:89211234567(a)172.19.126.105:5060 SIP/2.0. >> Via: SIP/2.0/UDP 192.168.4.218:5062;branch=3Dz9hG4bK1161188624. >> Route: . >> From: "0099977" ;tag=3D259196205. >> To: ;tag=3Das6bfd1fa1. >> Call-ID: 910089142(a)192.168.4.218. >> CSeq: 2 ACK. >> Contact: . >> Max-Forwards: 70. >> User-Agent: Yealink SIP-T46G 28.71.14.4. >> Content-Length: 0. >> >> It sees that host is not local: check_self: host !=3D me >> I think the problem is somewhere in my NAT handling script code, but >> seems I'm stuck and can't get what am I doing wrong, so I'll greatly >> appreciate any help. >> >> Apr 16 19:21:33 kam-sbc-1-01 /usr/sbin/kamailio[9178]: DEBUG: >> [parser/msg_parser.c:170]: get_hdr_field(): get_hdr_field: cseq >> : <2> >> Apr 16 19:21:33 kam-sbc-1-01 /usr/sbin/kamailio[9178]: DEBUG: maxfwd >> [mf_funcs.c:85]: is_maxfwd_present(): value =3D 70 >> Apr 16 19:21:33 kam-sbc-1-01 /usr/sbin/kamailio[9178]: DEBUG: >> [parser/msg_parser.c:204]: get_hdr_field(): DEBUG: get_hdr_body : >> content_length=3D0 >> Apr 16 19:21:33 kam-sbc-1-01 /usr/sbin/kamailio[9178]: DEBUG: >> [parser/msg_parser.c:106]: get_hdr_field(): found end of header >> Apr 16 19:21:33 kam-sbc-1-01 /usr/sbin/kamailio[9178]: DEBUG: sanity >> [mod_sanity.c:255]: w_sanity_check(): sanity checks result: 1 >> Apr 16 19:21:33 kam-sbc-1-01 /usr/sbin/kamailio[9178]: INFO: