https://osmocom.org/https://osmocom.org/favicon.ico?16647414092020-01-09T09:21:33ZOpen Source Mobile Communicationsosmo-sip-connector - Bug #4310: sends BYE to selfhttps://osmocom.org/issues/4310?journal_id=171162020-01-09T09:21:33Zkeith
<ul></ul><p>If Kamailio (or rather rtpengine) is not involved in the RTP, then there is no reason for it to be involved in the BYE. Regardless of that, I'm 99% sure that this has to do with your kamailio setup, which is not inserting the headers that would require the SIP UA to route the ACK and BYE via the proxy.<br />I don't know if that's because of an omission in the config, or if with a default config kamailio is clever enough to figure out that SIP can reach SIP2 and it does not need to be involved in the ACK/BYE.</p>
<p>I've never seen this, but then my kamailio is multi-homed and SIP could never route directly to SIP2 (so in my case in fact this would break the BYE)</p>
<p>If rtpengine were involved, then you <strong>would</strong> want the proxy to see the BYE, as kamailio would instruct rtpengine to tear down the streams as a result of the BYE. (rtpengine will eventually detect lack of RTP and do so anyway, so no fatal harm done.)</p>
<p>BTW, did you know that kamailio is (mostly) stateless? - certain modules aside, it's just forwarding messages on a one by one basis without maintaining any concept of "call"</p>
<p>From a similar scenario; not a complete explanation, but does the accepted answer help?</p>
<p><em>EDIT: actually - I just noticed the link to this presentation on SIP routing: <a class="external" href="https://vimeo.com/140267478">https://vimeo.com/140267478</a> in the answer. I watched the first few minutes and it looks like a good 30 mins spent to not wonder anymore about Contact and Via and Route headers.</em></p>
<p><a class="external" href="https://stackoverflow.com/questions/57630610/how-do-i-ensure-that-bye-messages-bypass-a-sip-proxy">https://stackoverflow.com/questions/57630610/how-do-i-ensure-that-bye-messages-bypass-a-sip-proxy</a></p>
<p>I think this is certainly not a bug in osmo-sip-connector.</p>
<p>Dialog stuff is being handled by sofia-sip defaults anyway. <br />osmo-sip-connector is not explicitly doing any SIP header insertion.</p>