This article describes the system components responsible for call failure, while pointing some tips and tricks to help you fix this type of malfunctions.
The Asterisk output
It always helps to know what is happening with the system. You can provide feedback by keeping an Asterisk log and by sharing with us the information you have gathered.
The Asterisk output is required for almost every call-related problem. To find this output, take the following steps:
STEP 1: Log in to your VoipNow server as root
via SSH using your favorite console (e.g.: Putty
).
STEP 2: Enable SIP debugging as show below:
asterisk -rx "sip set debug on"
STEP 3: Create a log using the following command.
asterisk -rvvvvvvvvvvvvvvvvvvvvvvvvvvvvv >/usr/local/voipnow/admin/htdocs/asteriskoutput.txt
STEP 4: Make a call and when you end it, press Ctrl+C on the console to stop the logging.
STEP 5: If everything went well, you will be able to download the output file from:
https://[yourvoipnowserverIP]/asteriskoutput.txt
where [yourvoipnowserverIP]
is the IP address of your VoipNow server (for example 192.168.14.39)
STEP 6: When're done, you can disable SIP debugging using:
asterisk -rx "sip set debug off"
The Kamailio logs
These logs are useful in case incoming-call related problems occur.
When you set up a channel for the first time, it always helps to look at a Kamailio log file. Especially if you do not know the exact format of the number sent to the system by the provider.
To do so, take the following steps:
STEP 1: Log in to your VoipNow server as root
via SSH using your favorite console (e.g. Putty).
STEP 2: Increase the level of the debugging output:
STEP 3: Run the following command.
tail -f /var/log/kamailio/kamailio.log
STEP 4: Make a call and send the output, if any, to support. If the DID or the provider IP is not set up correctly on that channel, the following message will be displayed.
NOTICE: IP address 1.2.3.4 is not allowed to call DID number 12345678. Unauthorized request.
In this case, you must set up the IP to 1.2.3.4 on the same channel where, at an earlier point, you have defined the DID as 12345678.
STEP 5: When you're done, set the debug level to minimum.
Capturing the Tcpdump packets
In some cases, Asterisk does not give sufficient output, even if SIP debugging is enabled. This happens because Kamailio alters the packets sent by Asterisk. So, if you only have the Asterisk output, you cannot access all the information provided. This is a typical situation for using the tcpdump
tool.
To record VoIP traffic, take the following steps:
STEP 1: Log in to your VoipNow server as root
via SSH using your favorite console (e.g. Putty).
STEP 2: If tcpdump
is not already installed, do it using the following command.
STEP 3: Start recording VoIP network traffic (since all VoIP traffic consists in UDP traffic, you will record all UDP packets) by running the following command in the server console:
tcpdump -p udp -s 4096 -w /usr/local/voipnow/admin/htdocs/output.pcap
To download the packet tracing file, you need to go to https://[yourvoipnowserverIP]/output.pcap and analyze it with Wireshark.
How to further increase the Asterisk output
In some cases, the normal debugging level for Asterisk is not useful as it happens, for example, when you want to see how charging is computed or how faxes are debugged.
The solution is to increase the debugging output for Asterisk.
To do this, take the following steps:
STEP 1: Log in to your VoipNow server as root
via SSH using your favorite console (e.g. Putty).
STEP 2: Edit /etc/asterisk/logger.conf
and change:
console => notice,warning,error ; what to log on console
to
console => debug,notice,warning,error ; what to log on console
STEP 3: Then reload the logger module.
asterisk -rx "logger reload"
Related articles
-
Page:
-
Page:
-
Page:
-
Page:
-
Page: