Hi everyone,
I’m experiencing a persistent SIP 403 Forbidden error when making outbound calls through a custom SIP trunk with an Asterisk-based carrier. The error occurs after successful authentication, and I’ve exhausted troubleshooting options on both sides.
Issue Summary
- Error:
SIP status code: 403, telephony_provider_permission_denied - Carrier: Asterisk-based (European provider)
- Reproducibility: 100% - every outbound call fails
SIP Flow (from PCAP analysis)
1. Retell → Carrier: INVITE (no credentials)
2. Carrier → Retell: 401 Unauthorized (requests auth)
3. Retell → Carrier: ACK
4. Retell → Carrier: INVITE (with SIP Digest credentials)
5. Carrier → Retell: 403 Forbidden ❌
6. Retell → Carrier: ACK
Authentication works (401 → retry with creds), but the 403 comes after successful auth, not another 401.
Carrier Configuration (verified by their team)
Attempted configs (both failed):
Config A (host=sip.retellai.com):
type=friend
host=sip.retellai.com
username=[username]
secret=[password]
context=outbound_context
allow=alaw
Result: 403 Forbidden
Config B (host=dynamic):
type=friend
host=dynamic
insecure=port,invite
username=[username]
secret=[password]
context=outbound_context
allow=alaw
permit=18.98.16.120/30
permit=143.223.88.0/21
permit=161.115.160.0/19
Result: 403 Forbidden
Important: With host=dynamic, the trunk shows as active/online in Asterisk (sip show peer confirms connection), but calls still fail with 403.
Carrier confirms:
Peer is active
Context has outbound dial permissions
Credentials match
Network connectivity verified (ping successful)
Firewall disabled during testing
Retell Configuration
Phone Number: [European DID]
Termination URI: sip:[carrier_ip]:5060
Username: [carrier_provided_username]
Password: [carrier_provided_password]
Transport: UDP
Multiple DIDs assigned (rotate as caller ID for outbound calls)
PCAP Details
From PCAP analysis:
Authorization: Digest
username="[username]"
realm="asterisk"
algorithm=MD5
From: <sip:[caller_id]@5t4n6j0wnrl.sip.livekit.cloud:9000>
To: <sip:[destination]@[carrier_ip]>
The authentication challenge-response works correctly (MD5 hash validates), but the carrier rejects with 403 after accepting credentials.
Questions
-
Is there anything non-standard in Retell’s SIP INVITE that could cause Asterisk to reject with 403 after accepting credentials?
-
Are there known compatibility issues with Asterisk carriers using
type=friend + host=dynamic + insecure=port,invite? -
Could the From domain (
5t4n6j0wnrl.sip.livekit.cloud) be causing issues? Should it match the carrier’s domain? -
Do custom SIP headers (X-RetellAI-CallId, X-RetellAI-Direction, etc.) trigger ACL/permission denials in some Asterisk configs?
-
Has anyone successfully integrated Retell with an Asterisk-based carrier that requires both authentication AND specific caller ID authorization?
Business Context
This integration is critical for our production deployment with a European carrier. We’ve built our entire voice automation infrastructure on Retell and are now blocked on this SIP trunk issue.
I’ve sent detailed PCAPs to support@retellai.com, but hoping someone in the community has encountered this specific “403 after successful auth” scenario with Asterisk-based carriers.
Any insights would be greatly appreciated! ![]()