websocket - Taking Twilio calls in a new Popup window -


i facing scenario live twilio call gets dropped, if browser window in call received reloaded. there way overcome set-back without affecting live calls?

based on question, assume using twilio client javascript sdk? if indeed case, unfortunately, if page thats hosting sdk gets reloaded connection between browser , twilio drop since browser reloading everything, including javascript sdk.

there couple of different techniques can think of off top of head can use avoid page reloads, , idea recover call connection browser has dropped because of page reload. lot of going depend on specific app , experience trying create users.

so avoid having reload page:

1) use ajax requests server in order avoid page reloads. if page includes content form, or want update page content data form server, can using ajax requests server instead of normal full page postback submit form, or retrieve data form server. in avoiding having reload entire page in 2 scenarios.

2) use iframe host page content, , put twilio sdk in parent page (the 1 defined iframe). let reload content hosted in iframe, without having reload entire host page, avoiding reload the twilio library. downside communicating between content in iframe , host can messy fast.

neither of these 2 techniques fool-proof. user can hit refresh button on browser, , thats going cause connection drop.

in case page reloaded, , connection twilio browser gets dropped, 1 idea leverage twilios capability reconnect caller together. when user calls twilio phone number, instead of connecting them directly twilio client running in browser (by dialing ), instead dial caller , , have browser client connect same . benefit if browser disconnects, original caller won't hung on, still sitting in conference room. long you've saved conference sid or name, can have browser client reconnect conference.

hope helps point in right direction.

devin

disclosure: twilio employee


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -