Fatal response '404', stopping outbound registration

  • when I am reloading pjsip I am getting:
    vandana-server*CLI> pjsip reload
    Module ‘res_pjsip.so’ reloaded successfully.
    Module ‘res_pjsip_authenticator_digest.so’ reloaded successfully.
    Module ‘res_pjsip_endpoint_identifier_ip.so’ reloaded successfully.
    Module ‘res_pjsip_mwi.so’ reloaded successfully.
    Module ‘res_pjsip_notify.so’ reloaded successfully.
    Module ‘res_pjsip_outbound_publish.so’ reloaded successfully.
    Module ‘res_pjsip_publish_asterisk.so’ reloaded successfully.
    Module ‘res_pjsip_outbound_registration.so’ reloaded successfully.
    – Reloading module ‘res_pjsip.so’ (Basic SIP resource)
    [Jan 22 12:29:37] NOTICE[22212]: sorcery.c:1348 sorcery_object_load: Type ‘system’ is not reloadable, maintaining previous values
    – Reloading module ‘res_pjsip_authenticator_digest.so’ (PJSIP authentication resource)
    – Reloading module ‘res_pjsip_endpoint_identifier_ip.so’ (PJSIP IP endpoint identifier)
    – Reloading module ‘res_pjsip_mwi.so’ (PJSIP MWI resource)
    – Reloading module ‘res_pjsip_notify.so’ (CLI/AMI PJSIP NOTIFY Support)
    – Reloading module ‘res_pjsip_outbound_publish.so’ (PJSIP Outbound Publish Support)
    – Reloading module ‘res_pjsip_publish_asterisk.so’ (PJSIP Asterisk Event PUBLISH Support)
    – Reloading module ‘res_pjsip_outbound_registration.so’ (PJSIP Outbound Registration Support)
    [Jan 22 12:29:42] WARNING[22212]: res_pjsip_registrar.c:1166 find_registrar_aor: AOR ‘’ not found for endpoint ‘1001’ (X.X.X.X:5060)
    [Jan 22 12:29:42] WARNING[22212]: res_pjsip_outbound_registration.c:1386 handle_registration_response: Fatal response ‘404’ received from ‘sip:X.X.X.X:5060’ on registration attempt to ‘sip:1001@X.X.X.X:5060’, stopping outbound registration
    [Jan 22 12:29:45] WARNING[22212]: res_pjsip_registrar.c:1166 find_registrar_aor: AOR ‘’ not found for endpoint ‘1000’ (X.X.X.X:5060)
    [Jan 22 12:29:45] WARNING[22212]: res_pjsip_outbound_registration.c:1386 handle_registration_response: Fatal response ‘404’ received from ‘sip:X.X.X.X:5060’ on registration attempt to ‘sip:1000@10.0.1.86:5060’, stopping outbound registration
    [Jan 22 14:01:00] WARNING[22301]: res_pjsip_registrar.c:1166 find_registrar_aor: AOR ‘’ not found for endpoint ‘1001’ (X.X.X.X:5060)
    [Jan 22 14:01:00] WARNING[22301]: res_pjsip_registrar.c:1166 find_registrar_aor: AOR ‘’ not found for endpoint ‘1000’ (X.X.X.X:5060)

  • If I am trying to make call from Linphone on different VM I am getting:
    Executing [1001@outbound:1] Dial(“PJSIP/1000-0000000f”, “PJSIP/1001@1000”) in new stack
    – Called PJSIP/1001@1000
    [Jan 22 14:33:14] ERROR[22376]: res_pjsip_outbound_authenticator_digest.c:450 digest_create_request_with_auth: Endpoint: ‘1000’: There were no auth ids available
    == Everyone is busy/congested at this time (1:0/0/1)
    – Executing [1001@outbound:2] Dial(“PJSIP/1000-0000000f”, “PJSIP/1001@1001”) in new stack
    – Called PJSIP/1001@1001
    [Jan 22 14:33:14] ERROR[22376]: res_pjsip_outbound_authenticator_digest.c:450 digest_create_request_with_auth: Endpoint: ‘1001’: There were no auth ids available
    == Everyone is busy/congested at this time (1:0/0/1)
    – Auto fallthrough, channel ‘PJSIP/1000-0000000f’ status is ‘CHANUNAVAIL’

  • Endpoints state is NOT IN USE and Registrations status is Rejected

  • Below are my files for reference
    pjsip.conf
    [transport-udp]
    type = transport
    protocol = udp
    bind = 0.0.0.0:5060

[outbound_auth_1000]
type = auth
auth_type = userpass
username = 1000
password = password

[outbound_aor_1000]
type = aor
contact = sip:1000@X.X.X.X:5060
max_contacts = 2

[outbound_registration_1000]
type = registration
outbound_auth = outbound_auth_1000
server_uri = sip:X.X.X.X:5060
client_uri = sip:1000@X.X.X.X:5060
contact_user = 1000
transport = transport-udp
retry_interval = 60

[1000]
type = endpoint
transport = transport-udp
context = outbound
disallow = all
allow = ulaw
auth = outbound_auth_1000
aors = outbound_aor_1000

[outbound_auth_1001]
type = auth
auth_type = userpass
username = 1001
password = password

[outbound_aor_1001]
type = aor
contact = sip:1001@X.X.X.X:5060
max_contacts = 2

[outbound_registration_1001]
type = registration
outbound_auth = outbound_auth_1001
server_uri = sip:X.X.X.X:5060
client_uri = sip:1001@X.X.X.X:5060
contact_user = 1001
transport = transport-udp
retry_interval = 60

[1001]
type = endpoint
transport = transport-udp
context = outbound
disallow = all
allow = ulaw
auth = outbound_auth_1001
aors = outbound_aor_1001

extensions.conf
[outbound]
exten => _X.,1,Dial(PJSIP/${EXTEN}@1000)
exten => _X.,2,Dial(PJSIP/${EXTEN}@1001)

ari.conf
[general]
enabled = yes
pretty = yes

[user1]
type = user
read_only = no
password = password

I am not able to make calls please help.

This makes it seem as though Asterisk is registering to itself, which would be… unnecessary.

I would suggest actually stating what 1000 and 1001 are supposed to be…

1000 and 1001 are A and B party. One of them will initiate SIP call and another will pick. please suggest further

A and B party, where?

1000 and 1001 are SIP accounts representing individual SIP clients. These are identifiers for endpoints or devices that are configured to connect to the SIP server for communication

Your configuration does not reflect that.

You have configured outbound registrations which I believe go to Asterisk, which is unnecessary and will do nothing.
You have also configured explicit contacts on AORs to go to specific SIP URIs, defeating the purpose of registration in the first place, which yet again I think go to back to Asterisk.

It’s like you’ve configured Asterisk to just call itself.

For connecting an endpoint the docs site has an example[1].

[1] res_pjsip Configuration Examples - Asterisk Documentation

  • Endpoints state is unavailable

  • I am getting this in logs
    [Jan 22 18:53:26] NOTICE[23363]: res_pjsip/config_transport.c:768 transport_apply: Transport ‘simpletrans’ is not fully reloadable, not reloading: protocol, bind, TLS (everything but certificate and private key if filename is unchanged), TCP, ToS, or CoS options.
    [Jan 22 18:53:26] NOTICE[23363]: sorcery.c:1348 sorcery_object_load: Type ‘system’ is not reloadable, maintaining previous values
    – Reloading module ‘res_pjsip_authenticator_digest.so’ (PJSIP authentication resource)
    – Reloading module ‘res_pjsip_endpoint_identifier_ip.so’ (PJSIP IP endpoint identifier)
    – Reloading module ‘res_pjsip_mwi.so’ (PJSIP MWI resource)
    – Reloading module ‘res_pjsip_notify.so’ (CLI/AMI PJSIP NOTIFY Support)
    – Reloading module ‘res_pjsip_outbound_publish.so’ (PJSIP Outbound Publish Support)
    – Reloading module ‘res_pjsip_publish_asterisk.so’ (PJSIP Asterisk Event PUBLISH Support)
    – Reloading module ‘res_pjsip_outbound_registration.so’ (PJSIP Outbound Registration Support)

  • This is my updated pjsip.conf file
    [simpletrans]
    type=transport
    protocol=udp
    bind=0.0.0.0

