The Guru Of Tech - Gobind

Asterisk Insall, Codec Install, Vicidial Install.

Monday, February 27, 2012

How to continue processing a context after a Hangup

Asterisk Application ‘System()’ in h extension tocreate callfile which will handle your callback.You can also try for ‘Originate()’ application. Example: [Main]exten => 111,1,Goto(cb,1,1)exten => 222,1,Dial(SIP/666666) [cb]exten => 1,1,NoOp(Incoming call from # ${CALLERID(num)})exten => 1,n,Goto(callback,333,1) [callback];prepare for callbackexten => 333,1,NoOp(Hangup then callback to cellphone)exten => 333,2,Hangup exten => h,1,NoOp(copy callback.call file to /var/spool/asterisk/outgoing)exten => h,n,System(echo -e "Channel:...

Thursday, February 23, 2012

Asterisk Callback to the ANI and Dial another Call and Bridge them

Auto Callback to the ANI when ANI answers by the user, we Dial another Call and Bridge them [Main]exten => 111,1,Goto(cb,1,1)exten => 222,1,Dial(SIP/666666) [cb]exten => 1,1,NoOp(Incoming call from # ${CALLERID(num)})exten => 1,n,Goto(callback,333,1) [callback];prepare for callback exten => 333,1,NoOp(Hangup then callback to cellphone)exten => 333,2,Hangup exten => h,1,NoOp(copy callback.call file to /var/spool/asterisk/outgoing)exten => h,n,System(echo -e "Channel: SIP/${CALLERID(num)}\\nContext: Main\\nExtension: 222"...

Asterisk - Executing call files in the future

[Alarm-Algo]exten => _*99*XXXXXXXXXXXX,1,Answer()exten => _*99*XXXXXXXXXXXX,n,Set(year=${EXTEN:4:4})exten => _*99*XXXXXXXXXXXX,n,Set(month=${EXTEN:8:2})exten => _*99*XXXXXXXXXXXX,n,Set(day=${EXTEN:10:2})exten => _*99*XXXXXXXXXXXX,n,Set(hours=${EXTEN:12:2})exten => _*99*XXXXXXXXXXXX,n,Set(minutes=${EXTEN:14:2})exten => _*99*XXXXXXXXXXXX,n,NoOp(Wake-up call scheduled for ${CALLERID(num)} at ${hours}:${minutes} on ${day}.${month}.${year}.)exten => _*99*XXXXXXXXXXXX,n,System(echo -e "Channel: SIP/${CALLERID(num)}\\nContext:...

Saturday, February 18, 2012

Running Linux Commands through PHP

I have prepared a module that will show the CPU utilization, current processes, memory utilization and disk quota of a remote system when asked on a PHP page Below is the syntax and code in PHP and HTML just copy and paste it on the desired directory. <table width="900" border="0" cellpadding="3" cellspacing="3"><tr bgcolor="#666666">    <td align="center"><font color="#FFFFFF"><b><h1><?php system("hostname"); ?></h1></b></font></td>  </tr> ...

Friday, February 10, 2012

Can't create PID PostMasterMailbox, because it's already running in OTRS

If you are getting this error " Can't create PID PostMasterMailbox, because it's already running" in SYSconfig in OTRS ADMIN to check the processes type the command on the command prompt #> ps -ef | grep PostMasterMailbox.pl then go to mysql and check mysql> select * from process_id where process_name = 'PostMasterMailbox'; mysql> delete from process_id where process_name = 'PostMasterMailbox'; and lastly run the following command to start the postmaster to fetch the mails bin/otrs.PostMasterMailbox.pl -f...

CronJob Setting for OTRS

To See type the command crontab -l -u otrs (--l for list --e for edit) [root@server ~]# crontab -e -u otrs # This software comes with ABSOLUTELY NO WARRANTY. For details, see # the enclosed file COPYING for license information (AGPL). If you # did not receive this file, see http://www.gnu.org/licenses/agpl.txt. # -- # check daily the spool directory of OTRS #10 0 * * * * [ -e /etc/init.d/otrs ] && /etc/init.d/otrs cleanup >> /dev/null; [ -e /etc/rc.d/init.d/otrs ] && /etc/rc.d/init.d/otrs cleanup >> /dev/null 10...

Schedule tasks on Linux using crontab

To see what crontabs are currently running on your system #crontab -l To edit the list of cronjobs #crontab -e -u root -e=edit -u=user root (root is user) Cronjobs are written in the following format * * * * * /bin/execute/this/script.sh Scheduling explained As you can see there are 5 stars. The stars represent different date parts in the following order: 1. minute (from 0 to 59) 2. hour (from 0 to 23) 3. day of month (from 1 to 31) 4. month (from 1 to 12) 5. day of week (from 0 to 6) (0=Sunday) Execute every Friday 1AM...

Remove CPAN modules

Type the command#yum remove perl perl-CPAN ...

Syntax to block an IP address under Linux

If you just want to block access to all port from an ip 65.55.44.100 then type command : #iptables -A INPUT -s 65.55.44.100 -j DROP #service iptables save #service iptables restart If you just want to block access to one port from an ip 65.55.44.100 to port 25 then type command: # iptables -A INPUT -s 65.55.44.100 -p tcp --destination-port 25 -j DROP #service iptables save #service iptables restart Unblock An IP Address: Use the following syntax (the -d options deletes the rule from table): # iptables -D INPUT -s 65.55.44.100 -j DROP # service...

Shows network status under Linux

Displays generic net statistics of the host you are currently connected to. #netstat Shows all connections to the server including the source and destination ips and ports if you have proper permissions. #netstat -an Displays routing table for all ips bound to the server. #netstat -rn Display the amount of active connections on port 80. Removing the pipe and wc command would display each connection. #netstat -an |grep :80 |wc -l Display active Internet connections. #netstat -natp Display the Port of ssh #netstat -lntp | grep ssh ...

Linux top command interface details

Linux top command interface The first row shows the same content and the uptime command, [l] can show and hide this area First Line top: This is not what it meant, just a name and to01:47:56: current system time up 1:26: System boot to the elapsed time is now 2 users: currently 2 users online load average: 0.00,0.00,0.00: System 1 minute, 5 minutes, 15 minutes of CPU load information Second line: Tasks: English meaning of work; task; errand. 38 total: well understood, is the current 38 missions, which is 38 processes. 1 running: 1 one...

To Install 'FreeSWITCH' on CentOS/RedHat/Fedora

================================================== =========== ================================================== =========== Execute following commands at shell: ___________________________________________ Installing Dependencies {Require Internet} =========================================== yum -y install autoconf automake libtool gcc-c++ ncurses-devel yum -y install make expat-devel zlib zlib-devel libjpeg-devel unixODBC-devel yum -y install openssl-devel gnutls-devel libogg-devel libvorbis-devel yum -y install curl-devel libtiff-devel...

For checking PRI status and Configuration

Dahdi Channels Configurations 1> cd /etc/asterisk 2> nano dahdi-channels.conf (use nano or vi editor) To check PRI status CLI> pri show spans ...

Get Hardware information about your centos based system

Get Hardware information about your centos based system dmidecode The dmidecode command reads the system DMI table to display hardware and BIOS information of the system. This command will give you information on the current configuration of your system, as well as the system's maximum supported configuration. For example, dmidecode gives both the current RAM on the system and the maximum RAM supported by the system dmidecode option requires an argument...

Find out what perl modules already installed on Centos

List installed perl module Type # perldoc perllocal OR #instmodsh Output: Available commands are: l - List all installed modules m - Select a module q - Quit the program cmd? At cmd? prompt type l to list all installed modules: cmd? l ...

Codec G729 installation In Vicidial

wget http://asterisk.hosting.lv/bin12/codec_g729-ast12-gcc4-glibc-pentium4.socp codec_g729-ast12-gcc4-glibc-pentium4.so /usr/lib/asterisk/modules/codec_g729.so chmod +x /usr/lib/asterisk/modules/codec_g729.so stop asterisk (from CLI: stop now) and restart it by running: /usr/share/astguiclient/start_asterisk_boot.pl Check whether the codecs where loaded from asterisk CLI: > show translation OR core show transalation...