A challenge is part of the protocol
A SIP server can challenge a request before accepting it. The client responds using its configured identity and secret under the requested authentication scheme. A challenge followed by success is expected behavior; repeated challenges need closer inspection.
401 challenges concern the receiving server, while 407 is associated with proxy authentication. The relevant authorization header and realm must match the challenge. Do not assume the public extension number is always the carrier's authentication username.
A first 401 challenge can be normal. Read the response to the authenticated retry before changing credentials.
Check algorithm compatibility
RFC 8760 updates SIP digest authentication to support stronger algorithms including SHA-256 and SHA-512/256. Actual support depends on both endpoints and their software versions. A legacy handset may have limitations that a current PBX configuration exposes.
Prefer a compatible modern configuration rather than silently downgrading policy to make an old device register. Consult the exact PBX and handset documentation and plan replacement when secure interoperability cannot be maintained.
Diagnose without exposing secrets
Compare the username, realm, request destination and supported algorithms using sanitized records. Verify the secret locally through the authorized administration path. A digest exchange is not a reason to publish a raw capture; metadata and authentication material remain sensitive.
Separate an account lock or disabled service from a typing mistake. Provider-side policy can reject otherwise correctly formed requests.
Authentication is not call authorization
A registered extension may still be forbidden from particular destinations. Keep route permissions and carrier account limits in the investigation. Successful authentication does not justify allowing unrestricted outbound calling or management access.
Locate the Twilio 403 before changing authentication
A Twilio 403 on the first digest-less INVITE and a 403 on the authenticated retry after 407 point to different policy stages. Follow the termination diagnostic before rotating credentials or widening an ACL.
Keep DIDforSale credentials separate from source authorization
The DIDforSale guide distinguishes SIP-account activation and digest credentials from a portal-approved IP or FQDN record.
Keep Zadarma credentials separate from confirmed-source authorization
The Zadarma guide distinguishes SIP-login credentials from a portal-confirmed static public address.
Use the observed Voxbeam public source as authorization evidence
The Voxbeam diagnostic compares the portal value with the translated source observed on one transaction.
Use the selected GoTrunk endpoint model as the identity boundary
The GoTrunk diagnostic compares the saved source or credential identity with one observed transaction.
Separate DIDWW authentication from Caller ID and destination authorization
The DIDWW guide does not turn an authenticated INVITE into proof that the requested CLI or destination is permitted.
Do not blend Exotel API, SIP digest and registration
The Exotel guide separates API Basic Auth from SIP ACL or digest and records that the current India trunk interface does not use REGISTER.
Keep Voximplant application users and saved registrations distinct
The Voximplant guide assigns separate credential owners and state to endpoint users and platform-to-provider registrations.
Keep registered and IP-authenticated FreeSWITCH gateways distinct
The FreeSWITCH profiles and gateways guide separates REGED, intentional NOREG, OPTIONS reachability and provider acceptance.
Sources & applicability
Primary references for the technical details above. Operational examples and planning checklists are VoIP.info editorial guidance.
- IETF RFC 3261 — SIP, including linked updates ↗
- IETF RFC 8760 — modern SIP digest authentication ↗
- Twilio Elastic SIP Trunking configuration ↗
- Twilio Elastic SIP Trunking troubleshooting ↗
- Twilio sending-SIP best practices ↗
- Twilio CredentialList resource ↗
- Twilio Trunk resource ↗
- Twilio error 32201: source IP address not in ACL ↗
- DIDforSale IP interconnection configuration ↗
- DIDforSale SIP account creation ↗
- DIDforSale FreePBX PJSIP IP-based example ↗
- DIDforSale FreePBX PJSIP SIP-account example ↗
- DIDforSale SIP trunk service ↗
- DIDforSale customer service agreement ↗
- Asterisk documentation: Configuring chan_sip ↗
- Zadarma SIP trunk connection methods ↗
- Zadarma IP-authorized SIP trunk FAQ ↗
- Zadarma FreePBX PJSIP setup ↗
- Zadarma server delivery by SIP URI ↗
- Zadarma Asterisk IP-authorized trunk setup ↗
- Zadarma P-Asserted-Identity caller-ID guidance ↗
- Zadarma echo-test guidance ↗
- Voxbeam getting-started and outbound routing help ↗
- Voxbeam service and DID FAQ ↗
- Voxbeam DID service and capacity packages ↗
- Voxbeam wholesale voice services ↗
- Voxbeam network overview ↗
- Voxbeam VoIP glossary and codec summary ↗
- Voxbeam Asterisk chan_sip example ↗
- Asterisk PJSIP endpoint-identification troubleshooting ↗
- GoTrunk SIP Endpoints ↗
- GoTrunk FreePBX configuration guide ↗
- GoTrunk Asterisk configuration guide ↗
- GoTrunk Quick Start ↗
- GoTrunk Locations and emergency calling ↗
- GoTrunk call-detail records and traces ↗
- GoTrunk Call Rates ↗
- GoTrunk support-ticket workflow ↗
- Asterisk migration from chan_sip to res_pjsip ↗
- FreePBX 17 chan_sip-to-PJSIP conversion guidance ↗
- DIDWW inbound SIP routing methods ↗
- DIDWW create an inbound SIP trunk ↗
- DIDWW inbound SIP connectivity ↗
- DIDWW SIP connectivity reference ↗
- DIDWW registration history ↗
- DIDWW inbound registration credentials ↗
- DIDWW outbound trunks ↗
- DIDWW outbound authentication and security ↗
- DIDWW outbound SIP information ↗
- DIDWW Caller ID and CNAM OUT ↗
- DIDWW service failover and load balancing ↗
- DIDWW inbound call logs ↗
- DIDWW emergency calling on outbound trunks ↗
- Exotel SIP Trunking overview ↗
- Exotel SIP Trunking quickstart ↗
- Exotel call directions and routing modes ↗
- Exotel Dynamic SIP Trunking API ↗
- Exotel developer network and firewall guidance ↗
- Exotel SIP errors and troubleshooting ↗
- Exotel Connect Applet setup for inbound SIP ↗
- Exotel Dynamic SIP Trunking overview ↗
- Exotel SIP Trunking TCP India ↗
- Exotel SIP Trunking TLS India ↗
- Exotel Network and Firewall Configuration ↗
- Exotel view and manage a trunk ↗
- Voximplant SIP calls and registrations ↗
- Voximplant routing rules ↗
- Voximplant applications ↗
- Voximplant processing calls in scenarios ↗
- Voximplant CallEvents reference ↗
- Voximplant AppEvents reference ↗
- Voximplant SIPRegistration Management API ↗
- Voximplant VoxEngine limits ↗
- FreeSWITCH users manual ↗
- FreeSWITCH getting started and installation ↗
- FreeSWITCH module loading and management ↗
- FreeSWITCH CLI and API command reference ↗
- FreeSWITCH SIP profiles with Sofia ↗
- FreeSWITCH diagnostic toolbox ↗
- FreeSWITCH gateways and trunk registration ↗
- FreeSWITCH registration troubleshooting ↗
- FreeSWITCH call-setup failures ↗
- FreeSWITCH SIP trace and CDR reading ↗
- FreeSWITCH introduction and core concepts ↗
- FreeSWITCH codecs and negotiation ↗
- FreeSWITCH codec reference table ↗
- FreeSWITCH media handling ↗
- FreeSWITCH no-audio and one-way-audio troubleshooting ↗
- FreeSWITCH WebRTC over SIP and TLS parameters ↗
- FreeSWITCH Event Socket ↗
- FreeSWITCH events catalog ↗