<div dir="ltr">Hello,<div><br></div><div>I think the only way to do this would be to use the dialog module.  However, as far as I know the appropriate dialog function (dlg_bye) needs to be run from a route where the SIP message is within the dialog in question.</div>
<div><br></div><div>In other words, there is no way you could run this from event_route[websocket:closed] because even if you were able to to store the information required to identify the (potentially multiple dialogs) relating to the WebSocket connection (perhaps in a hash-table) you can't actually do anything with these dialogs from there.</div>
<div><br></div><div>If this really is a requirement I suspect you're going to need to make some enhancements to the dialog module.  Alternatively, you can take advantage of the GRUU and outbound support in Kamailio git master which should allow calls to survive WebSocket connection close and re-establishment.</div>
<div><br></div><div>Regards,</div><div><br></div><div>Peter</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 13 June 2013 10:58, Iwan Budi Kusnanto <span dir="ltr"><<a href="mailto:ibk@labhijau.net" target="_blank">ibk@labhijau.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Related to 'Doing automatic unregister when a WEBSOCKET connection is<br>
closed' thread.<br>
<a href="http://sip-router.1086192.n5.nabble.com/Doing-automatic-unregister-when-a-WEBSOCKET-connection-is-closed-td118083.html" target="_blank">http://sip-router.1086192.n5.nabble.com/Doing-automatic-unregister-when-a-WEBSOCKET-connection-is-closed-td118083.html</a><br>

<br>
Any hint to implement automatic call termination when websocket<br>
connection is closed?<br>
<br>
Some of my ideas:<br>
1. send BYE message from UAC module. Looks like it is an unnecessary<br>
complex & dirty solution.<br>
2. Utilizing dialog module, but i'm not sure if dialog module can be<br>
used to implement this.<br>
<br>
Any better idea?<br>
<br>
Thanks.<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Iwan Budi Kusnanto<br>
<br>
_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr"><div><font face="courier new, monospace">Peter Dunkley</font></div><div><font face="courier new, monospace">Technical Director</font></div>
<div><font face="courier new, monospace">Crocodile RCS Ltd</font></div></div>
</div>