prefixkit Ask an engineerAsk RU

SIP response codes

SIP 403 Forbidden

Forbidden: the server understood the request and refuses it. Repeating it with credentials will not help.

403
Name
Forbidden
Class
4xx · Client error
Defined in
RFC 3261
Q.850 cause towards the PSTN
21 · Call rejected
Produced from Q.850 causes
21, 55, 57, 87

When it happens

  • Wrong credentials after too many attempts (fail2ban or carrier lockout).
  • The destination is not allowed for this account: international, premium or a blocked prefix.
  • Calls from an IP address the trunk does not allow.
  • Caller ID not allowed by the carrier.
  • No balance on a prepaid account.

What to check

  • Check the account’s calling rights and balance with the provider.
  • Make sure the source IP is whitelisted on the trunk.
  • Check the number format the carrier expects (+E.164 or national) and the caller ID you send.

What the response looks like

SIP/2.0 403 Forbidden
Via: SIP/2.0/UDP 203.0.113.10:5060;branch=z9hG4bK776asdhds
From: <sip:101@pbx.example>;tag=1928301774
To: <sip:+15551234567@pbx.example>;tag=a6c85cf
Call-ID: a84b4c76e66710@203.0.113.10
CSeq: 2 INVITE
Reason: Q.850;cause=21;text="Call rejected"
Content-Length: 0