Troubleshooting Asterisk dialplan related problems

To troubleshoot anything call related, the first step is usually to log into the Asterisk command line interface (CLI) and watch what happens to calls in real time.  To do that, simply type the following while logged into the Linux console as root user.

asterisk -vvvr

For even more verbose output try asterisk -vvvvvr.  For issuing commands with standard output try asterisk -r followed by core show help.

Example

Here is an example of how to troubleshoot an inbound DID number not working.

asterisk -vvvr
Connected to Asterisk 13.9.1 currently running on pbx1 (pid = 2903)
pbx1*CLI>
The following output is observed on the Asterisk CLI while making an inbound call
Executing [12345678900@from-trunk:1] Set("SIP/mysiptrunk-00000067", "__FROM_DID=12345678900") in new stack
-- Executing [12345678900@from-trunk:2] NoOp("SIP/mysiptrunk-00000067", "Received an unknown call with DID set to 12345678900") in new stack
-- Executing [12345678900@from-trunk:3] Goto("SIP/mysiptrunk-00000067", "s,a2") in new stack
-- Goto (from-trunk,s,2)
-- Executing [s@from-trunk:2] Answer("SIP/mysiptrunk-00000067", "") in new stack
-- Executing [s@from-trunk:3] Log("SIP/mysiptrunk-00000067", "WARNING,Friendly Scanner from ") in new stack
-- Executing [s@from-trunk:4] Wait("SIP/mysiptrunk-00000067", "2") in new stack
-- Executing [s@from-trunk:5] Playback("SIP/mysiptrunk-00000067", "ss-noservice") in new stack
-- <SIP/voipms-van2-pjsip-00000067> Playing 'ss-noservice.ulaw' (language 'en')

This tells us that our sip trunk, which we named mysiptrunk in our configuration, is sending us an inbound call with the DID number set to 12345678900.  The message "Received an unknown call with DID set to 12345678900" tells us that Asterisk does not recognize this DID number.  The end result is that asterisk plays the ss-noservice.ulaw message file.  The most likely problem is that we do not have a matching inbound route with the correct DID number assigned to it.

If there is a message such as "Rejecting unknown SIP connection from xx.xx.xx.xx", that usually means the host= statement in the trunk configuration is incorrect.  Sometimes trunk providers send calls from multiple IP addresses. In those situations you can create a separate trunk for each IP address the trunk provider uses.

If there are only lines that begin with Using SIP RTP TOS and Using SIP RTP COS, that could mean a missing or incorrect context= statement or incompatible codec setting in the trunk configuration.

If there is nothing at all this could also be incorrect context= or some other problem with the trunk configuration.   It could also be a configuration problem on the trunk provider end.

  • asterisk, dialplan, troubleshoot, cli

Related Articles

I have a bunch of anonymous call attempts showing up in my call logs

I have a bunch of calls that look something like this in the call logs. 2011-11-18...

Do I need to do anything on the server/linux side of things?

You should not have to do anything on the server/linux side unless you want to tweak things or...

How hard is it to upgrade my server?

Upgrading resources such as memory, processing, hard drive space is instantaneous and does not...

Do you automatically upgrade our software when a newer version comes out?

Software upgrades are not automatic because they usually require service interruption.  We can...

Do you provided automatic backups.

Our premium plan includes automatic online backups.  All other plans can be backed up manually...