Hi guys, how do I properly tear down a Verto object in JS to make sure the associated socket is closed?
var myverto = new $.verto({yada: yada}); myverto.hangup(); // hangup all active calls myverto.purge(); // probably not necessary but doesn't hurt. Cleans out table internally. myverto.logout(); // Disconnect WebSocket On Mon, Sep 19, 2016 at 4:26 PM, Oleg Stolyar <olegstolyar@gmail.com> wrote:
Hi guys,
how do I properly tear down a Verto object in JS to make sure the associated socket is closed?
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Anthony Minessale II ♬ @anthmfs ♬ @FreeSWITCH ♬ ☞ http://freeswitch.org/ ☞ http://cluecon.com/ ☞ http://twitter.com/FreeSWITCH ☞ irc.freenode.net #freeswitch ☞ *http://freeswitch.org/g+ <http://freeswitch.org/g+>* ClueCon Weekly Development Call ☎ sip:888@conference.freeswitch.org ☎ +19193869900 https://www.youtube.com/watch?v=9XXgW34t40s https://www.youtube.com/watch?v=NLaDpGQuZDA
Thanks! If I want to do this every time a call ends, is there a good event for it? I tried it in "destroy" but that resulted in an infinite loop. If I put it in "hangup" without the hangup() method - just purge() and logout(), it works but there is an error that's probably harmless but ideally I'd like to avoid it. verto-min.js:85 Uncaught DOMException: Failed to execute 'close' on 'RTCPeerConnection': The RTCPeerConnection's signalingState is 'closed'.(…) On Mon, Sep 19, 2016 at 4:44 PM, Anthony Minessale < anthony.minessale@gmail.com> wrote:
var myverto = new $.verto({yada: yada});
myverto.hangup(); // hangup all active calls
myverto.purge(); // probably not necessary but doesn't hurt. Cleans out table internally.
myverto.logout(); // Disconnect WebSocket
On Mon, Sep 19, 2016 at 4:26 PM, Oleg Stolyar <olegstolyar@gmail.com> wrote:
Hi guys,
how do I properly tear down a Verto object in JS to make sure the associated socket is closed?
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Anthony Minessale II ♬ @anthmfs ♬ @FreeSWITCH ♬
☞ http://freeswitch.org/ ☞ http://cluecon.com/ ☞ http://twitter.com/FreeSWITCH ☞ irc.freenode.net #freeswitch ☞ *http://freeswitch.org/g+ <http://freeswitch.org/g+>*
ClueCon Weekly Development Call ☎ sip:888@conference.freeswitch.org ☎ +19193869900
https://www.youtube.com/watch?v=9XXgW34t40s https://www.youtube.com/watch?v=NLaDpGQuZDA
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Hi Tony, any suggestion on where to call the purge and logout after a call ends? When I call it before making the next call, it works fine but that means that the old socket will hang around and stay connected (and constantly reconnecting of the connection is lost) until the next call. I'd rather avoid that. BTW, that error I see when I call purge and logout from the hangup event is not actually harmless. It results in the hangup not properly happening. On Mon, Sep 19, 2016 at 6:02 PM, Oleg Stolyar <olegstolyar@gmail.com> wrote:
Thanks!
If I want to do this every time a call ends, is there a good event for it? I tried it in "destroy" but that resulted in an infinite loop.
If I put it in "hangup" without the hangup() method - just purge() and logout(), it works but there is an error that's probably harmless but ideally I'd like to avoid it.
verto-min.js:85 Uncaught DOMException: Failed to execute 'close' on 'RTCPeerConnection': The RTCPeerConnection's signalingState is 'closed'.(…)
On Mon, Sep 19, 2016 at 4:44 PM, Anthony Minessale < anthony.minessale@gmail.com> wrote:
var myverto = new $.verto({yada: yada});
myverto.hangup(); // hangup all active calls
myverto.purge(); // probably not necessary but doesn't hurt. Cleans out table internally.
myverto.logout(); // Disconnect WebSocket
On Mon, Sep 19, 2016 at 4:26 PM, Oleg Stolyar <olegstolyar@gmail.com> wrote:
Hi guys,
how do I properly tear down a Verto object in JS to make sure the associated socket is closed?
____________________________________________________________ _____________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Anthony Minessale II ♬ @anthmfs ♬ @FreeSWITCH ♬
☞ http://freeswitch.org/ ☞ http://cluecon.com/ ☞ http://twitter.com/FreeSWITCH ☞ irc.freenode.net #freeswitch ☞ *http://freeswitch.org/g+ <http://freeswitch.org/g+>*
ClueCon Weekly Development Call ☎ sip:888@conference.freeswitch.org ☎ +19193869900
https://www.youtube.com/watch?v=9XXgW34t40s https://www.youtube.com/watch?v=NLaDpGQuZDA
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
participants (2)
-
Anthony Minessale
-
Oleg Stolyar