SUPPORT.TWILIO.COM END OF LIFE NOTICE: This site, support.twilio.com, is scheduled to go End of Life on February 27, 2024. All Twilio Support content has been migrated to help.twilio.com, where you can continue to find helpful Support articles, API docs, and Twilio blog content, and escalate your issues to our Support team. We encourage you to update your bookmarks and begin using the new site today for all your Twilio Support needs.

Configuring Internal Caller ID Names on Twilio SIP Domain Calls

Issue

When using Twilio SIP Domains with SIP desk phones (such as Yealink), organizations often want internal calls to display a user-friendly name or extension (e.g., “100-Adam”) rather than a generic phone number. This article explains how Twilio handles caller ID for internal SIP-to-SIP calls and how to configure your system so that the correct information appears on the receiving phone.

By default, when making internal calls between SIP endpoints registered to a Twilio SIP Domain, the receiving phone may display the caller’s phone number (E.164 format) instead of the SIP username or a custom directory name. This can make it difficult for users to identify internal callers by name or extension.

 

Product

Programmable Voice

 

Environment

Twilio Console

 

Cause

This behavior is typically caused by the use of the callerId attribute in the TwiML <Dial> verb. When callerId is set to a phone number, Twilio uses this value in the SIP From header, which is then displayed by the receiving phone.

 

Resolution

To have the receiving phone display the SIP username (which can be mapped to a friendly name in the phone’s directory), follow these steps:

  1. Remove the callerId attribute from the <Dial> verb in your TwiML for internal SIP-to-SIP calls.
  2. Ensure your SIP phones’ directories are configured to map SIP usernames (e.g., “100”) to the desired display names (e.g., “100-Adam”).
  3. Test internal calls to confirm that the correct name or extension appears on the receiving phone.

Example TwiML for Internal SIP Call

<Response>
  <Dial>
    <Sip>sip:101@yourdomain.sip.twilio.com</Sip>
  </Dial>
</Response>

Do not include the callerId attribute for internal calls.

 

Troubleshooting

  • If the expected name does not appear, verify that the SIP username matches the entry in the phone’s directory.
  • Check your TwiML configuration to ensure callerId is not set for internal calls.
  • Review SIP logs to confirm the correct From header is being sent.

 

Additional Information

To display user-friendly names or extensions for internal SIP calls on Twilio SIP Domains, avoid setting the callerId attribute in your TwiML <Dial> verb. This allows the SIP username to be used, enabling the receiving phone to match it to a local directory entry and display the desired name.

  • For calls to the PSTN (external phone numbers), you may still want to set callerId to a valid E.164 number.
  • The display name shown on the receiving phone depends on both the SIP headers sent by Twilio and the local directory configuration on the phone.
Have more questions? Submit a request
Powered by Zendesk