<div><div dir="auto">Are you sure Linphone is not setting it?  Get a trace from client side, for some reason I’ve my doubts kamailio is defaulting to an ipv6 address.</div></div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jul 11, 2019 at 11:42 PM Pali Rohár <<a href="mailto:pali.rohar@gmail.com">pali.rohar@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi!<br>
<br>
I have not set pua_reginfo parameter. Should I set it? And if yes to<br>
which value? There should be at least settings for packets outgoing via<br>
IPv4 and another setting for packets outgoing via IPv6.<br>
<br>
On Thursday 11 July 2019 06:46:35 YASIN CANER wrote:<br>
> Hello,<br>
> <br>
> did you try to set parameter server address?<br>
> <a href="http://kamailio.org/docs/modules/5.2.x/modules/pua_reginfo.html#idm1031504764" rel="noreferrer" target="_blank">http://kamailio.org/docs/modules/5.2.x/modules/pua_reginfo.html#idm1031504764</a><br>
> pua_reginfo Module - <a href="http://kamailio.org" rel="noreferrer" target="_blank">kamailio.org</a><<a href="http://kamailio.org/docs/modules/5.2.x/modules/pua_reginfo.html#idm1031504764" rel="noreferrer" target="_blank">http://kamailio.org/docs/modules/5.2.x/modules/pua_reginfo.html#idm1031504764</a>><br>
> Keeping different Servers in Sync regarding the location database Get notified, when a user registers: A presence-server, which handles offline message storage for an account, would get notified, when the user comes online.<br>
> <a href="http://kamailio.org" rel="noreferrer" target="_blank">kamailio.org</a><br>
> <br>
> <br>
> Yasin CANER<br>
> <br>
> ________________________________<br>
> From: sr-users <<a href="mailto:sr-users-bounces@lists.kamailio.org" target="_blank">sr-users-bounces@lists.kamailio.org</a>> on behalf of Pali Rohár <<a href="mailto:pali.rohar@gmail.com" target="_blank">pali.rohar@gmail.com</a>><br>
> Sent: Wednesday, July 10, 2019 9:29 PM<br>
> To: <a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
> Subject: Re: [SR-Users] kamailio 4.4.4 fills IPv6 contact address when sending packet over IPv4<br>
> <br>
> Hi! Do you have any idea why Kamailio fills incorrect address into<br>
> Contact header? And how to avoid it?<br>
> <br>
> On Sunday 30 June 2019 23:11:22 Pali Rohár wrote:<br>
> > Hi!<br>
> ><br>
> > I detected strange problem that <a href="http://sip.linphone.org" rel="noreferrer" target="_blank">sip.linphone.org</a> refuse to accept<br>
> > presence information re-transmitted by kamailio 4.4.4 server.<br>
> ><br>
> > I debug this problem with tcpdump and I found out that problem is in<br>
> > kamailio which fills IPv6 address into UDP datagram and that datagram is<br>
> > sent via IPv4 socket to IPv4 address, to <a href="http://sip.linphone.org" rel="noreferrer" target="_blank">sip.linphone.org</a> server. And<br>
> > <a href="http://sip.linphone.org" rel="noreferrer" target="_blank">sip.linphone.org</a> server does not have IPv6 connectivity, so correctly<br>
> > return over IPv4 to sender just "400 Bad Contact Header" error.<br>
> ><br>
> > On my server is running kamailio 4.4.4 from Debian Stretch and I can<br>
> > 100% reproduce this problem against public <a href="http://sip.linphone.org" rel="noreferrer" target="_blank">sip.linphone.org</a> server.<br>
> ><br>
> > My server has both IPv4 and IPv6 connectivity and kamailio is listening<br>
> > for both IPv4 and IPv6 connections.<br>
> ><br>
> > So why is kamailio sending IPv6 address over IPv4 and therefore makes it<br>
> > impossible to communicate with non-IPv6 enabled servers? Looks like a<br>
> > problem with choosing default/correct socket for Contact header.<br>
> ><br>
> > And how to fix this problem? Can you help me? I would like to have<br>
> > working interconnection with linphone servers.<br>
> ><br>
> > Just to note I'm seeing this problem only for presence information<br>
> > packets. Other requests, like INVITE or MESSAGE seems to work.<br>
> ><br>
> > Below is relevant tcpdump output. Some parts were replaced by {VAR}.<br>
> ><br>
> > PS: I'm not subscribed to list, so please CC my address when sending<br>
> > reply. Thank you!<br>
> ><br>
> ><br>
> > 17:22:58.121719 IP (tos 0x10, ttl 64, id 21629, offset 0, flags [none], proto UDP (17), length 1266)<br>
> >     {MY_IPV4_ADDRESS}.5060 > 91.121.209.194.5060: [bad udp cksum 0xa099 -> 0x9825!] SIP, length: 1238<br>
> >         NOTIFY sip:{REMOTE_NAME}@{REMOTE_USER_IPV4_ADDRESS}:5060;registering_acc=sip_linphone_org SIP/2.0<br>
> >         Via: SIP/2.0/UDP {MY_IPV4_ADDRESS};branch=z9hG4bK2b55.88f93c20000000000000000000000000.0<br>
> >         To: <<a href="mailto:sip%3A%7BREMOTE_NAME%7D@sip.linphone.org" target="_blank">sip:{REMOTE_NAME}@sip.linphone.org</a>>;tag=75559182<br>
> >         From: <sip:{MY_SIP_URI}>;tag=97d8e785fdf42bf9622a64c13c504961-2708<br>
> >         CSeq: 2 NOTIFY<br>
> >         Call-ID: 26cf9d5c019af2dc3302b770887bcc2e@0:0:0:0:0:0:0:0<br>
> >         Route: <sip:91.121.209.194:5060;lr><br>
> >         Content-Length: 597<br>
> >         User-Agent: kamailio (4.4.4 (x86_64/linux))<br>
> >         Max-Forwards: 70<br>
> >         Event: presence<br>
> >         Contact: <sip:{MY_IPV6_ADDRESS}:5060;transport=udp><br>
> >         Subscription-State: active;expires=3600<br>
> >         Content-Type: application/pidf+xml<br>
> ><br>
> >         <?xml version="1.0" encoding="UTF-8"?><br>
> >         <presence xmlns="urn:ietf:params:xml:ns:pidf" xmlns:dm="urn:ietf:params:xml:ns:pidf:data-model" xmlns:rpid="urn:ietf:params:xml:ns:pidf:rpid" entity="Pali &lt;sip:{MY_SIP_URI}&gt;"><br>
> >         <tuple id="sg89ae"><br>
> >         <status><basic>open</basic></status><br>
> >         <contact priority="0.8">Pali &lt;sip:{MY_SIP_URI}&gt;</contact><br>
> >         </tuple><br>
> ><br>
> >           <tuple xmlns="urn:ietf:params:xml:ns:pidf" id="TA0C538B2"><br>
> >             <status><br>
> >               <basic>closed</basic><br>
> >             </status><br>
> >             <contact priority="1">sip:{MY_SIP_URI}</contact><br>
> >             <timestamp>2019-04-19T17:20:36+02:00</timestamp><br>
> >           </tuple><br>
> >         </presence><br>
> ><br>
> > 17:22:58.151188 IP (tos 0x0, ttl 52, id 22949, offset 0, flags [none], proto UDP (17), length 373)<br>
> >     91.121.209.194.5060 > {MY_IPV4_ADDRESS}.5060: [udp sum ok] SIP, length: 345<br>
> >         SIP/2.0 400 Bad Contact Header<br>
> >         Via: SIP/2.0/UDP {MY_IPV4_ADDRESS};branch=z9hG4bK2b55.88f93c20000000000000000000000000.0;rport=5060<br>
> >         From: <sip:{MY_SIP_URI}>;tag=97d8e785fdf42bf9622a64c13c504961-2708<br>
> >         To: <<a href="mailto:sip%3A%7BREMOTE_NAME%7D@sip.linphone.org" target="_blank">sip:{REMOTE_NAME}@sip.linphone.org</a>>;tag=75559182<br>
> >         Call-ID: 26cf9d5c019af2dc3302b770887bcc2e@0:0:0:0:0:0:0:0<br>
> >         CSeq: 2 NOTIFY<br>
> >         Content-Length: 0<br>
> ><br>
> ><br>
<br>
-- <br>
Pali Rohár<br>
<a href="mailto:pali.rohar@gmail.com" target="_blank">pali.rohar@gmail.com</a><br>
<br>
_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote></div></div>