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

php sql server connection : connect to MS SQL Server database

<?php $myServer = “localhost”; $myUser = “your_name”; $myPass = “your_password”; $myDB = “examples”; //connection to the database $dbhandle = mssql_connect($myServer, $myUser, $myPass) or die(“Couldn’t connect to SQL Server on $myServer”); //select a database to work with $selected = mssql_select_db($myDB, $dbhandle) or die(“Couldn’t open database $myDB”); //declare the SQL statement that will query the database $query … Read more

Execute root commands via PHP

I have a CentOS 5.7 linux server and use php5.3.x. On a pfSense system, you can restart services-that required root permissions using a php web page. I’m trying to do something similar, I have written some php code to execute shell commands. For example, to restart the sshd service: <?php exec(‘/sbin/service sshd restart’); ?> and … 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

No route to host (113)

In host machine iptables is running and is blocking the port 5901. Kill all the vncserver desktop in the host machine and run the following command in the terminal. Type the password for the user when prompted. sudo iptables -I INPUT 1 -p tcp –dport 5901 -j ACCEPT The above command will add the port 5901 … Read more