'Twilio programmable voice, how to know from which platform the call was accepted
Consider the following code
Device.on('incoming', call => call.accept());
How do I add info fields like "platform" to know from which the call was answered. I have electron application, web application and native application all doing the same, I need to know from which device the call was accepted.
update
I did think about a solution which is to register the devices across all the platforms with different ids instead of the same one to represent the platform, and then make sure we dial to 3 <client> instead of one.Is this is the way to go with it?
Solution 1:[1]
Twilio developer evangelist here.
You can't add any extra metadata to the call object itself.
Your idea to set up your clients with different identities and then fan out the calls to them with multiple <Client> elements inside the <Dial> would certainly work.
Alternatively, I would suggest you store the metadata about the call in your own database.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | philnash |
