Asterisk : Creating a Simple IVR Menu

[demo-menu] exten => s,1,Answer(500)    same => n(loop),Background(press-1&or&press-2)    same => n,WaitExten() exten => 1,1,Playback(you-entered)    same => n,SayNumber(1)    same => n,Goto(s,loop) exten => 2,1,Playback(you-entered)    same => n,SayNumber(2)    same => n,Goto(s,loop) [from-pstn] exten => 6598,1,Goto(demo-menu,s,1)

Mount.cifs cannot allocate memory mounting

Linux yum

Mounting a Windows (SMB) share on Ubuntu gives us a “cannot allocate memory” error. Executing a command like this: mount -t cifs //toad/Backup /media/backup -o user=username,password=password,iocharset=utf8,file_mode=0777,dir_mode=0777 We get an error like this: mount error(12): Cannot allocate memory Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) Solution: First, check the permissions on your shared folder. … Read more

Startup: Unable to load dynamic library ‘/usr/lib/php/modules/module.so’

this error come up while running a shell script to get the parameter from php file PHP Warning: PHP Startup: Unable to load dynamic library ‘/usr/lib/php/modules/module.so’ – /usr/lib/php/modules/module.so: cannot open shared object file: No such file or directory in Unknown on line 0  This is cause by mcrypt extension. Edit /etc/php.d/mcrypt.ini and change ; Enable … Read more

SQL FOREIGN KEY Constraint

CREATE TABLE product ( category INT NOT NULL, id INT NOT NULL, price DECIMAL, PRIMARY KEY(category, id) ) ENGINE=INNODB; CREATE TABLE customer ( id INT NOT NULL, PRIMARY KEY (id) ) ENGINE=INNODB; CREATE TABLE product_order ( no INT NOT NULL AUTO_INCREMENT, product_category INT NOT NULL, product_id INT NOT NULL, customer_id INT NOT NULL, PRIMARY KEY(no), … Read more

Creating a table with auto_increment

CREATE TABLE example_autoincrement ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, data VARCHAR(100) ); CREATE TABLE example_innodb ( id INT, data VARCHAR(100) ) TYPE=innodb;

MySQL CDR Backend – Asterisk

To use it, configure the module in cdr_mysql.conf. Create a table called cdr under the database name you will be using the following schema. Change the following entries in cdr_mysql.conf file located in /etc/asterisk/ folder. [global] hostname=10.0.30.47 dbname=asterisk table=cdr password=ASTERISK user=root port=3306 sock=/var/lib/mysql/mysql.sock userfield=1 loguniqueid=yes And then create a table to store the CDR data … Read more

Adding User Accounts mysql – asterisk database

MySQL Cluster

Create mysql user id after logging through root user. mysql -u root -p yourpasswordforroot CREATE USER ‘monty’@’localhost’ IDENTIFIED BY ‘some_pass’; GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP ON bankaccount*. TO ‘monty’@’localhost’; FLUSH PRIVILEGES;  

“bearercapability notauth” Zoiper error

The error ‘bearercapability notauth’ suggest that the credentials are not correct. If the credentials are definitely correct, this could indicate that the user might need to be purged on the VOIP/Asterisk server.