Better SIP Security on Asterisk: How To Secure Asterisk

Seven Easy Steps to Better SIP Security on Asterisk: 1) Don’t accept SIP authentication requests from all IP addresses. Use the “permit=” and “deny=” lines in sip.conf to only allow a reasonable subset of IP addresess to reach each listed extension/user in your sip.conf file. Even if you accept inbound calls from “anywhere” (via [default]) … Read more

ISDN hangup cause codes

ISDN hangup cause codes provide information as to why a call has been terminated.  The list of hangup cause codes below provides detailed information as to the underlying cause behind a call hangup: Code No. 0 This is usually given by the router when none of the other codes apply. This cause usually occurs in … Read more

Asterisk DialStatus Channel Varriable

Asterisk channel variable DIALSTATUS Contains a text string signifying result of the last dial attempt: ANSWER: Call is answered. A successful dial. The caller reached the callee. BUSY: Busy signal. The dial command reached its number but the number is busy. NOANSWER: No answer. The dial command reached its number, the number rang for too … Read more

Asterisk cmd MYSQL

This is an ADD-ON of asterisk, is not installed by default and must be downloaded and installed with the asterisk-addons package.  However, in Asterisk 1.8 the addons have been integrated back into Asterisk. MYSQL(): Basic MYSQL Database Functionality (note that the help information returned from ‘show application MYSQL’ is a little misleading – what’s shown … Read more

Asterisk queue callback

SQL Table Structure If using the dialplan below, put the following table into a database called ‘acd‘. CREATE TABLE `bit_callers` ( `uniqueid` varchar(15) NOT NULL default ”, `callback` int(3) NOT NULL default ‘0’, `callbacknum` varchar(15) NOT NULL default ”, PRIMARY KEY (`uniqueid`), KEY `callback` (`callback`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; Dialplan Additions [support-queue] exten => s,1,Answer … Read more

Backup and Restore Mysql database table

MySQL Cluster

Dump and restore from .sql Dump mysqldump db_name table_name > table_name.sql Restore mysql -u <user_name> -p db_name mysql> source <full_path>/table_name.sql or in one line mysql -u username -p db_name < /path/to/table_name.sql Dump and restore from a compressed (.sql.gz) format Dump mysqldump db_name table_name | gzip > table_name.sql.gz Restore gunzip < table_name.sql.gz | mysql -u username … Read more

Setting to Limit SIP channels

Asterisk dial command

You have the 6 channels, and basically you have 6 calls going on… Now when you hang up the do hang up, they dont get stuck right? So you have 6 different peopel on the line and when 7 hits they block you and essentially your phone system is dead….? Ok, one thing you could … Read more