Asterisk not accepting calls

Am running asterisk 16.10,0 in my linux server.
It is up and running,i can see the pid and ctl socket
But whenever i register my softphone and made a call,it is not responding not even error logs.

netstat -pln | grep asterisk

tcp 0 0 0.0.0.0:2000 0.0.0.0:* LISTEN 30658/asterisk
udp 0 0 0.0.0.0:4520 0.0.0.0:* 30658/asterisk
udp 0 0 0.0.0.0:4569 0.0.0.0:* 30658/asterisk
udp 0 0 0.0.0.0:2727 0.0.0.0:* 30658/asterisk
udp 0 0 0.0.0.0:5000 0.0.0.0:* 30658/asterisk
udp 0 0 0.0.0.0:5060 0.0.0.0:* 30658/asterisk
udp 0 0 0.0.0.0:60793 0.0.0.0:* 30658/asterisk
udp 0 0 :::45157 :::* 30658/asterisk
unix 2 [ ACC ] STREAM LISTENING 95914518 30658/asterisk/ var/run/asterisk/asterisk.ctl
unix 2 [ ACC ] STREAM LISTENING 4251527729 1/systemd /var/run/asterisk/asterisk.ctl

Here there are two ctl lisitening,my guess is i need to kill systemd asterisk.ctl

And also while stopping asterisk it showing a warning

Stopping asterisk (via systemctl): Warning: Stopping asterisk.service, but it can still be activated by:asterisk-cli.socket

Kindly suggest me to what to do…

netstat is only showing 1 pid, so I kinda trust that. I think the systemctl warning is telling you asterisk-cli is enabled. My isn’t. I don’t know if it is an issue.

After

sudo systemctl stop asterisk

you could always do:

ps -aef | grep asterisk

to make sure :slight_smile:

Or:

sudo netstat -a -n -p | grep :5060

to see if any other process is listening to 5060.

I would confirm your softphone is sending to the correct host by:

sudo tcpdump -i any -n port 5060

If packets are only being seen and not replied to, check iptables since tcpdump looks at packets before iptables.

Then, I’d move on to Asterisk and enable SIP logging by:

sip set debug on
or
pjsip set logger on

to get a clue what Asterisk thinks your softphone wants to do.

If you post anything other than plain text (dialplan snippets, console logs, tcpdump output), please cut-n-paste into Preformatted text so we see what you see :slight_smile:

1 Like

Thanks for the reply,its really helpfull.

As you suggestted i did netstat -a -n -p | grep :5060

udp        0      0 0.0.0.0:5060                0.0.0.0:*                               31771/asterisk
udp        0      0 192.168.151.158:5060        0.0.0.0:*                               14127/xmserver
udp        0      0 192.168.151.144:5060        0.0.0.0:*                               14127/xmserver

This means already 5060 port is used so i need to kill 14127?

And also i did tcpdump -i any -n port 5060

tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on any, link-type LINUX_SLL (Linux cooked), capture size 65535 bytes
^C
0 packets captured
5 packets received by filter
0 packets dropped by kernel

There is no logs for the call and also the cli is empty even after debugging enabled

This all i got,kindly guide me to do the necessary as i am new to asterisk and also am in need to complete it.

Sounds like a good idea. I’d also restart Asterisk to make sure xmserver didn’t interfere with access to 5060. And then run through the suggested steps again.

1 Like

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