<p></p>
<h3>Description</h3>
<p>Kamailio cannot parse Via header with full IPv6 address.<br>
And generate errors like</p>
<pre><code>ERROR: <core> [core/parser/msg_parser.c:340]: parse_headers(): bad header field [Via: SIP/2.0/TCP [2a00:1370:8131:ffdf:4398:8903:f613:58b6];branch=z9hG4bK02cc.edc691e200000000000000]
</code></pre>
<h4>SIP Traffic</h4>
<p>OPTIONS messages cannot be parsed</p>
<pre><code>OPTIONS sip:example.com:5080;transport=tcp SIP/2.0
Via: SIP/2.0/TCP [2a00:1370:8131:ffdf:4398:8903:f613:58b6];branch=z9hG4bK0241.2e5db116000000000000000000000000.0
To: <sip:example.com:5080;transport=tcp>
From: <sip:proxy@example.com>;tag=ecfe220eb77cee2ab0369a33b85d6b69-54b37dee
CSeq: 10 OPTIONS
Call-ID: 0d2146aa2a479f0d-2232@192.168.1.6
Max-Forwards: 70
Content-Length: 0
</code></pre>
<p>OPTIONS messages parsed successfully.</p>
<pre><code>OPTIONS sip:example.com.com:5080;transport=tcp SIP/2.0
Via: SIP/2.0/TCP [2600:1f1c:6d5:aa00::6];branch=z9hG4bK67a6.b0578ab2000000000000000000000000.0
To: <sip:example.com:5080;transport=tcp>
From: <sip:proxy@example.com>;tag=c9c2897ae0601f24edc14b3f5f65b7e4-02fff025
CSeq: 10 OPTIONS
Call-ID: 3555c29958953393-581752@3.101.84.6
Max-Forwards: 70
Content-Length: 0
</code></pre>
<h3>Additional Information</h3>
<p>compiled commit <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/kamailio/kamailio/commit/1483ddb735c3fa3ea77b6e2d54ec67584e56e15b/hovercard" href="https://github.com/kamailio/kamailio/commit/1483ddb735c3fa3ea77b6e2d54ec67584e56e15b"><tt>1483ddb</tt></a></p>
<ul>
<li><strong>Operating System</strong>:</li>
</ul>
<p>lsb_release -a</p>
<pre><code>[safarov@safarov-dell config]$ lsb_release -a
LSB Version: :core-4.1-amd64:core-4.1-noarch
Distributor ID: Fedora
Description: Fedora release 33 (Thirty Three)
Release: 33
Codename: ThirtyThree
</code></pre>
<p>uname -a</p>
<pre><code>[root@safarov-dell kamailio]# uname -a
Linux safarov-dell.home 5.14.9-100.fc33.x86_64 #1 SMP Thu Sep 30 12:45:49 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
</code></pre>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/issues/2898">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZPZWBPRAJY444ECRXLUIMLPRANCNFSM5GSUEBXA">unsubscribe</a>.<br />Triage notifications on the go with GitHub Mobile for <a href="https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675">iOS</a> or <a href="https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub">Android</a>.
<img src="https://github.com/notifications/beacon/ABO7UZM4NLVRZLVAJZU7W4LUIMLPRA5CNFSM5GSUEBXKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4PNFOSCQ.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/issues/2898",
"url": "https://github.com/kamailio/kamailio/issues/2898",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>