How to set outgoing calls from an identifier for Twilio Client (VoIP)?

Our application accepts phone calls or VoIP connections through the twilio.js client at our twilio endpoint. Phone calls are logged by the caller ID, but all VoIP connections are displayed as anonymous in the twilio call log, for example:

Date Direction From To Type Status Recording Duration XXYY Incoming Anonymous --- Client Completed --- 17 min 7 sec YYZZ Incoming Anonymous --- Client Completed --- 17 min 23 sec 

Is there a way to set the From field for outgoing (client-> twilio) calls? I looked through Twilio.Device.connect, as well as the capabilities token documents and could not find any hints.

+5
source share
3 answers

All this is connected with the ability marker step, a completely undocumented (and apparently unknown to Twilio) way.

In order for twilio logs to identify the VoIP endpoint that caused the conference, we had to bind the client ID to allow_client_incoming and make sure the ID was direct alphanumeric (for example, a dash in the line prevented the ID from entering).

In the step of creating a server-side token (ruby), it looks something like this:

  capability.allow_client_incoming sanitized_client_id 
+3
source

Twilio the evangelist is here.

When a client connects to your TwiML application endpoint, the From parameter, which is passed to the voice request URL, must be the name of the client.

If this voice request URL includes the verb <Dial> telling Twilio for an outgoing phone call and bridging it when a client calls, you can set the callerId parameter:

 <Dial callerId="+15555555555" /> 

Hope this helps.

+1
source

What worked for me was to set the clientName parameter in the OutgoingClientScope ability.

This is an example code in js:

 capability.addScope( new ClientCapability.OutgoingClientScope({ clientName: 'mike', applicationSid: 'AP...' }) ); 

None of the other answers worked for me.

0
source

Source: https://habr.com/ru/post/1214282/


All Articles