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:
- 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- Once routing is updated, SIP Registration should work as expected and the domain will respond with a 401 challenge for authentication.
Additional Information