SIP Clients not connecting with Asterisk 13.7.2 on CentOS 7

Hi Everyone,

I have scoured the forums all week to try and find a solution to my problem and now I am starting to confuse myself! I am trying to get Asterisk 13.7.2 set up with a few sip desk phones. I initially had AsteriskNow running on ubuntu and it worked internally fine. I wanted to switch to Asterisk 13.7.2 as I want to get a analogue card to connect my PSTN line to the system and believe using Asterisk 13.7.2 would help me achieve this easier.

I have reinstalled from scratch four times now, each time changing the install procedure but my results still remain the same. My question is, what information should I be seeing in the log files if my SIP phones were actually making contact with the server?

Asterisk installs fine and I create the sip.conf and extensions.conf following the Asterisk book and many guides on the net. I set the phones up (the same as I have done previously with AsteriskNow) and they fail to register with the server. I have switched all the sip debugging options on in the asterisk CLI in the hope that I might see some communication from the SIP phones in the log files, but i see nothing. The commands I have been using are:

Full => notice,warning,error,debug,verbose,dtmf

asterisk -vvvvvc

*CLI> core set verbose 5
*CLI> core set debug 5
*CLI> module reload logger

I then try to register the SIP phone (and a software SIP client), stop asterisk and view the file to find nothing has been logged between the starting and stopping entries. Is this normal? Or should I be seeing some kind of communication from my SIP devices, even if they did not register correctly? If this is the case then I suspect I’m having a network/firewall issue maybe? Any help/points in another direction would be much appreciated.

On a side note, I didn’t filter some errors I got from th log file on one test run. At the time I dismissed it as my device wasn’t communicating at all, but while I’m here, I though I would just run it past the experts to make sure I wasn’t dismissing something more important!!!

[Feb 12 09:00:04] WARNING[32157] loader.c: Error loading module ‘’: /usr/lib/asterisk/modules/ undefined symbol: stasis_app_register_all
[Feb 12 09:00:04] ERROR[32157] ari/config.c: No configured users for ARI
[Feb 12 09:00:04] ERROR[32157] res_config_pgsql.c: PostgreSQL RealTime: Failed to connect database asterisk on
[Feb 12 09:00:04] ERROR[32157] res_config_ldap.c: No directory URL or host found.
[Feb 12 09:00:04] ERROR[32157] res_config_ldap.c: Cannot load LDAP RealTime driver.

Again any help is greatly appreciated and sorry for the long post!

A quick workaround make sure asterisk is listening on the default port 5060 netstat -apn | grep -i asterisk

Check iptables rules iptables -L -n if is posible disable it temporarily as test " service iptables stop "

also would be good if you post your sip.conf file

1 Like

@GreyGoose69 you should take a look at this article:

It describes what you should expect to see in the SIP traffic for a registration from a PJSIP endpoint.

You might also try the very basic Hello World guide: to get a feel for setting up a single phone.

Oh! Additionally you can enable “pjsip set logger on” to see the PJSIP packet level trace in the console or in your log files.

Thanks for your replies!

I have checked what ports are listening using netstat and it seems the port is listening. The output was as follows:

udp 0 0* 2983/asterisk
udp 0 0* 2983/asterisk
unix 2 [ ACC ] STREAM LISTENING 19247 2983/asterisk /var/run/asterisk/asterisk.ctl

I have the iptables disabled using “service iptables stop” from the beginning to try and fault find.

For my sip.conf file, please see below. It is pretty much copy and pasted from the book. But cut back to the minimum I thought I could get away with.




@rnewton I tried using the “pjsip set logger on” and it returned no such command, which made me probe what modules are required. Could it be that I don’t have the correct modules loaded for pjsip? If this is the case, how does asterisk know which driver set to look at? (for example sip.conf or pjsip.conf?).

I followed the basic tutorial and still have no luck. It appears there is no communication being received at all by asterisk. I am starting to consider installing Asterisk 1.8 just for a change to see if I have any more luck.
On a side note, I am installing CentOS using the minimum installation option. By doing this could I be unknowingly not installing a critical package?

Likely then PJSIP isn’t installed, so only chan_sip is loaded. SIP Debugging messages from chan_sip can be output to the Asterisk console with “sip set debug on” and then “sip set debug off” to stop them.

That supports my suspicions. I’ve checked the loaded modules and nothing is loaded for PJSIP. Furthermore, when I checked the modules folder there was nothing there relating to PJSIP so it makes sense it is not installed.

I have set the “sip set debug on” after starting asterisk with "asterisk -cvvvvvddddd "and then tried to replicate the fault by attempting to register my hardware and software sip phones. Both fail registering. I have no output in the CLI regarding any attempted connection. I then shut down asterisk. When I check the log files, nothing has been written between asterisk starting and asterisk shutting down.

Sounds like the traffic from the phones is not hitting your system or Asterisk.

I’d run tcpdump/wireshark on that system to see if your phone traffic is hitting the network interfaces.

You might have a software firewall on the machine dropping packets.

Thanks for the advice. I ran tcpdump and found it couldn’t see any of my network traffic. So I ran ifconfig to find that my network adapter was listed as “enp2s0”. I found this unusual as I expected to see “eth0”. So I renamed the network interface using the following:

vim /etc/udev/rules.d/10-network.rules

SUBSYSTEM==“net”, ACTION==“add”, ATTR{address}==“xx:xx:xx:xx:xx:xx”, NAME=“eth0”


mv /etc/sysconfig/network-scripts/ifcfg-enpXxX /etc/sysconfig/network-scripts/ifcfg-eth0

I’m not sure if this was the right thing to do, but after a reset the network interface was renamed to eth0. After running tcpdump I see all my network activity. Filter out the address of my SIP phone and I get:

12:48:35.797353 IP > SIP, length: 486
12:48:35.797424 IP > ICMP host unreachable - admin prohibited, length 522

where 21 is my sip phone and 34 is my asterisk server. I get the same messages with my other sip phones and software phones on computer and android phone. So the SIP phone still fails to register. I have not installed iptables so it cant be a firewall on the asterik machine, or is there something else I am missing?

Now I have renamed my network interface, would I need to reinstall or reconfigure asterisk to reflect the changes I have made?

I know this thread is a little old, but I thought I should mention that Centos7 uses Firewalld instead of the iptables service. You might want to try and run firewall-cmd --state to see if you in fact do have a firewall running. Then man firewall-cmd for more info on configuring it.

I also am aware this thread is old but whatever. Centos 7 with Asterisk 13 works just fine. SIP and PJSIP. Been running it for months. It’s probably something simple you have wrong. A port or something. SIP and PJSIP cannot share the same port, so make sure they are each assigned a different port or that one or the other is disabled. Make sure no iptables rules. Even if you are running firewalld it creates iptables rules. Also make sure selinux is disabled.

There were PJSIP problems with v13.7 but nothing that would cause it to not work completely. It would stop responding after a few days and I would have to restart my server. There were a lot of PJSIP fixes since then and it seems to be working much better on v13.9