I&#39;m trying to integrate to an integrics enswitch, almost everything works like a charm, except on BYE packets as Kamailio in my setup forwards these incorrectly.<br><br>Digging somewhat I believe the culprit sits in the Route header which comes from the enswitch:<br>
<br>
Route: 
&lt;sip:their_sbc;lr=on;ftag=as5716fec8&gt;,&lt;sip:36d0a5cfbaeb6b055d5bb02c32127b49_32123456789@my_kamailio;lr=on;ftag=as5716fec8&gt;<br>
<br>Kamailio takes into account the first argument (the thing sip:their_sbc...) on which it cannot find the correct transaction. And forwards it back to the sender, instead of forwarding it correctly to my freeswitch. which gives a storm of traffic ;) <br>
<br>If I compare that with an ACK packet in the same transaction , having this as a Route header :<br><br>Route: &lt;sip:36d0a5cfbaeb6b055d5bb02c32127b49_32123456789@my_kamailio;lr=on;ftag=as5716fec8&gt;<br>

<br>Kamailio sends it along correctly.<br><br>IMHO if I could convince Kamailio to always take the last part of the Route header into account and ignore the first one it would correctly work. What would be a good approach? Rewriting the route header looks abit harsch. <br>
<br>disclaimer : I&#39;m not sure which component is disrespecting the RFC, if any, or if I just fully not get something :) <br><br>Short overview + packet detail (with some obfuscation):<br><br>My setup:<br><br>their_sbc ---  my_kamailio --- freeswitch --- my_kamailio --- enduser<br>
<br><br>BYE sip:05xxxxxx@my_kamailio:5060;transport=udp SIP/2.0<br>Record-Route: &lt;sip:their_sbc;lr=on;ftag=as5716fec8&gt;<br>Via: SIP/2.0/UDP their_sbc;branch=z9hG4bK1ae8.269e4f67.0<br>Via: SIP/2.0/UDP their_internals:5060;received=their_internals;branch=z9hG4bK4f9044a7;rport=5060<br>
Route: &lt;sip:their_sbc;lr=on;ftag=as5716fec8&gt;,&lt;sip:36d0a5cfbaeb6b055d5bb02c32127b49_32123456789@my_kamailio;lr=on;ftag=as5716fec8&gt;<br>Max-Forwards: 69<br>From: &quot;Some_Telecom&quot; &lt;sip:02xxxxxxxx@their_sbc&gt;;tag=as5716fec8<br>
To: &lt;sip:05xxxxxx@their_sbc:5060&gt;;tag=U3FrFDm5Zr0KF<br>Call-ID: 68fe6a470986bd087ce4ed860f603af6@their_sbc<br>CSeq: 103 BYE<br>User-Agent: Integrics Enswitch<br>X-Asterisk-HangupCause: Normal Clearing<br>X-Asterisk-HangupCauseCode: 16<br>
Content-Length: 0<br>X-Enswitch-RURI: sip:05xxxxxx@my_kamailio:5060;transport=udp<br>X-Enswitch-Source: their_internals:5060<br><br>BYE sip:36d0a5cfbaeb6b055d5bb02c32127b49_32123456789@my_kamailio;lr=on;ftag=as5716fec8 SIP/2.0<br>
Record-Route: &lt;sip:05xxxxxx@my_kamailio;lr=on;ftag=as5716fec8&gt;<br>Record-Route: &lt;sip:their_sbc;lr=on;ftag=as5716fec8&gt;<br>Via: SIP/2.0/UDP my_kamailio;branch=z9hG4bK1ae8.b4f95af2.0<br>Via: SIP/2.0/UDP my_kamailio;rport=5060;branch=z9hG4bK1ae8.a4f95af2.0<br>
Via: SIP/2.0/UDP their_sbc;rport=5060;branch=z9hG4bK1ae8.269e4f67.0<br>Via: SIP/2.0/UDP their_internals:5060;received=their_internals;branch=z9hG4bK4f9044a7;rport=5060<br>Route: &lt;sip:their_sbc;lr=on;ftag=as5716fec8&gt;<br>
Max-Forwards: 67<br>From: &quot;Some_Telecom&quot; &lt;sip:02xxxxxxxx@their_sbc&gt;;tag=as5716fec8<br>To: &lt;sip:05xxxxxx@their_sbc:5060&gt;;tag=U3FrFDm5Zr0KF<br>Call-ID: 68fe6a470986bd087ce4ed860f603af6@their_sbc<br>CSeq: 103 BYE<br>
User-Agent: Integrics Enswitch<br>X-Asterisk-HangupCause: Normal Clearing<br>X-Asterisk-HangupCauseCode: 16<br>Content-Length: 0<br>X-Enswitch-RURI: sip:05xxxxxx@my_kamailio:5060;transport=udp<br>X-Enswitch-Source: their_internals:5060<br>
<br><br>