Monthly Archives: September 2012

KERNEL PANIC SERVER ASTERISK


KERNEL PANIC SERVER ASTERISK

Alasan kenapa server asterisk kernel panic pada saat reboot/restart
 
1. Network di stop sebelum dahdi di stop (/etc/rc0.d/ & /etc/rc6.d/)
    K_NETWORK << K_DAHDI
 
    Urutan Normal adalah pada run level 0 dan 6
    KILL ASTERISK
    KILL DAHDI
    KILL NETWORK
 
2. Sedangkan pada proses Start-UP maka urutan yang benar adalah:
     START NETWORK
START DAHDI
     START ASTERISK
 
Kalau ada Sangoma/wanrouter maka Proses Start-UP adalah
Network -> wanrouter -> dahdi-> asterisk
 
Sebelum menginstall wanpipe pastikan asterisk dan dahdi dalam keadaan stop dan jalankan wanrouter hwproble
 
Command  Carcep:
[root@telenet moses]# ls -l /etc/rc[036].d/* | egrep -i “dahdi|asterisk|network” | awk ‘{print $9}’
atau
[root@telenet moses]# find /etc/rc.d/ -name ‘*asterisk’ -print

/etc/rc0.d/K60asterisk
/etc/rc0.d/K87dahdi
/etc/rc0.d/K90network
/etc/rc3.d/S10network
/etc/rc3.d/S13dahdi
/etc/rc3.d/S90asterisk
/etc/rc6.d/K60asterisk
/etc/rc6.d/K87dahdi
/etc/rc6.d/K90network
 
Conclution : {Run level 0 & 6 } = > ASTERISK -> DAHDI -> NETWORK
                       {Run level 3        }  = > NETWORK -> DAHDI -> ASTERISK
 
 
Bagaimana cara memodifikasi RUN LEVEL STARTUP & STOPNYA?
 
1. Buka file /etc/init.d/servicename
2. Lihat variable :
   #chkconfig: 2345 80 05
Arti script diatas adalah akan di STARTUP (START) = 80 (2345) & di STOP (KILL) 05
    Maka format /etc/rc[0-6] adalah
/etc/rc[2-5].d/K80SERVICENAME dan /etc/rc[0,1,6].d/K05SERVICENAME
3. Nah, jika ingin merubah, maka buka file tersebut /etc/init.d/servicename dan rubah
   variable,misalnya: START = 90 dan KILL = 60 (perhatikan bahwa ID tersebut belum digunakan)

   chkconfig: 2345 90 60 -> save
4. Jalankan command:
    chkconfig dahdi reset
   Untuk memastikan sudah berubah maka jalankan lagi command:
   [root@telenet moses]# find /etc/rc.d/ -name ‘*asterisk’ -print
Advertisements

BATCH AT COMMAND


Command Example

Description

at now + 10 minutes

Associated jobs will start in 10 minutes.

at now + 2 hours

Associated jobs will start in 2 hours.

at now + 1 day

Associated jobs will start in 1 day (24 hours).

at now + 1 week

Associated jobs will start in 7 days.

at teatime

Associated jobs will start at 4:00 P.M.

at 3:00 6/13/07

Associated jobs will start on June 13, 2007, at 3:00 A.M.

$ at 10 am tomorrow

$ at 11:00 next month

$ at 22:00 today

$ at now + 1 week

$ at noon

The Linux at command permission files (/etc/at.allow and /etc/at.deny)

Contoh:

[root@ecentos621 bin]# at -f /home/ecentrix/bin/test01.sh now + 1 minutes
job 8 at 2012-09-10 17:45

View

[root@ecentos621 bin]# atq
8 2012-09-10 17:45 a root

Remove

[root@ecentos621 bin]# atrm 8

Contoh 2

[root@ecentos621 bin]# atq
[root@ecentos621 bin]# at now + 1 minutes
at> /home/ecentrix/bin/test01.sh
at> <EOT>  ====================================> CTRL + d
job 9 at 2012-09-10 17:46

View

[root@ecentos621 bin]# atq
9 2012-09-10 17:46 a root

CHECK SERVICE ATD

STATUS=$(/etc/init.d/atd status | grep “running” | wc -l)

if [ “${CL}” -eq “0” ]; then

/etc/init.d/atd start

fi

reload dialplan asterisk using crontab


11 17 * * * sh /home/ecentrix/bin/test01.sh 2>&1 > /var/log/test01

TIDAK JALAN

cp -rf /etc/asterisk/extensions.conf /etc/asterisk/moses-$(date +%Y%m%d-%H%M%S)
asterisk -rx “dialplan reload”

BERJALAN DENGAN BENAR

cp -rf /etc/asterisk/extensions.conf /etc/asterisk/moses-$(date +%Y%m%d-%H%M%S)
/usr/sbin/asterisk -rx “dialplan reload”

 

menit|jam|hari_dalam_bulan|bulan|hari_dalam_seminggu
0-59|0-23|1-31|1-12|0-6

0=minggu,6=sabtu

Senin-Jumat pukul 15:59
59 15 * * 1,2,3,4,5 sh /home/ecentrix/bin/extensions_malam.sh 2>&1 > /var/log/extensions_malam.log

Sabtu Pukul 13:59
59 13 * * 6 sh /home/ecentrix/bin/extensions_malam.sh 2>&1 > /var/log/extensions_malam.log
Senin-Sabtu 07:59
59 07 * * 1,2,3,4,5,6 sh /home/ecentrix/bin/extensions_pagi.sh 2>&1 > /var/log/extensions_pagi.log

lame lame* lame-* ffmpeg ffmpeg-devel,libmcrypt-devel


rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-7.noarch.rpm

yum -y install libmcrypt-devel mhash-devel freetds-devel awk*

rpm -ivh http://apt.sw.be/redhat/el5/en/x86_64/rpmforge/RPMS/rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm
yum install lame lame* lame-* ffmpeg ffmpeg-devel

FUNCTION FILTER() ASTERISK


exten => _X.,1,Set(A_NUMBER=${FILTER(0-9,${EXTEN})})
exten => _X.,n,Dial(SIP/1000/${A_NUMBER},${DIALTIMEOUT},${DIALOPTIONS}tT)
exten => _X.,n,Noop(HANGUPCAUSE=${HANGUPCAUSE} DAN DIALSTATUS=${DIALSTATUS})
exten => _X.,n,Hangup()
exten => h,1,Hangup()
exten => s,1,Hangup()

 

shisdew

Listens until think alike

moses.spaceku@yahoo.com / voip ipbx

Hosted PBX, IP-PBX SOHO/ CALL CENTER, VOICE GATEWAY, VOICE CARD, COST EFECTIVE SOLUTIONS (LCR), GSM/CDMA GATEWAY

%d bloggers like this: