Cannot Register on Asterisk-16.12.0

Greetings All,

I have Asterisk-16.12.0 running on VMWare. I copied PJSIP config line for line and my Bria softphone will not register. After it times out, the error message says " no route to host ".

Is there an ACL needed for PJSIP? I am new to asterisk/linux. Do i need to open something up in Centos 8,2?

I can ping the Asterisk machine from any other machine and my smart phone. What happened to sip set debug command in 16.12.0? Is it pjsip set logger?

Thank you,
Dave

Yes.

Also, 'tcpdump' will show incoming packets before 'iptables' so it may yield another clue.

It died with chan_sip.

My fingers have a long memory, so I added these aliases:

	pjsip set debug off		= pjsip set logger off
	pjsip set debug on		= pjsip set logger on
	sip set debug off		= pjsip set logger off
	sip set debug on		= pjsip set logger on

sedwards,

If I have both sip.conf and pjsip.conf on my machine, do I need to change anything or get rid of sip.conf?

Dave

chan_sip is deprecated and should not be used unless you really, really need it – but even then, you should ask for help. Maybe someone knows how to do it with PJSIP.

Guys,

I still cannot get my Bria Softphone to connect to PJSIP. In WireShark I can see the the phone make a
696 Request Options sip: 192.168.1.226:5060; then a 736 Request REGISTER sip:192.168.1.226:5060
(1 binding ).

There is no response from Asterisk. I am posting my PJSIP.conf file in short. Please have a look and tell me what I need to change. When I turn debug on nothing happens when I try to register.

Here’s the file:

[simpletrans_1]
type = transport
protocol = udp
bind = 0.0.0.0
bind = ::
port = 5060
context = internal
allowoverlap = no
local_net = 192.168.1.0/24
external_media_address = 50.248.177.161:5060
external_signaling_address = 50.248.177.161:5060
callcounter = yes
allowguests = no

;===============ENDPOINT TEMPLATES

endpoint-basic
type = endpoint
context = internal
disallow = all
allow = ulaw
host = dynamic
direct_media = no
trust_id_outbound = yes
device_state_busy_at = 3
dtmf_mode = rfc4733

auth-userpass
type = auth
auth_type = userpass

aor-single-reg
type = aor
max_contacts = 1

;===============EXTENSION 2801

2801
auth = 2801
aors = 2801
callerid = Byrd Nahill

auth2801
password = 2801
username = 2801

2801
mailboxes = 2801@demo-test

Thank you,
Dave

Update:

I see the Asterisk Server sending ICMP packet at the Bria softphone and Wirehark saying in the info field " Destination unreachable( Communications administratively filtered ). IS there a command in Centos I need to issue?
Thanks,
Dave

You may need to use iptables to open up the relevant access, or disable the firewall entirely.

What firewall are you speaking about. The entire setup is inside. I am not breaking nat. It appears that asterisk is blocking (Communications administratively filtered ). Does the SIP setup look right? I also commented out everything in channel_sip.? Would Centos block communications? I can ping from Centos prompt to my smart phone and ping theAsterisk from my Smart phone. I enable PJSIP logger on and see no activity. Blocked!!

Dave

The firewall provided by the OS.

I didn’t know Centos had a firewall. Thank you for the information. I disabled the firewall and I cannot connect. WireShark is telling me that I am still “Administratively filtered” Does Asterisk have a firewall?
Does my Sip Setup look good?

Thanks guys for taking time to help me.

Dave

Adminstratively filtered will only be produced by code operating at the IP layer, which, for all normal programs, means outside of user space. Asterisk is a normal, user space, program, in this respect.

The ICMP packet should have a source address which should identify the entity that is rejecting the packet.

The source is the Asterisk Box 192.168.1.226 sending to 192.168.1.205 ICMP Destination Unreachable
(port unreachable)… When I do a dialplan show I get errors for pjsip.conf.

The errors res_scorcery_config c:418 scorcery_config_internal_load: Could not create an object of type
endpoint with id of 2801. I get the same error for the three extensions I have in pjsip.conf.

Thanks,
Dave

Port unreachable generally means the daemon isn’t listening on that port, e…g PJSIP failed to start.

The could not create error seems rather generic; are you sure there isn’t a more specific one as well?

I can see 192.168.1.205 (Sip Endpoint ) sending a register request. Says: register sip:192.168.1.226:5060
( 1 binding ). Then 1.226 sends ICMP (Destination Unreachable).

If you do “netstat -a”, I’m pretty sure you will find that there is nothing listening on port 5060.

You could also run lsof against the process ID of Asterisk, and, again, I think you will find there that Asterisk is not listening.

David,

The pjsip is not loading.I get an error config_options C:780 aco_process_var: Could not find option suitable for category “Simpletrans_1” named port at line 8. I have port=5060.

Thank you,
Dave

These options do not exist on PJSIP transports.

jcolp,

Thanks for the comeback. Can you point me to an example I can use, please?

Dave

Examples of what exactly? The configuration file and sections are documented on the wiki[1]. There are also sample configurations on the wiki[2]. There is also the configuration wizard to simplify things[3].

[1] https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Configuration_res_pjsip
[2] https://wiki.asterisk.org/wiki/display/AST/res_pjsip+Configuration+Examples
[3] https://wiki.asterisk.org/wiki/display/AST/PJSIP+Configuration+Wizard