Hello world: Cannot setup pjsip

Hello.
I am trying to setup hello-world pjsip example as written in the wiki.
My pjsip.conf:

[transport-udp]
type=transport
protocol=udp
bind=0.0.0.0

[6001]
type=endpoint
context=from-internal
disallow=all
allow=ulaw
auth=6001
aors=6001

[6001]
type=auth
auth_type=userpass
password=6001pass
username=6001

[6001]
type=aor
max_contacts=1

extensions.conf:

[from-internal]
exten => 100,1,Answer()
same => n,Wait(1)
same => n,Playback(hello-world)
same => n,Hangup()

Why my softphone is trying to connect to the asterisk, i see the following message in cli:

[May 22 10:22:17] NOTICE[951]: chan_sip.c:29060 handle_request_register: Registration from '"6001" <sip:6001@192.168.122.207>' failed for '192.168.122.1:5060' - Wrong password

So somewhy the call is processed by chan_sip.
If chan_sip is unloaded by module unload chan_sip, then i see no messages in cli when softphone is trying to connect.
An there are even no open sip ports:

# netstat -ntlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 127.0.0.1:5038          0.0.0.0:*               LISTEN      879/asterisk        
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN      861/cupsd           
tcp        0      0 127.0.0.53:53           0.0.0.0:*               LISTEN      499/systemd-resolve 
tcp        0      0 127.0.0.54:53           0.0.0.0:*               LISTEN      499/systemd-resolve 
tcp6       0      0 ::1:631                 :::*                    LISTEN      861/cupsd

Module res_pjsp is loaded, as shown by module show:

res_pjsip.so                   Basic SIP resource                       51         Running              core

So the question is: what i forgot do do to enable test call via pjsip?

P.S.

$ asterisk -V
Asterisk 20.6.0~dfsg+~cs6.13.40431414-2build5

Check the console output at startup to see if PJSIP is loading, and if it is if it is presenting any log messages. You can also use “module show like pjsip” to see if any of the modules loaded. If you see no mention of PJSIP, then it may not be installed from the packages or modules.conf is configured to not load things.

Only one driver can claim port 5060. You should disable loading for it.

Also if you install a supported version of Asterisk, built with default settings, chan_sip will not get loaded, and may not even get built. That suggests you are installing an old version.

Quoting my first message

Module res_pjsp is loaded, as shown by module show

It is the default version in ubuntu 24.04. Is it supported?

Also, i checked /var/log/asterisk/messages.log and found many identical errors:

ERROR[1894] res_sorcery_config.c: Unable to load config file ‘pjsip.conf’

But no additional info why it cannot read the config

On Saturday 25 May 2024 at 13:58:03, SleepingFish via Asterisk Community
wrote:

It is the default version in ubuntu 24.04. Is it supported?

https://docs.asterisk.org/About-the-Project/Asterisk-Versions/

Also, i checked /var/log/asterisk/messages.log and found many identical
errors:
ERROR[1894] res_sorcery_config.c: Unable to load config file ‘pjsip.conf’

But no additional info why it cannot read the config

What are the ownership / permissions on that file?

Are they different from any of the other files in /etc/asterisk?

Antony.


A good conversation is like a miniskirt;
short enough to retain interest,
but long enough to cover the subject.

  • Celeste Headlee

                                                Please reply to the list;
                                                      please *don't* CC me.
    

Asterisk 20 is supported, but it is unlikely that Ubuntu meets the default configuration condition.

Yes, permissions were the reason. I forgot that I created config files as root.
After permissions fixing everything works, thank you!

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