We would like inbound calls to display both a display name and the phone number on our phone displays. For calls coming from Twilio, the Dial verb has a CallerID attribute, but that doesn't result in the SIP From header being formed correctly.
Our OnSIP hosted PBX needs the SIP header to look something like this:
From: "Display Name" <sip:[email protected]>
If I just put in a phone number in the callerId attribute like this:
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Dial timeout="90" callerId="3605551212">
<Sip>sip:[email protected]</Sip>
</Dial>
</Response>
then the SIP From header looks like this:
From: "+13605551212" <sip:[email protected]>
I want to replace the number in quotes with a display name, generated from the CallerName field from Twilio's caller ID lookup.
Does the Twilio Dial verb or SIP noun provide a way to form the SIP From header in this way?