Hello,
kamailio adds only outbound address in in a new single Via header, being
required by the next hop to send the reply back o kamailio. However, the
full Via stack has to be sent back in the reply, but the registrar
doesn't do it.
Based on the server header in reply, it is a Cirpack and it seems that
it doesn't support IPv6 at all, not even in parsing and just mirroring
required headers, because it doesn't sent back the Via with IPv6
addresses. For routing, it would need only ipv4.
Overall, this has nothing to do with kamailio and no matter what version
of kamailio you use, it will be the same behavior. Maybe you can ask the
provider of registrar about ipv6.
Cheers,
Daniel
On 06.09.18 17:52, Karlheinz Knapp wrote:
Hi,
of course kamailio is listening on IPv4 and IPv6.
Register coming from IPv6 and goes out on IPv4:
REGISTER sip:sip.ggew-net.de <http://sip.ggew-net.de> SIP/2.0
Via: SIP/2.0/UDP
217.113.176.155;branch=z9hG4bK98fc.314c428d232717f129932376c83e2c02.0
Via: SIP/2.0/UDP
[2A05:E2C2:0:401:F40D:E8C5:5D85:2A95]:5060;received=2A05:E2C2:0:401:F40D:E8C5:5D85:2A95;branch=z9hG4bK001755af58b0e811a048bb9f393b8bfe;r
rt=5060
From: "PhonerLite" <sip:4962519448281@sip.ggew-net.de
<mailto:sip%3A4962519448281@sip.ggew-net.de>>;tag=4236924539
To: "PhonerLite" <sip:4962519448281@sip.ggew-net.de
<mailto:sip%3A4962519448281@sip.ggew-net.de>>
Call-ID:
8080BCAE-58B0-E811-A046-BB9F393B8BFE@2A05:E2C2:0:401:F40D:E8C5:5D85:2A95
CSeq: 1 REGISTER
Contact:
<sip:4962519448281@[2A05:E2C2:0:401:F40D:E8C5:5D85:2A95]:5060>;+sip.instance="<urn:uuid:00E0F96C-5BAF-E811-A877-86B14B4F5249>"
Allow: INVITE, ACK, BYE, CANCEL, INFO, MESSAGE, NOTIFY, OPTIONS,
REFER, UPDATE, PRACK
Max-Forwards: 69
Allow-Events: org.3gpp.nwinitdereg
User-Agent: SIPPER for PhonerLite
Supported: replaces, from-change, gruu
Expires: 900
Content-Length: 0
P-hint: outbound
Answer on IPv4:
SIP/2.0 401 Unauthorized
Call-ID:
8080BCAE-58B0-E811-A046-BB9F393B8BFE@2A05:E2C2:0:401:F40D:E8C5:5D85:2A95
CSeq: 1 REGISTER
From: "PhonerLite" <sip:4962519448281@sip.ggew-net.de
<mailto:sip%3A4962519448281@sip.ggew-net.de>>;tag=4236924539
Server: Cirpack/v4.76 (gw_sip)
To: "PhonerLite" <sip:4962519448281@sip.ggew-net.de
<mailto:sip%3A4962519448281@sip.ggew-net.de>>;tag=00-07683-7956ba80-5065f1a44
Via: SIP/2.0/UDP
217.113.176.155;received=217.113.176.155;rport=5060;branch=z9hG4bK98fc.314c428d232717f129932376c83e2c02.0
WWW-Authenticate: Digest realm="sip.ggew-net.de
<http://sip.ggew-net.de>",nonce="7956b03f7acf80ba100f00e723284f58",opaque="7950c9065c0c955",stale=false,algorithm=MD5
Content-Length: 0
The same answer on th IPv6 side after kamailio without something special:
SIP/2.0 401 Unauthorized
Call-ID:
8080BCAE-58B0-E811-A046-BB9F393B8BFE@2A05:E2C2:0:401:F40D:E8C5:5D85:2A95
CSeq: 1 REGISTER
From: "PhonerLite" <sip:4962519448281@sip.ggew-net.de
<mailto:sip%3A4962519448281@sip.ggew-net.de>>;tag=4236924539
Server: Cirpack/v4.76 (gw_sip)
To: "PhonerLite" <sip:4962519448281@sip.ggew-net.de
<mailto:sip%3A4962519448281@sip.ggew-net.de>>;tag=00-07683-7956ba80-5065f1a44
WWW-Authenticate: Digest realm="sip.ggew-net.de
<http://sip.ggew-net.de>",nonce="7956b03f7acf80ba100f00e723284f58",opaque="7950c9065c0c955",stale=false,algorithm=MD5
Content-Length: 0
It contains no Via header!!!
If I add my append_hf()
append_hf("Via: SIP/2.0/UDP
[2a05:e2c1:2::111];branch=$sel(via[1].branch);rport=5060\r\n", "To");
msg_apply_changes();
I get:
SIP/2.0 401 Unauthorized
Call-ID:
8080BCAE-58B0-E811-A046-BB9F393B8BFE@2A05:E2C2:0:401:F40D:E8C5:5D85:2A95
CSeq: 1 REGISTER
From: "PhonerLite" <sip:4962519448281@sip.ggew-net.de
<mailto:sip%3A4962519448281@sip.ggew-net.de>>;tag=4236924539
Server: Cirpack/v4.76 (gw_sip)
To: "PhonerLite" <sip:4962519448281@sip.ggew-net.de
<mailto:sip%3A4962519448281@sip.ggew-net.de>>;tag=00-07683-7956ba80-5065f1a44
Via: SIP/2.0/UDP
217.113.176.155;received=217.113.176.155;rport=5060;branch=z9hG4bK98fc.314c428d232717f129932376c83e2c02.0
WWW-Authenticate: Digest realm="sip.ggew-net.de
<http://sip.ggew-net.de>",nonce="7956b03f7acf80ba100f00e723284f58",opaque="7950c9065c0c955",stale=false,algorithm=MD5
Content-Length: 0
With the original Via header !!!
If I add a second Via with append_hf()
append_hf("Via: SIP/2.0/UDP
[2a05:e2c2:0:401:3002:AA:754A:F475]:5060;rport\r\n", "To");
append_hf("Via: SIP/2.0/UDP
[2a05:e2c1:2::111];branch=$sel(via[1].branch);rport=5060\r\n", "To");
msg_apply_changes();
I can see this additional line in the IPv6 packet too.
SIP/2.0 401 Unauthorized
Call-ID:
0038C332-5AB0-E811-ABC9-80F5AA6CB72C@2A05:E2C2:0:401:F40D:E8C5:5D85:2A95
CSeq: 1 REGISTER
From: "PhonerLite" <sip:4962519448281@sip.ggew-net.de
<mailto:sip%3A4962519448281@sip.ggew-net.de>>;tag=2618219059
Server: Cirpack/v4.76 (gw_sip)
To: "PhonerLite" <sip:4962519448281@sip.ggew-net.de
<mailto:sip%3A4962519448281@sip.ggew-net.de>>;tag=00-07871-795b4386-0dc31d606
Via: SIP/2.0/UDP
[2a05:e2c1:2::111];branch=z9hG4bK0ce8.b94e5d3389049004487a8551ac2c8c41.0;rport=5060
Via: SIP/2.0/UDP
217.113.176.155;received=217.113.176.155;rport=5060;branch=z9hG4bK0ce8.b94e5d3389049004487a8551ac2c8c41.0
WWW-Authenticate: Digest realm="sip.ggew-net.de
<http://sip.ggew-net.de>",nonce="795b3345266c3dd57a52e3237f4276dd",opaque="7950c9065c0c955",stale=false,algorithm=MD5
Content-Length: 0
But since I don't have the right branch, PhonerLite starts a new
registration instead of reregister with username password.
Best regards
_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users(a)lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
--
Daniel-Constantin Mierla --
www.asipto.com
www.twitter.com/miconda --
www.linkedin.com/in/miconda
Kamailio World Conference --
www.kamailioworld.com
Kamailio Advanced Training, Nov 12-14, 2018, in Berlin --
www.asipto.com