[Freeswitch-users] Resuming Verto

Michael Jerris mike at jerris.com
Tue May 29 21:13:31 UTC 2018

in jquery.verto.js:

        if (verto.options.sessid) {                                                                                                                             
            verto.sessid = verto.options.sessid;                                                                                                                
        } else {                                                                                                                                                
            verto.sessid = localStorage.getItem("verto_session_uuid") || generateGUID();                                                                        
            localStorage.setItem("verto_session_uuid", verto.sessid);                                                                                           

> On May 29, 2018, at 5:06 PM, Rick Jarvis <rick at magicmail.mooo.com> wrote:
> Thanks Mike. I wonder how a key/value store can report the correct state in that case? I realise this is beyond the scope of general Freeswitch stuff and more in the depths of coding, but if anyone has tackled this I'd love any pointers. I've looked through the Verto Communicator source and it didn't clue me up exactly (probably partly cos it's in Angular which I have no knowledge of)....
> On 29/05/2018 19:59, Michael Jerris wrote:
>> verto communicator stuffs the session id down in local storage for this.
>>> On May 29, 2018, at 2:29 PM, Rick Jarvis <rick at magicmail.mooo.com> wrote:
>>> My Verto app currently checks:
>>>     vertoHandle (to see if Verto has been initialised
>>>     currentCall.state.name (to see if a call is connected)
>>> The problem with this of course is that if the browser is refreshed, those variables are lost and my app is assuming it needs to reconnect (which often, due to the magic of Verto, it doesn't actually need to).
>>> So my question is how best to check the session (and call) states? Would, say, loading those variables into the browser's localstorage be a good method, or is there a better way of querying the current sates?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20180529/ccedf0f0/attachment.html>

More information about the FreeSWITCH-users mailing list