[SR-Users] Terminate dialogs on [websocket:closed]
mayamatakeshi at gmail.com
Tue Feb 9 23:37:26 CET 2016
I am using module websocket and it works very well.
However I would like to send BYE to the other end if event
>From the docs I can see websocket module itself doesn't provide for this.
I was considering doing something like this:
- use module htable to match $si:$sp to dialogs
- use event_route[dialog:start] to insert dialog info to my htable under
$si:$sp of Websocket side of the call
- use event_route[dialog:end] to remove dialog info from htable
- use event_route[websocket:closed] to iterate over entries in the htable
under key $si:$sp and call dlg_get() and dlg_bye().
Obs: in the above, there is a risk of losing some dialogs as insertion in
htable cannot be done atomically, but I am fine with it as it it not
expected to happen as WebSocket users would only infrequently generate
However before going with this, I would like to ask for other possible
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the sr-users