<div dir="ltr"><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">Hello, I’ve been experiencing a situation with Proto WSS. The scenario is very simple. A call is established from an Asterisk Box to Opensips (UDP) and finally a SipJs7.8 (WSS). Everything works great and we are able to register using mid registrar and pass calls thru. </div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">When an agent puts the call on hold a reinvite is correctly negotiated and the call is placed on hold and viceversa.   However!, if the originating caller disconnects the call while still on hold, Asterisk will correctly terminate the dialog with a Bye but when OpenSIPs will complain about not finding a suitable tcp connection and responds with a 477 even after successfully matching and processing the dialog termination correctly. </div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">opensipsctl fifo list_tcp_conns  shows the connection available. <br></div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">The only way I found of fixing this problem is by adding fix_route_dialog() on the sequential loose route. </div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif"><div class="gmail_default"><span style="white-space:pre-wrap">       </span>if (loose_route()) {<span style="white-space:pre-wrap">            </span></div><div class="gmail_default"><span style="white-space:pre-wrap">         </span>if (is_method("BYE")) {<span style="white-space:pre-wrap">                       </span></div><div class="gmail_default">                        if (!validate_dialog()){</div><div class="gmail_default">                              fix_route_dialog();</div><div class="gmail_default">                        }</div></div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">What do you guys think? <br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">Am I messing up something in the script or is this the correct way to address this problem? </div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">The funny thing is that there is no difference notable between the bye after hold and a regular bye without putting the call on hold. <br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">Here is the opensips log with the error and the trace. </div><div class="gmail_default"><div class="gmail_default"><font face="tahoma, sans-serif"><br></font></div><div class="gmail_default"><a href="https://pastebin.com/BEJ6fAR8" target="_blank">https://pastebin.com/BEJ6fAR8</a><br></div><div class="gmail_default"><br></div><div class="gmail_default"><font face="tahoma, sans-serif">Thanks ! </font></div><div class="gmail_default"><font face="tahoma, sans-serif"><br></font></div></div></div>