The Guru Of Tech - Gobind

Asterisk Insall, Codec Install, Vicidial Install.

Thursday, June 21, 2012

Sending Email From the dialplan

exten => s,1,NoOp() exten => s,n,System(echo "To: simplesunny@gmail.com" > /opt/etc/init.d/calls) exten => s,n,System(echo "Subject: [PBX]: Service Down" >> /opt/etc/init.d/calls) exten => s,n,System(echo "" >> /opt/etc/init.d/calls) exten => s,n,System(echo "service down at ${STRFTIME(%C%m%d%y%H%M)}" >> /opt/etc/init.d/calls) exten => s,n,System(sendmail -t -f noc@gmail.com < /opt/etc/init.d/calls) exten => s,n,Hangup sub mailSend { my ($subj, $body) = @_; my(@da, @day, @mon, $datetime, $expTO, $mail,...

Friday, June 1, 2012

Backup Your MySQL Database Using PHP

One of the most important tasks any developer needs to do often is back up their MySQL database. In many cases, the database is what drives most of the site. While most web hosts do a daily backup of a customer's database, relying on them to make backups and provide them at no cost is risky to say the least. That's why I've created a database backup function that I can call whenever I want -- including nightly CRONs. The PHP & MySQL Codebackup_tables('localhost','username','password','databasename');  /* backup the db OR just...