Troubleshooting

Basic troubleshooting issues you might experience in Asterisk

— Executing [103@internal:1] Answer(“SIP/101-00000003”, “”) in new stack

— Executing [103@internal:2] NoOp(“SIP/101-00000003”, “Internal-phone-call”) in new stack

— Executing [103@internal:3] Dial(“SIP/101-00000003”, “SIP/103,12,r”) in new stack

  1. [Aug 30 11:43:24] WARNING[2128][C-00000002]: chan_sip.c:6071 create_addr: Purely numeric hostname (103), and not a peer–rejecting!
  2. [Aug 30 11:43:24] WARNING[2128][C-00000002]: app_dial.c:2437 dial_exec_full: Unable to create channel of type ‘SIP’ (cause 20 – Subscriber absent)

== Everyone is busy/congested at this time (1:0/0/1)

— Executing [103@internal:4] VoiceMail(“SIP/101-00000003”, “103@internal-vm”) in new stack

  1. [Aug 30 11:43:24] WARNING[2128][C-00000002]: app_voicemail.c:6321 leave_voicemail: No entry in voicemail config file for ‘103’

1 This error occurred because the extension/user was not defined in sip.conf


2 This error occurred because the phone does not exist in sip.conf

1 This error occurs because a voicemail is not defined in voicemail.conf
View mailbox users, voicemail show users ** lists users from /etc/asterisk/voicemail.conf with voicemail accounts**

Installing and Configuring Asterisk CentOS 7

You will need a Linux OS to install Asterisk.

 

 

The above is version 7 32 or 64 depending on CPU and is a minimal install

 

  • Stuff to do once Linux OS is installed
  • vi /etc/sysconfig/network-scripts/ifcfg-eth0
  • Make sure onboot=yes change that from disabled
  • service network restart
  • ip addr show ( should show an ip address for eth0 )
  • yum -y update ( update the system without prompting )
  • shutdown -r now ( reboot system after updating to apply )
  • cd /usr/src
  • yum -y install wget ( install wget package to download files from the internet)
  • You can either wget Asterisk from up above or use CentOS repos to install Asterisk ( A word of caution is to make sure it is a LTS version or certified version of Asterisk)
  • yum method: yum -y install asterisk ( this will install asterisk with all dependencies )
  • It is also a good idea with CentOS to install the epel-release repo
  • yum -y install epel-release; yum repolist ( should install the epel-release and then list repos and should see epel)
  • If you download asterisk using wget
  • wget url-for-asterisk.tgz
  • tar zxfv name.of.file.tgz
  • cd name.of.folder
  • ** Have to install some custom files to run asterisk if you just run ./configure it’ll error out and complain**
  • yum -y install gcc gcc-c++ libxml2-devel sqlite-devel ncurses-devel
  • ./configure
  • make menuselect
  • make
  • make install
  • make samples ( install sample configuration files )
  • Have Asterisk start as a service
  • cd /usr/src/name-of-folder; cp contrib/init.d/rc.redhat.asterisk /etc/init.d/asterisk
  • vi /etc/init.d/asterisk ( locate AST_SBIN= ) replace that with AST_BIN=/usr/sbin/
  • service asterisk start ( if it complains about 64bit libraries do the following)
  • ┬áln -s /usr/lib/libasteriskssl.so.1 /usr/lib64/libasteriskssl.so.1 ( only if it complaines about 64bit .so file)
  • Disable selinux by vi /etc/selinux/config ( change SELINUX=enabled to SELINUX=disabled
  • shutdown -r now ( need to reboot otherwise selinux will enforce still )
  • chkconfig asterisk on ( enable to start on reboot ) or if chkconfig does not exist because of systemctl then use systemctl enable asterisk
  • systemctl status iptables or service iptables status ( if iptables is running need to disable )
  • systemctl disable iptables ( or firewalld ) service iptables stop systemctl stop iptables
  • chkconfig iptables off systemctl disable firewalld