endpoint-basic

type=endpoint
context=internal
disallow=all
allow=ulaw

auth-userpass
type=auth
auth_type=userpass

aor-single-reg
type=aor
max_contacts=1

1000
auth=auth1000
aors=1000

auth1000
password=password
username=1000

1000

1001
auth=auth1001
aors=1001
auth1001
password=password
username=1001

1001

1002
auth=auth1002
aors=1002

auth1002
password=password
username=1002

1002

Are the devices registered? What does “pjsip show contacts” show? If they aren’t registered, then they can’t be called.

  • Now “pjsip show contacts” is showing objects with state NonQual
  • “pjsip show contacts” state is Not in use
  • Getting this I am initiating call from another IP
    [Jan 22 19:08:52] NOTICE[23377]: res_pjsip_session.c:4046 new_invite: 1000: Call (UDP:X.X.X.X:5060) to extension ‘1001’ rejected because extension not found in context ‘internal’.

The message means what it says. A call to extension “1001” in the dialplan was rejected because the call was sent into dialplan context “internal” and it didn’t exist in there.

Your prior dialplan showed a context of “outbound”.

If you don’t understand dialplan, it is fundamental to learn the basics because it is how calls are routed and handled.

Thanks. It is working after using “outbound”

I have two Linphone one one the same IP of asterisk another on different IP. I am able to register users on Linphone on different IP but not on Linphone on same IP what can be issue

You would need to specify what actually happens for anyone to be able to answer.

  • I have two Linphone one one the same IP of asterisk another on different IP. I am able to register users on Linphone on different IP but not on Linphone on same IP.

  • Getting this warning:
    [Jan 24 09:52:56] WARNING[15916] res_pjsip_outbound_registration.c: Fatal response ‘404’ received from ‘sip:X.X.X.X:5060’ on registration attempt to ‘sip:1000@X.X.X.X:5060’, stopping outbound registration.

  • Below are my files for reference:
    [simpletrans]
    type=transport
    protocol=udp
    bind=0.0.0.0

[reg1000]
type=registration
outbound_auth=auth1000
server_uri=sip:X.X.X.X:5060
client_uri=sip:1000@X.X.X.X:5060
retry_interval=60

[auth1000]
type=auth
auth_type=userpass
password=password
username=1000

[1000]
type=aor
contact=sip:X.X.X.X:5060
max_contacts=5

[1000]
type=endpoint
context=outbound
disallow=all
allow=ulaw
outbound_auth=auth1000
aors=1000

[id1000]
type=identify
endpoint=1000
match=X.X.X.X:5060

[reg1001]
type=registration
outbound_auth=auth1001
server_uri=sip:X.X.X.X:5060
client_uri=sip:1001@X.X.X.X:5060
retry_interval=60

[auth1001]
type=auth
auth_type=userpass
password=password
username=1001

[1001]
type=aor
contact=sip:X.X.X.X:5060
max_contacts=5

[1001]
type=endpoint
context=outbound
disallow=all
allow=ulaw
outbound_auth=auth1001
aors=1001

[id1001]
type=identify
endpoint=1001
match=X.X.X.X:5060

[1002]
type=endpoint
context=internal
disallow=all
allow=ulaw
auth=auth1002
aors=1002

[auth1002]
type=auth
auth_type=userpass
password=password
username=1002

[1002]
type=aor
max_contacts=5

[id1002]
type=identify
endpoint=1002
match=X.X.X.X:5060

[reg1002]
type=registration
outbound_auth=auth1002
server_uri=sip:X.X.X.X:5060
client_uri=sip:1002@X.X.X.X:5060
retry_interval=60

extensions.conf
[outbound]
exten => _X.,1,Dial(PJSIP/${EXTEN}@1000)
exten => _X.,2,Dial(PJSIP/${EXTEN}@1001)

[internal]
exten => 1002,1,Dial(PJSIP/1002)