<div dir="ltr">Hello!<div><br></div><div>I need help understanding how the <b>handle_ruri_alias()</b> function works.</div><div><b>Call-flow:</b> Upstream operator -> Kamailio Proxy -> Edpoint.</div><div><br></div><div>The upstream operator in the initial SIP INVITE in the Contact field sends us an alias parameter, in turn, our Kamailio Proxy adds its own too.<br></div><div>The Contact after the Proxy looks something like this:<br></div><div><br></div><div><i>Contact: <sip:10.0.0.115:5060;alias=10.0.0.115~5060~1;alias=3.3.3.3~5060~1></i><br></div><div><br></div><div>When the Endpoint sends us a SIP BYE, then the 

 <b>handle_ruri_alias()</b> absorbs not the last alias, but the first one, and this leads to the incorrect formation of a $du.<br></div><div>The RURI after the Proxy looks something like this:  <br></div><div><br></div><div><i>Request-Line: BYE sip:10.0.0.115:5060;alias=3.3.3.3~5060~1 SIP/2.0</i><br></div><div><br></div><div>The first thing that comes to mind is a modification of the original Contact field with storing it's within a dialogue ...<br></div><div><br></div><div>Is it possible to elegantly solve this problem?<br></div><div><br></div><div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><br><div><div>BR,</div><div>Denys Pozniak<br></div><div><br></div><div><br></div></div></div></div></div></div>