Asterisk Server Consultant

Sample DAHDI installation After compiling and installing of dahdi and asterisk, you have to perform some further steps to use your hardware. This example will show you a few steps how to get asterisk and two Digium cards enabled: 1.) Detect your hardware   # (this will generate /etc/dahdi/system.conf and  /etc/asterisk/dahdi-channels.conf)  linux:~# dahdi_genconf 2.) Read … Read more

phpMyAdmin + CentOS 6.0 – Forbidden : phpmyadmin allow remote access centos

phpmyadmin

To remove and add access to phpmyadmin in asterisk : Add your IP as follow: vi /etc/httpd/conf.d/phpmyadmin.conf <Directory “/usr/share/phpmyadmin”> Order allow,deny Allow from all </Directory> Here in Allow from all and Allow from 192.168.0.10 Then issue the following command: # service httpd restart Now All done.      

shell script to backup files and directories in Linux using tar & cron jobs

Linux yum

The vi Editor http://t4test.com/blog/unix-linux-shell-script-introduction-to-shell-scripting/ http://t4test.com/blog/read-making-shell-script-interactive/ http://t4test.com/blog/cpio-a-backup-program/ Backup Using TAR Backing up your files using tar is very simple you just type a little command. tar -cvpzf /BackupDirectory/backupfilename.tar.gz /ImportantData/directory/path Let’s suppose i have directory called /imp-data on root and i want to make backup of this directory including sub directories on different location like in /mybackupfolder. … Read more

shell script to get yesterday’s date into a variable

a shell script which does the following to store the current day’s date in a variable ‘dt’: date “+%a %d/%m/%Y” | read dt echo ${dt} How would i go about getting yesterdays date into a variable?

SIP error code

SIP error code Code Meaning 1xx Informational — request received, continuing to process the request 2xx Success — the action was successfully received, understood, and accepted 3xx Redirection — further action needs to be taken in order to complete the request 4xx Client Error — the request contains bad syntax or cannot be fulfilled at … Read more

Find out Gateway / router IP address under Linux / UNIX using route command

You need to use route command. This command can manipulates the kernel’s IP routing tables. It can be also use to print gateway / router IP address. Type the following command to see default gateway: $ route -n Output: Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 10.0.10.54 0.0.0.0 255.255.255.0 U … Read more

sip show channel command not found

my problem is that I cannot run ‘sip show peers’ or any other sip commands from the CLI.   Solution:- Check your /etc/asterisk/sip.conf    file carefully. Find the missing one and restart the asterisk server (service asterisk restart) and go to asterisk cli prompt (asterisk -r) and type the SIP command. 🙂        

Shell script to show calender

Use your vi  editor to create shell script, script.sh . This script runs three echo commands and shows the use of variable evaluation and command substitution. It also prints the calender of the current month. #!/bin/sh echo “Today’s date : `date` ” echo “This month’s calender:” cal `date “+%m 20%y` echo “My shell : $SHELL” … Read more

VI editor – Linux command line editor

Linux yum

http://blog.eduguru.in/linux-2/the-vi-editor http://t4test.com/blog/unix-linux-shell-script-introduction-to-shell-scripting/ http://t4test.com/blog/cpio-a-backup-program/ http://t4test.com/blog/read-making-shell-script-interactive/ http://t4test.com/blog/root-system-administrator-super-user-part-1/ http://t4test.com/blog/etchosts-the-host-file/ VI editor  VI operates in three modes for performing different functions. —-The Command Mode is used to enter commands that operates on text or control cursor motion. —-The Input Mode is used to enter text. —-The ex Mode (or last line mode) is used for line handling and substitution. … Read more