<HTML><BODY><p>Hi All,<br><br></p><pre style="white-space: pre-wrap;" data-mce-style="white-space: pre-wrap;">I have system setup where there are few Asterisk servers behind Kamailio. Everything is working properly, the issue only is with the Incoming Subscribe's with to-tag from endpoints.</pre><p>Below you can see the invite:<br>----------------------------------------------------------------------------------------------------------<br>2017/09/27 19:40:29.995598 192.168.2.33:5060 -> 10.25.23.1:5060<br>SUBSCRIBE sip:10000211@10.25.23.1 SIP/2.0 <br>Via: SIP/2.0/UDP 192.168.2.33:5060;branch=z9hG4bK-fc65f67d<br>From: "Cisco" <sip:211@10.25.23.1>;tag=258a856c69c288<br>To: <sip:10000211@10.25.23.1>;<strong>tag=02cca2b6-1d9b-4edc-b1de-fdd78f8f9ab0</strong><br>Call-ID: 4ce04a70-6128897b@192.168.2.33<br>CSeq: 1003 SUBSCRIBE<br>Max-Forwards: 70<br>Route: <sip:10.25.23.1;lr;r2=on;ftag=258a856c69c288;nat=yes>, <sip:10.1.1.101;lr;r2=on;ftag=258a856c69c288;nat=yes> <br>Proxy-Authorization: Digest username="211",realm="10.25.23.1",nonce="Wcvq0VnL6aUbQ3c+nZa5xbh8KMVoOwAq",uri="sip:10000211@10.25.23.1",algorithm=MD5,response="155f68d66b3c6ad035f7db1ec5732020"<br>Contact: "Cisco" <sip:211@192.168.2.33:5060><br>Accept: application/dialog-info+xml<br>Expires: 1800<br>Event: dialog<br>User-Agent: Cisco/SPA504G-7.6.2<br>Content-Length: 0<br>----------------------------------------------------------------------------------------------------------<br><br>Receiving such Invite Kamailio are routing to RELAY route (from WITHINDLG) and showing such error:<br><strong>ERROR: rr [loose.c:107]: find_first_route(): failed to parse Route HF<br><br></strong>It seems that Kamailio cannot find such Dialog, but why is happening? where is it destroyed?<br>How can i solve this?<br><br>Route (WITHINDLG) is as default, below you can see it as well. <br></p><p>-----------------------------------------------------------------------------------------------------------<br>route[WITHINDLG] {<br> if (!has_totag()) return;<br><br>if (loose_route()) {</p><p> if ( is_method("ACK") ) {<br>route(NATMANAGE);<br> }</p><p>route(RELAY);<br> } else {<br> if (is_method("SUBSCRIBE") && uri == myself) {<br>route(PRESENCE);<br> exit;<br> }<br> if ( is_method("ACK") ) {<br> if ( t_check_trans() ) {<br>t_relay();<br> exit;<br> } else {<br>exit;<br> }<br> }<br> sl_send_reply("404","Not here");<br> }<br> exit;<br>}<br>-----------------------------------------------------------------------------------------------------------<br><br>Thank You.</p></BODY></HTML>