Australian cloud for business software — built and run in Sydney since 2002

NetLeverage
NetLeverage

SIP 403 Forbidden on REGISTER: Asterisk PJSIP AOR has no max_contacts

Technical article
Troubleshooting

About this article: This article is reviewed against the cited sources. This is source research, not lab validation. Check the stated versions and your own requirements before making changes.

Asterisk’s PJSIP registrar can reject a phone’s REGISTER with 403 Forbidden when the address of record (AOR) has no max_contacts value, or when more contacts are offered than max_contacts allows. RFC 3261 defines 403 as a refusal where authorisation will not help and the request should not simply be repeated. Fix the AOR; do not keep retrying the same REGISTER.

What the symptom means

RFC 3261 §21.4.4:

The server understood the request, but is refusing to fulfill it. Authorization will not help, and the request SHOULD NOT be repeated.

Asterisk PJSIP Troubleshooting Guide — inbound registrations:

Ensure that the AoR has a max_contacts value configured on it. If this option is not set, then registration cannot succeed. You will see this message on the CLI:

[2014-10-16 11:34:07.887] WARNING[2940]: res_pjsip_registrar.c:685 registrar_on_rx_request: AOR '200' has no configured max_contacts. Endpoint '200' unable to register

Asterisk will transmit a 403 Forbidden in response to the registration attempt.

When max_contacts is too low for multiple bindings, Asterisk also responds with 403 Forbidden (same guide).

Zoom Phone’s product 403 strings are unrelated product codes (Zoom Phone 403).

Likely causes

Cause What you see How to confirm
max_contacts unset on AOR CLI warning above; 403 on REGISTER pjsip show aor <name>
max_contacts too small 403 after additional devices register Contact count vs limit
Registrar module not loaded Registration never binds module show like res_pjsip_registrar.so
Endpoint missing aors= No AOR on pjsip show endpoint Guide: ensure aors is set

Prove the cause before changing anything

These CLI reads are non-changing:

  1. Capture the SIP response code on REGISTER (403) and Call-ID.
  2. Run pjsip show endpoint <id> and pjsip show aor <id> as in the Asterisk guide.
  3. Confirm res_pjsip_registrar.so is Running.
  4. Read the warning line for missing max_contacts in the Asterisk log/CLI.

Fix

Set max_contacts on the AOR

Save the AOR configuration first (file path varies; use the snippet you actually load—examples below use /etc/asterisk/pjsip.conf):

cp /etc/asterisk/pjsip.conf pjsip.conf.before

Risk: the next step changes PJSIP AOR settings and reloads PJSIP. A wrong AOR name or max_contacts value can drop registrations for that extension until you restore the previous configuration.

In the AOR section, set a positive max_contacts (the guide’s example discussion uses values such as 1 when a single contact is intended). type=aor is standard PJSIP syntax for that section (our own label; the troubleshooting page assumes an AOR object). If replacements should displace old contacts, also set remove_existing as documented for your Asterisk version. Reload PJSIP with your normal safe reload command, then re-REGISTER the phone once.

To undo it: copy pjsip.conf.before back to the same live path you saved from (for example /etc/asterisk/pjsip.conf) and reload PJSIP again.

Raise max_contacts for multiple devices

The Asterisk guide says max_contacts must be large enough when several contacts bind to one AoR.

Save the AOR configuration first (same live path as above):

cp /etc/asterisk/pjsip.conf pjsip.conf.before-raise

Risk: the next step raises max_contacts on the AOR and reloads PJSIP. A value that is too high for your security policy can allow more simultaneous bindings than you intended until you restore the previous configuration.

Increase max_contacts to cover the devices that must register, reload PJSIP, then re-REGISTER each device once.

To undo it: copy pjsip.conf.before-raise back to the same live path you saved from and reload PJSIP again.

Confirm the fix

  1. pjsip show endpoint <id> shows a Contact bound to the AOR (guide’s success example shape).
  2. REGISTER no longer returns 403.
  3. CLI no longer prints the missing max_contacts warning for that AOR.

What to watch afterwards

  • Provisioning templates that create endpoints without AORs.
  • Softphones that REGISTER from many networks and exhaust max_contacts.
  • Confusing 401/407 challenges with 403 refusals (RFC: authorisation will not help on 403).

Risks and limits

These steps have not been lab-tested.

Exact pjsip reload versus module reload commands vary by deployment; use the reload your change-control already tests. RFC 3261 is the protocol definition; Asterisk’s warning text is the product-specific cause used here.

Sources