Asterisk 17 Pjsip dynamic realtime only allow registration via sippeers table

I am following guide from this link - https://wiki.asterisk.org/wiki/display/AST/Setting+up+PJSIP+Realtime
It only allow registration if I add extension into sippeers table
I used alembic schema. Am I missing something here ?

xxx *CLI> odbc show all

ODBC DSN Settings

Name: asterisk
DSN: asterisk
Number of active connections: 1 (out of 1)
Logging: Disabled

xxx*CLI> pjsip show auth 7001

I/OAuth: <AuthId/UserName…>

Auth: 7001/7001

ParameterName : ParameterValue

auth_type : userpass
md5_cred :
nonce_lifetime : 32
oauth_clientid :
oauth_secret :
password : 123456
realm :
refresh_token :
username : 7001

xxx *CLI>

Oct 21 21:40:22] NOTICE[1161]: chan_sip.c:29050 handle_request_register: Registration from ‘sip:7001@8.91.224.82’ failed for ‘10.19.7.201:19820’ - Wrong password
[Oct 21 21:40:22] NOTICE[1161]: chan_sip.c:29050 handle_request_register: Registration from ‘sip:7001@8.91.224.82’ failed for ‘10.19.7.201:19820’ - Wrong password
[Oct 21 21:40:23] NOTICE[1161]: chan_sip.c:29050 handle_request_register: Registration from ‘sip:7001@8.91.224.82’ failed for ‘10.19.7.201:19820’ - Wrong password
xxx*CLI>

MariaDB [asterisk]> select id, max_contacts from ps_aors;
±-----±-------------+
| id | max_contacts |
±-----±-------------+
| 100 | 2 |
| 1005 | 2 |
| 501 | 2 |
| 502 | 2 |
| 7001 | 2 |
| 7002 | 2 |
±-----±-------------+
6 rows in set (0.000 sec)

MariaDB [asterisk]> select id, auth_type, password, username from ps_auths;
±-----±----------±---------±---------+
| id | auth_type | password | username |
±-----±----------±---------±---------+
| 100 | userpass | 100 | 100 |
| 1005 | userpass | 1005 | 1005 |
| 501 | userpass | 1234 | 501 |
| 502 | userpass | 1234 | 502 |
| 7001 | userpass | 123456 | 7001 |
| 7002 | userpass | 123456 | 7002 |
±-----±----------±---------±---------+
6 rows in set (0.000 sec)

MariaDB [asterisk]> select id, transport, aors, auth, context, disallow, allow, direct_media from ps_endpoint
-> ;
ERROR 1146 (42S02): Table ‘asterisk.ps_endpoint’ doesn’t exist
MariaDB [asterisk]> select id, transport, aors, auth, context, disallow, allow, direct_media from ps_endpoints;
±-----±--------------±-----±-----±--------±---------±---------------±-------------+
| id | transport | aors | auth | context | disallow | allow | direct_media |
±-----±--------------±-----±-----±--------±---------±---------------±-------------+
| 100 | transport-udp | 100 | 100 | testing | all | all | no |
| 1005 | transport-udp | 1005 | 1005 | testing | all | alaw,ulaw,opus | no |
| 501 | transport-udp | 501 | 501 | testing | all | alaw,ulaw,opus | no |
| 502 | transport-udp | 502 | 502 | testing | all | alaw,ulaw,opus | no |
| 7001 | transport-udp | 7002 | 7002 | testing | all | alaw | no |
| 7002 | transport-udp | 7002 | 7002 | testing | all | alaw | no |
±-----±--------------±-----±-----±--------±---------±---------------±-------------+
6 rows in set (0.000 sec)

MariaDB [asterisk]>

xxxx*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: 100 Unavailable 0 of inf
InAuth: 100/100
Aor: 100 2
Transport: transport-udp udp 0 0 0.0.0.0:5062

Endpoint: 1005 Unavailable 0 of inf
InAuth: 1005/1005
Aor: 1005 2
Transport: transport-udp udp 0 0 0.0.0.0:5062

Endpoint: 501 Unavailable 0 of inf
InAuth: 501/501
Aor: 501 2
Transport: transport-udp udp 0 0 0.0.0.0:5062

Endpoint: 502 Unavailable 0 of inf
InAuth: 502/502
Aor: 502 2
Transport: transport-udp udp 0 0 0.0.0.0:5062

Endpoint: 7001 Unavailable 0 of inf
InAuth: 7001/7001
Aor: 7001 2
Transport: transport-udp udp 0 0 0.0.0.0:5062

Endpoint: 7002 Unavailable 0 of inf
InAuth: 7002/7002
Aor: 7002 2
Transport: transport-udp udp 0 0 0.0.0.0:5062

Objects found: 6

xxxx*CLI>

xxxxCLI>> module reload res_odbc.so
Module ‘res_odbc.so’ reloaded successfully.
– Reloading module ‘res_odbc.so’ (ODBC resource)
[Oct 22 10:54:19] NOTICE[1436]: res_odbc.c:706 load_odbc_config: Registered ODBC class ‘asterisk’ dsn->[asterisk]
xxxx
CLI>

Asterisk 17.7.0 built by root @ xxxx on a x86_64 running Linux on 2020-10-19 20:12:39 UTC
Ubuntu 20.04

This resolved after Disabling chan_pjsip
Edited the file modules.conf in /etc/asterisk/, added the followign and restarted asterisk
noload => chan_pjsip.so

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.