[SOLVED]Asterisk realtime ARA using PJSIP doesn't authenticate

I just migrate my Asterisk ARA that was using sip protocol to jpsip, in the begining I migrate without database for the tables of the pjsip, such as (endpoints, aors, auths, etc) after finished the migration and the server is working properly I tried to enable the database, but now I cant connect the endpoints in the server, the system return error in the authentication:

[Jun  7 10:40:09] NOTICE[9436]: res_pjsip/pjsip_distributor.c:649 log_failed_request: Request 'REGISTER' from '<sip:6002@siphml.dns123.com>' failed for '187.181.178.X:27412' (callid: 575368506-18222-1@BJC.BGI.A.BAC) - No matching endpoint found
[Jun  7 10:40:09] NOTICE[9436]: res_pjsip/pjsip_distributor.c:649 log_failed_request: Request 'REGISTER' from '<sip:6002@siphml.solaristelecomdns123com>' failed for '187.181.178.X:27412' (callid: 575368506-18222-1@BJC.BGI.A.BAC) - Failed to authenticate

I didn’t put all the tables in the database, only PS_ENDPOINTS, PS_AORS and PS_AUTHS… transport, globals and other I leave in the file.

in the sorcery.conf I added it:
[res_pjsip] ; Realtime PJSIP configuration wizard
endpoint=realtime,ps_endpoints
auth=realtime,ps_auths
aor=realtime,ps_aors

[res_pjsip_endpoint_identifier_ip]
identify=realtime,ps_endpoint_id_ips

obs> i didn’t create the table ps_endpoint_id_ips

in the extconfig.conf I added it:
ps_endpoints => mysql,general,ps_endpoints
ps_auths => mysql,general,ps_auths
ps_aors => mysql,general,ps_aors

Please, anyone can help me?

Do they appear when using “pjsip show endpoints”? Do you see queries happening?

The MySQL driver is not one that has really been tested or is probably used much, ODBC is used much more often and has documentation for it.

this is the return of the comands:

ip-172-31-12-250*CLI> pjsip show endpoints

Endpoint: <Endpoint/CID…> <State…> <Channels.>
I/OAuth: <AuthId/UserName…>
Aor: <Aor…>
Contact: <Aor/ContactUri…> <Hash…> <RTT(ms)…>
Transport: <TransportId…> <BindAddress…>
Identify: <Identify/Endpoint…>
Match: <criteria…>
Channel: <ChannelId…> <State…> <Time…>
Exten: <DialedExten…> CLCID: <ConnectedLineCID…>

Endpoint: 1 Unavailable 0 of inf
Transport: simpletrans udp 0 0 0.0.0.0:5060

Endpoint: 2 Unavailable 0 of inf
Transport: simpletrans udp 0 0 0.0.0.0:5060

Endpoint: 3 Unavailable 0 of inf
Transport: simpletrans udp 0 0 0.0.0.0:5060

Objects found: 3

They appear to be named “1”, “2”, and “3” - at least from the perspective of PJSIP after querying the database. Your device is trying to register as “6002”.

yes, the id field in the database is the number of the extension? oh my god…

now works but the endpoints show like unknow, thank you again. It was a newbie question.


 Endpoint:  6001                                                 Unavailable   0 of inf
     InAuth:  6001/6001
        Aor:  6001                                               3
  Transport:  simpletrans               udp      0      0  0.0.0.0:5060

 Endpoint:  6002                                                 Not in use    0 of inf
     InAuth:  6002/6002
        Aor:  6002                                               3
      Contact:  6002/sip:6002@187.181.178.208:28004        035a01593b Unknown         nan
  Transport:  simpletrans               udp      0      0  0.0.0.0:5060

 Endpoint:  6003                                                 Not in use    0 of inf
     InAuth:  6003/6003
        Aor:  6003                                               3
      Contact:  6003/sip:6003@187.181.178.208:28015        34777e5650 Unknown         nan
  Transport:  simpletrans               udp      0      0  0.0.0.0:5060


Objects found: 3

but looks like working properly

Authentication it’s working now, I will close this topic.

Thanks.