<h3>Description</h3>
<p>Captured sip on a server using Captagent, when using UDP the destination_ip is parsed from the message itself when using TCP the destination_ip and destination_port is of the server running Kamailio.</p>
<h3>Troubleshooting</h3>
<h4>Reproduction</h4>
<p>Sipcapture using Kamailio on TCP</p>
<h4>SIP Traffic</h4>

<pre><code>T 10.203.134.187:10398 -> 10.203.134.194:9060 [AP]
HEP3.@...................................
Z&.....
.
................
.........

........

.........myhep......SIP/2.0 487 Request cancelled.
Via: SIP/2.0/UDP 10.203.134.187;received=10.203.134.187;rport=5060;branch=z9hG4bKUgUv1StZ9HmgF.
From: "bal bal" <sip:17325559837@10.203.134.187>;tag=ZSNe61tKX2gFp.
To: <sip:VH111@call.net>;tag=eee99bc01afb99338debc1f2a2cfb1a1-c5c8.
Call-ID: 3ed76454-5479-1236-b8a0-0688e01b7b70.
CSeq: 115908963 INVITE.
Server: OpenSIPS (2.2.5 (x86_64/linux)).
Content-Length: 0.
.

##```

### Possible Solutions

<!--
If you found a solution or workaround for the issue, describe it. Ideally, provide a pull request with a fix.
-->
</code></pre>
<p>Using the parsed header, something like: $var(dstip) = $hep(0x004);</p>
<pre><code>### Additional Information

  * **Kamailio Version** - output of `kamailio -v`

</code></pre>
<p>version: kamailio 5.2.0-dev0 (x86_64/linux)</p>
<pre><code>
* **Operating System**:

<!--
Details about the operating system, the type: Linux (e.g.,: Debian 8.4, Ubuntu 16.04, CentOS 7.1, ...), MacOS, xBSD, Solaris, ...;
Kernel details (output of `uname -a`)
-->

</code></pre>
<p>Debian 8.4</p>
<pre><code></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/1353">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AF36ZW1WsR99_ZqmNi5trzMlkgaRz09_ks5s9WvugaJpZM4Q2jRM">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AF36ZUlbEIA4-jo0LaF_4a_OkWsQohn3ks5s9WvugaJpZM4Q2jRM.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/kamailio/kamailio/issues/1353"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>

<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/kamailio/kamailio","title":"kamailio/kamailio","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/kamailio/kamailio"}},"updates":{"snippets":[{"icon":"DESCRIPTION","message":"TCP HEP3 Parsing (#1353)"}],"action":{"name":"View Issue","url":"https://github.com/kamailio/kamailio/issues/1353"}}}</script>