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

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

Asterisk RealTime database Architecture

Asterisk dial command

Terminology/Files Driver – A compiled module containing database specific code that accepts the generalized function calls that RealTime makes. As of this writing, only ODBC, MySQL (via asterisk-addons) and LDAP (see http://free.oxymium.net/Asterisk/ and http://bugs.digium.com/view.php?id=5768) drivers are available. Family – A name associated with a RealTime call. Examples: sippeers, sipusers, voicemail. extconfig.conf – The configuration file … Read more

Clear the soft phone ID – Request Hungup channel

 Request Hungup channel:- soft hangup:  Request a hangup on a given channel  “channel request hangup SIP/100 -1231” To close all active channels: channel request hangup all

Free G729 codec for asterisk

Installing Free g729 codec in asterisk 1. Download the appropriate codec from the below link http://asterisk.hosting.lv/ Check your asterisk version  —  asterisk –rx “core show version” check whether 32bit or 64 bit —  uname -a For asterisk 1.4 version and 32 bit Pentium based server (like intelxeon ,p4, dualcore core2duo0 http://asterisk.hosting.lv/bin/codec_g729-ast14-gcc4-glibc-pentium4.so For asterisk 1.4 and 64bit … Read more

Watch active calls/channels in Asterisk server from CLI

To Watch number of active channels watch “asterisk -vvvvvrx ‘show channels’ | grep channels” To Watch number of active calls watch “asterisk -vvvvvrx ‘show channels’ | grep calls” To Watch active channels watch “asterisk -vvvvvrx ‘show channels verbose’” To Watch active channels in Asterisk watch “asterisk -vvvvvrx ‘core show channels verbose’”

Asterisk – best practice to play multiple sound files in .call files

If you want to play multiple sound file with .call then you can send it like this: Setvar: file_max=2 Setvar: file1=custom/1_message Setvar: file2=custom/2_message After that use asterisk’s dialplan to play files one-by-one. For example like this: exten => 123,3,Set(i=0); exten => 123,n(loop),Set(i=$[ ${i} + 1 ]) exten => 123,n,GotoIF($[ $i > ${file_max} ]?exit) exten => … Read more

Asterisk Play a file while calling for curl

In my dialplan I need to call a php file like below: exten => 6666,n,Set(foo=${CURL(http://reports.cr.mrgroup.in/IVR/sp.php?tid=${tid})}) it gives reponse after 1 min or 2min , I want to play a music file in these times. please give me some idea how to achieve this and if there any other option.