[SR-Users] Via header line missing

Karlheinz Knapp kknapp66 at gmail.com
Thu Sep 6 17:52:21 CEST 2018


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 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 at sip.ggew-net.de>;tag=4236924539
To: "PhonerLite" <sip:4962519448281 at sip.ggew-net.de>
Call-ID: 8080BCAE-58B0-E811-A046-BB9F393B8BFE at 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 at 2A05
:E2C2:0:401:F40D:E8C5:5D85:2A95
CSeq: 1 REGISTER
From: "PhonerLite" <sip:4962519448281 at sip.ggew-net.de>;tag=4236924539
Server: Cirpack/v4.76 (gw_sip)
To: "PhonerLite" <sip:4962519448281 at 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
",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 at 2A05
:E2C2:0:401:F40D:E8C5:5D85:2A95
CSeq: 1 REGISTER
From: "PhonerLite" <sip:4962519448281 at sip.ggew-net.de>;tag=4236924539
Server: Cirpack/v4.76 (gw_sip)
To: "PhonerLite" <sip:4962519448281 at sip.ggew-net.de
>;tag=00-07683-7956ba80-5065f1a44
WWW-Authenticate: Digest realm="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 at 2A05
:E2C2:0:401:F40D:E8C5:5D85:2A95
CSeq: 1 REGISTER
From: "PhonerLite" <sip:4962519448281 at sip.ggew-net.de>;tag=4236924539
Server: Cirpack/v4.76 (gw_sip)
To: "PhonerLite" <sip:4962519448281 at 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
",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 at 2A05
:E2C2:0:401:F40D:E8C5:5D85:2A95
CSeq: 1 REGISTER
From: "PhonerLite" <sip:4962519448281 at sip.ggew-net.de>;tag=2618219059
Server: Cirpack/v4.76 (gw_sip)
To: "PhonerLite" <sip:4962519448281 at 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
",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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20180906/39ac1fa9/attachment.html>


More information about the sr-users mailing list