Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set the From identifier for Twilio Client (VoIP) outgoing calls?

Our application accepts phone calls or VoIP connections via the twilio.js client into our twilio endpoint. Phone calls are logged by caller ID, but VoIP connections all appear as Anonymous in the twilio call log, e.g.:

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? Looked through Twilio.Device.connect as well as the capability token docs and couldn't find any hints.

like image 971
mygzi Avatar asked Feb 26 '15 23:02

mygzi


1 Answers

It all ties into the capability token step, in a completely undocumented (and apparently unknown to Twilio themselves) manner.

In order to get the twilio logs to identify the VoIP endpoint that called into a conference, we had to bind the client ID to the allow_client_incoming capability, and make sure the ID was a straight alphanumeric (e.g. dashes in the string prevented the ID from coming through).

In our server side (ruby) token generation step, it looks something like this:

    capability.allow_client_incoming sanitized_client_id
like image 116
mygzi Avatar answered Sep 24 '22 20:09

mygzi