Res_pjsip request failed for 'REGISTER' no matching endpoint

res_pjsip/pjsip_distributor c 673 log_failed_request request ‘REGISTER’ failed for - No Matching endpoints, im using asterisk20, i need a bit of help trying to connect the endpoints from my database to be used in asterisk.

You haven’t provided sufficient information. Have you configured Asterisk to connect to the database, or are you asking for help on how to do that? If already configured to do so, what is the full configuration? Have you verified connectivity?

my extconfig.conf file follows the following format
[settings]
ps_endpoints => odbc, asterisk
ps_auth => odbc, asterisk
ps_aors => odbc, asterisk

my sorcery.conf is the following
[res_pjsip]
endpoints=realtime,ps_endpoints
auth=realtime,ps_auth
aors=realtime,ps_aors

asterisk is able to connect to the database, i created a simple function in func_odbc and it works but trying to register endpoints from a database that is the issue.
It says res_pjsip/pjsip_distributor c 673 log_failed_request request ‘REGISTER’ failed for - No Matching endpoints
followed by Failed to authenticate.

And res_odbc.conf?
Does “pjsip show endpoints” show the configured endpoints?

res_odbc.conf, it connects to the database but when i do “pjsip show endpoints” it shows No objects found

Show the table and an endpoint you are expecting, as well as the output of “odbc show”.

“odbc show”
Name: asterisk
DSN:asteriskDB
Number of active connections :1 (out of 20)
Logging: Enabled
Number of prepares executed: 45
Number of queries executed: 0

“pjsip show endpoints”
No objects found.

That’s showing the output of the CLI command, but not the actual database table or endpoint configuration.

Do you mean the table schema and the expected data from that ?

Yes.

Table columns:
ID object_name transport context disallow allow from_user auth outbound_auth aors type rtp_symmetric rewrite_contact send_rpid
Data:
2 bbb3r5 transport-udp inbound all ulaw NULL bbb3r5 NULL bbb3r5 user NULL NULL NULL

“object_name” isn’t a recognized column, fyi. “id” is also expected to be lowercase and the name of the object. Where did you get this schema?

What is the name of the table?

You can also turn on core debug[1] to see the actual query being executed.

[1] Collecting Debug Information - Asterisk Documentation

should i use this schema instead
MariaDB [(asterisk)]> insert into ps_endpoints (id, transport, aors, auth, context, disallow, allow, direct_media, deny, permit, mailboxes) values (100, ‘transport-udp’, ‘100’, ‘100’, ‘testing’, ‘all’, ‘ulaw,alaw,gsm’, ‘no’, ‘0.0.0.0/0’, ‘0.0.0.0/0’, ‘100@default’);

I got it from here

Releases include schema SQL files in contrib/realtime[1].

[1] asterisk/contrib/realtime at 22.2.0 · asterisk/asterisk · GitHub

Thank you for this, this will help.
Just a quick question if i wanted to use an account to connect from a zoiper i should use the sippeers schema and for a sip trunk provider i use ps_endpoints correct ?

The sippeers schema is for chan_sip.

The ps_endpoints schema is for chan_pjsip, for providers or devices or softphones.

Thanks for that information, lastly if i wanted to distinguish a provider from a softphone account how would you go about doing that?

distinguish… where?

To Asterisk they aren’t really different, the only difference would be in how they are routed/used.

Thanks for the help, really appreciate it, the issue was with the table schema and I implore others who are currently experiencing the same issue is to check if they have the correct table schema. jcolp you are a superstar.