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.

Error 403 “Forbidden” During SIP Registration on Regional SIP Domains

Issue

When attempting SIP Registration with a PBX on Twilio using a regional SIP domain that was created via the API, you may encounter a 403 Forbidden error without receiving a 401 Unauthorized digest authentication challenge.

 

Product

Twilio Programmable Voice, SIP Domains

 

Cause

The underlying cause is that when regional SIP domains are created via the API, the inbound processing region is not automatically configured to match the region in which the domain is created. As a result, SIP Registration requests are blocked before authentication. This routing must be explicitly set after domain creation.

 

Resolution

To resolve the issue:

  1. After creating your regional SIP domain (e.g., a domain in the IE1 region ) via the API, update the SIP Domain Routing to the correct region using the Inbound Processing Region API.
curl -X POST "https://routes.twilio.com/v2/SipDomains/example.sip.twilio.com" \
--data-urlencode "VoiceRegion=ie1" \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
  1. Once routing is updated, SIP Registration should work as expected and the domain will respond with a 401 challenge for authentication.

 

Additional Information

 

Have more questions? Submit a request
Powered by Zendesk