Is it possible to control the callerid output when calling a client rather than a number?

278 views Asked by At

Using Twilio when calling a phone number one has to put a valid phone number as the caller id. However the documentation is sparse for the caller id when calling a mobile client. The Twml docs for callerid says:

If you are dialing a <Client>, you can also set a valid client identifier as the callerId attribute. For instance, if you’ve set up a client for incoming calls and you are dialing that client, you could set the callerId attribute to client:joey.

However, when I do this what the client sees in his caller id is the literal string 'client:joey'. What if I want the caller id to say 'joey' or 'Joey Joestar'?

What constitutes a 'valid client identifer'? Can I just set it to any string? or do I have to make a bunch of api calls or upfront settings changes to make that happen? (Is there any documentation on that system?)

1

There are 1 answers

0
Noah Park On BEST ANSWER

The client identity does not allow special characters or spaces, and the callerId has to be a valid client identity. Valid characters are a-Z0-9 and _. You could use a unique hash for a user or for example map a UUID and replace the hyphens with underscore.

You can add additional parameters to your <Dial> verb, these parameters are sent to the Client SDK and you can display them on an incoming call. In your example it would look like this if you call Alice and you want to display Joe's name.

<?xml version="1.0" encoding="UTF-8"?>
<Response>
  <Dial>
    <Client>
      <Identity>alice</Identity>
      <Parameter name="callerName" value="Joey Joestar"/>
    </Client>
  </Dial>
</Response>

https://www.twilio.com/docs/voice/how-share-information-between-your-applications#dialclient