0

I'm using the Twilio Javascript Client SDK to allow users of our application to receive incoming calls through their browser. We have everything working well (ie: the call can be answered) if the user already has a browser tab open and receives an incoming call.

The use-case that we would like to support is this:

  1. The user has no browser open to our site
  2. An incoming call comes into our app and attempts to Dial the user (using their client ID)
  3. The user opens up their browser to our app
  4. The user sees the incoming call and answers it

I've tested this scenario and it doesn't appear to work. When the browser is opened and an incoming call is already ringing, the user is not presented our call dialog (which is triggered by the Twilio.Device.incoming event).

So my question is: Is this use-case possible to implement? Is there a setting that needs to be enabled, or is this something that cannot happen because we missed the initial incoming event?

Thanks for any help!

siannopollo
  • 1,464
  • 11
  • 24
  • This seems to me like an edge case that could be handled better a different way. For example, if you were to record the current status of your user in the system using [TaskRouter](https://www.twilio.com/docs/api/taskrouter) then you would be able to route calls to users who were currently logged in and idle rather than routing calls to a user who is not in a position to answer them. Does that make sense at all? – philnash Nov 14 '18 at 02:20
  • @philnash For this use-case, it's not really a matter of the user being available vs. unavailable since we assume the user is always available. It's more that when the call first comes in we do something like a push notification (or some other 3rd party way of notifying them) to inform the user of a new call. _Then_, the user logs into the app and tries to take the call. – siannopollo Nov 14 '18 at 17:06
  • In that case, I would likely put the caller into a queue with `` and then when the user connects after logging in have them dial into the `` to connect the calls. – philnash Nov 14 '18 at 22:01

1 Answers1

0

My .02, to achieve this a desktop app would be needed. It could be a simple web-wrapper though. Create an app that wraps a browser and have that user login. When a call comes in the app would receive it because the user WAS logged in. Your user wouldn't interact with your webapp through the desktop app, but I don't think that would be a problem given your use-case.