<p>Hello, </p>

<p>I have found that topoh does not seem to operate correctly on <br>
locally-generated requests, such as dialog timeout-fired BYEs. </p>

<p>e.g. </p>

<p>Nov 17 17:20:16 centosity6 /usr/local/sbin/kamailio[10357]: INFO: <br>
[R-TM-LOCAL-REQUEST:1-4289383-6930886-1692777-3284@127.0.1.1] Local <br>
request BYE to sip:sipp@127.0.1.1:5060 <br>
Nov 17 17:20:16 centosity6 /usr/local/sbin/kamailio[10357]: INFO: <br>
[R-TM-LOCAL-REQUEST:1-4289383-6930886-1692777-3284@127.0.1.1] Local <br>
request BYE to sip:172.30.110.5:5060;transport=UDP <br>
Nov 17 17:20:16 centosity6 /usr/local/sbin/kamailio[10348]: ERROR: topoh <br>
[th_mask.c:165]: th_mask_decode(): invalid input <br>
string"1-4289383-6930886-1692777-3284@127.0.1.1" <br>
Nov 17 17:20:16 centosity6 /usr/local/sbin/kamailio[10348]: ERROR: topoh <br>
[th_msg.c:484]: th_unmask_callid(): cannot decode callid </p>

<p>You can see these BYEs are not TOPOH'd at all: </p>

<p>17:23:34.097128 IP 172.30.110.4.sip > 127.0.1.1.sip: SIP, length: 346 <br>
<a href="mailto:E..v....@">E..v....@</a>.?]..n..........b..BYE sip:sipp@127.0.1.1:5060 SIP/2.0 <br>
Via: SIP/2.0/UDP <br>
172.30.110.4;branch=z9hG4bK00ac.30df1375000000000000000000000000.0 <br>
To: sip:4916095083616@127.0.1.1:5060;tag=3287SIPpTag001 <br>
From: sip:17069950290@172.30.110.4:5060;tag=2117SIPpTag015 <br>
CSeq: 1 BYE <br>
Call-ID: 1-4289383-6930886-1692777-3287@127.0.1.1 <br>
Content-Length: 0 <br>
Max-Forwards: 70 </p>

<p>17:23:34.097239 IP 172.30.110.4.sip > 172.30.110.5.sip: SIP, length: 358 <br>
<a href="mailto:E.......@.V...n...n......n5.BYE">E.......@.V...n...n......n5.BYE</a> sip:172.30.110.5:5060;transport=UDP SIP/2.0 <br>
Via: SIP/2.0/UDP <br>
172.30.110.4;branch=z9hG4bKdf9c.08ed9677000000000000000000000000.0 <br>
To: sip:17069950290@172.30.110.4:5060;tag=2117SIPpTag015 <br>
From: sip:4916095083616@127.0.1.1:5060;tag=3287SIPpTag001 <br>
CSeq: 2 BYE <br>
Call-ID: 1-4289383-6930886-1692777-3287@127.0.1.1 <br>
Content-Length: 0 <br>
Max-Forwards: 70 </p>

<p>in contrast to the other messages in this dialog: </p>

<p>7:23:30.871062 IP 172.30.110.5.sip > 172.30.110.4.sip: SIP, length: 844 <br>
E..h!5@<a href="mailto:.@">.@</a>.. ..n...n......Th.SIP/2.0 200 OK <br>
Via: SIP/2.0/UDP <br>
172.30.110.4;branch=z9hG4bK00ac.127fd0993a0e4c8a82474038472e09d2.0, <br>
SIP/2.0/UDP <br>
172.30.110.4;branch=z9hG4bKsr-goq-nEDchKUa9vuehzD2nruchwxHmrgFJru63LarksqBks-Uhz3WnrhFnrPHhKxWmd9D0s97YrRS3LvcjBeUXrqi9E9SwWoEhre2nzPRhu** <br>
From: sipp sip:4916095083616@172.30.110.4;tag=3287SIPpTag001 <br>
To: 17069950290 sip:17069950290@172.30.110.4:5060;tag=2117SIPpTag015 <br>
Call-ID: CSEVhwoohreOhEeEnzjOhEuxmGjRhzjOhr32JWoEhre2-GPWJWxFnrPch-** <br>
Record-Route: <br>
sip:172.30.110.4;lr=on;ftag=3287SIPpTag001;fromcor=ejFwbUZxUmpUUFNBejFwbUZxUm9RUFBfZS5wZ111ZFo-;dlgcor=9c9.77a1 <br>
CSeq: 1 INVITE <br>
Contact: sip:172.30.110.5:5060;transport=UDP <br>
Content-Type: application/sdp <br>
Content-Length:   135 </p>

<p>v=0 <br>
o=user1 53655765 2353687637 IN IP4 172.30.110.5 <br>
s=- <br>
c=IN IP4 172.30.110.5 <br>
t=0 0 <br>
m=audio 6000 RTP/AVP 0 <br>
a=rtpmap:0 PCMU/8000 </p>

<p>Maybe this is not possible to fix because of where topoh intercepts the <br>
messages (transparently to the config script writer) in relation to how <br>
the TM API is used to generate spoof requests. I just thought I would <br>
report it.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br>Reply to this email directly or <a href="https://github.com/kamailio/kamailio/issues/15">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AF36ZascK8vDBIPmThENNd0iNspaKn_1ks5na7Q9gaJpZM4DMFow.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/15"></link>
    <meta itemprop="name" content="View Issue"></meta>
  </div>
  <meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>