Monthly Archives: November 2012

VOIPMONITOR CENTOS 6.3


Install RPM
libogg-1.1.4-2.1.el6.x86_64.rpm
libogg-devel-1.1.4-2.1.el6.x86_64.rpm
libpcap-devel-1.0.0-6.20091201git117cb5.el6.x86_64.rpm
libsmi-0.4.8-4.el6.x86_64.rpm
libvorbis-1.2.3-4.el6_2.1.x86_64.rpm
libvorbis-devel-1.2.3-4.el6_2.1.x86_64.rpm
mtr-0.75-5.el6.x86_64.rpm
speex-1.2-0.12.rc1.1.el6.x86_64.rpm
subversion-1.6.11-7.el6.x86_64.rpm
unixODBC-devel-2.2.14-11.el6.x86_64.rpm
vorbis-tools-1.2.0-7.el6.x86_64.rpm
wireshark-1.2.15-2.el6_2.1.x86_64.rpm

Install VOIPMONITOR GUI
tar -zxvf voipmonitor-gui-5.0-SVN463.tar.gz
mv voipmonitor-gui-5.0-SVN463 voipmonitor
mv voipmonitor /var/www/html/
http://IP/voipmonitor
cp wkhtmltoimage-x86_64 /var/www/html/voipmonitor/bin/
cp wkhtmltoimage-x86_64 /var/www/html/voipmonitor/bin/

mkdir -p /var/spool/voipmonitor
chown apache /var/spool/voipmonitor/

IONCUBE
tar -zxvf ioncube_loaders_lin_x86-64.tar.gz
mv ioncube /usr/local/lib64/
vim /etc/php.ini
zend_extension = “/usr/local/lib64/ioncube/ioncube_loader_lin_5.3.so”
save!!
/etc/init.d/httpd restart
php -m
[Zend Modules]
the ionCube PHP Loader

Insert KEY
Insert key.php from web => click recheck

Create database voipmonitor
Isi semua form configuration web => submit

Login admin:admin => create user : moses:moses (is _administrator => checked )=> Logout => login as moses

Coba register 2 softphone dan coba call => apakah sudah terlihat trafik di web???
Install voipmonitor-svn
./configure => lihat prosessnya apakah ada yang kurang dependency
make && make install
cp config/voipmonitor.conf /etc/
cp config/init.d/voipmonitor /etc/init.d/
chkconfig –add voipmonitor
mysql -uroot -proot –database voipmonitor < cdrtable.sql

vim /etc/voipmonitor.conf

interface = eth1 => perhatikan interface yang di monitor
rtptimeout = 7200
spooldir = /var/spool/voipmonitor
sqldriver = mysql
mysqlhost = 127.0.0.1
mysqlport = 3306
mysqldb = voipmonitor
mysqltable = cdr
sqlcdrtable_last30d = cdr_last30d
sqlcdrtable_last7d = cdr_last7d
sqlcdrtable_last1d = cdr_last1d
mysqlusername = root
mysqlpassword = root

/etc/init.d/voipmonitor start => => voipmonitor –config-file /etc/voipmonitor.conf -k -v 1
Coba call antar extension


Advertisements

REGISTER SOFTPHONE TO WELGATE FXS AND CALL OTHER EXTENSION


LIIIIIIIIIIIIIIIIIIIIINNNNNNNNNNNNNNNNNPPPPPPPPPPPPPPPORRRRRRRRRRRRRRRNNNNNNNNNNNNNNN

PROXMOX , ACCESS VM FROM IP PUBLIC USING IPTABLE (NAT)


BEFORE

root@proxmox1:/etc/network# cat interfaces

# network interface settings
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address  192.168.137.104
netmask  255.255.255.0

iface eth1 inet manual

auto eth2
iface eth2 inet static
address  192.168.0.251
netmask  255.255.255.0

auto vmbr0
iface vmbr0 inet static
address  192.168.0.250
netmask  255.255.255.0
gateway  192.168.0.254
bridge_ports eth1
bridge_stp off

        bridge_fd 0
AFTER
root@proxmox1:/etc/network# cat interfaces

# network interface settings
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address 192.168.137.104
netmask 255.255.255.0

iface eth1 inet manual

auto eth2
iface eth2 inet static
address 192.168.0.251
netmask 255.255.255.0

auto vmbr0
iface vmbr0 inet static
address 192.168.0.250
netmask 255.255.255.0
gateway 192.168.0.254
bridge_ports eth1
bridge_stp off
bridge_fd 0
post-up echo 1 > /proc/sys/net/ipv4/conf/eth1/proxy_arp  (Perhatikan baris ini yah!!)

auto vmbr1
iface vmbr1 inet static
address 192.168.37.1
netmask 255.255.255.0
bridge_ports none
bridge_stp off
bridge_fd 0
post-up echo 1 > /proc/sys/net/ipv4/ip_forward
post-up iptables -t nat -A POSTROUTING -s ‘192.168.37.0/24’ -o vmbr0 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s ‘192.168.37.0/24’ -o vmbr0 -j MASQUERADE

Restart Network

root@proxmox1:/etc/network# /etc/init.d/networking restart

Run on HOST

iptables -t nat -A PREROUTING -i vmbr0 -p tcp –dport 2222 -j DNAT –to 192.168.37.2:22

iptables -t nat -A PREROUTING -i vmbr0 -p tcp –dport 8888 -j DNAT –to 192.168.37.2:80

 

VM :
ifconfig eth0 192.168.37.2 netmask 255.255.255.0

route add default gw 192.168.37.1

Thanks

 

 

 

SANGOMA + status_pri + status_connected + signal_strength


log_e1.sh

#!/bin/bash

#tambahkan di /etc/rc.local so di load pada saat start up server

#created by mustafa@intelix.co.id / mustafa tambunan

# chkconfig: 2345 99 15

. /etc/rc.d/init.d/functions

RETVAL=0
DATE=$(date +%Y-%m-%d)

monit_command(){
echo “”
echo “———————————————————————”
echo “Check Log Secara realtime”
echo “———————————————————————”
echo -n “tail -f /var/www/html/log_E1/${DATE}/status_pri.log”
echo “”
echo -n “tail -f /var/www/html/log_E1/${DATE}/status_connected.log”
echo “”
echo -n “tail -f /var/www/html/log_E1/${DATE}/signal_streng_w[1-5]g1.log”
echo “”
echo “———————————————————————”
echo “http://10.10.23.23/log_E1/&#8221;
echo “”

}

start_monit_e1() {
echo -n “Starting monitoring E1 services: ”
echo “”
CMD_START_E1=”/home/ecentrix/bin/e1_monitoring/monit_e1.sh 1>/dev/null 2>&1 &”
daemon $CMD_START_E1
RETVAL=$?
echo

echo “”
monit_command

return $RETVAL
}

stop_monit_e1(){
echo -n “Stop monitoring E1 services: ”
echo “”
PID=`ps -ef|grep monit_e1.sh | grep -v grep|grep -v vi|grep -v vim|grep -v tail|awk {‘print $2’}`
if [ “$PID” != “” ];then
kill $PID
RETVAL=$?
echo
return $RETVAL
fi
}

status_monit_e1(){
PID=`ps -ef|grep monit_e1.sh | grep -v grep|grep -v vi|grep -v vim|grep -v tail|awk {‘print $2’}`
if [ “$PID” != “” ];then
echo “”
echo “Server monitoring E1 (pid 17597) is running…”
monit_command
else
echo -n “Service monitoring E1 is stopped”
echo “”
fi
}

case “$1” in
start)
# Start daemons.
stop_monit_e1
sleep 1
start_monit_e1
sleep 1
;;
stop)
# Stop daemons.
stop_monit_e1
;;
status)
status_monit_e1
;;
restart)
stop_monit_e1
sleep 1
start_monit_e1
sleep 1
;;
*)
echo “Usage: command {start|stop|status|restart}”
exit 1
esac
exit 0

 

____________________________________________________________________________________________

monit_e1.sh

#!/bin/bash

#created by mustafa@intelix.co.id / mustafa tambunan

DATE=$(date +%Y-%m-%d)
_TIME=$(date ‘+TIME = %H:%M:%S’)
LOG_DIR=”/var/www/html/log_E1/${DATE}”
mkdir -p ${LOG_DIR}
ok=0
while [ $ok -eq 0 ]; do
echo “${_TIME}” | tee -a ${LOG_DIR}/status_pri.log
/usr/sbin/asterisk -rx ‘pri show spans’ | tee -a ${LOG_DIR}/status_pri.log

echo “${_TIME}” | tee -a ${LOG_DIR}/status_connected.log
/usr/sbin/wanrouter status | grep ‘AFT’ | tee -a ${LOG_DIR}/status_connected.log

for _inteface in 1 2 3 4 5; do
echo “${_TIME}” | tee -a ${LOG_DIR}/signal_strength_w”${_interface}”g1.log
/usr/sbin/wanpipemon -i w”${_inteface}”g1 -c Ta | tee -a ${LOG_DIR}/signal_strength_w”${_interface}”g1.log
done

sleep 1
done

 

MONITORING QUINTUM TENOR DX (PHP & PERL)


This slideshow requires JavaScript.

NEW-FEATURE [WELGATE WEB-SERVICE]


 

1.  Restart Welgate

URL sent is when we want to reboot welgate in Branch via web service http://$IP_ADDRESS_WELGATE/api.asp?username=$username&password=$password&mode=restart

Return : OK and NOT_OK

If successful, then his return is OK and if it fails returnnya is NOT_OK.

NOT_OK this could be a possibility because the wrong username and password, or URL address not found, etc..

2.      Monitoring the Status Line FXS

URL sent is:

http://$IP_ADDRESS_WELGATE/api.asp?username=$username&password=$password& lineType=fxs&mode=lineStatus

Return format:

api_status@Line,Account,Registered,CallState => separated hashtag (#)

RETURN SUCCESS:

Sample return to the 4 PORT

OK@1,6001,Not
Register,Idle#2,6002,Register,Talk#3,6003,Register,Idle,#4,6004,Register,Idle

Sample return for the 8 PORT

OK@1,6001,Not
Register,Idle#2,6002,Register,Talk#3,6003,Register,Idle,#4,6004,Register,Idle#

5,6005,Not
Register,Idle#6,6006,Register,Talk#7,6007,Register,Idle,#8,6008,Register,Idle

RETURN FAIL:

NOT_OK, NOT_OK this could be a possibility because the wrong
username and password, or URL address not found, etc..

3.      Monitoring the Status Line FXO

URL sent is:

http://$IP_ADDRESS_WELGATE/api.asp?username=$username&password=$password&#038;
lineType=fxo&mode=lineStatus

Return format:

api_status@Line,CallState

RETURN SUCCESS:

Sample return to the 4 PORT

OK@1,Not
Connected#2,Connected#3,Connected#4,Connected

Sample return for the 8 PORT

OK@1,NotConnected#2,Connected#3,Connected#4,Connected#5,Connected#6,Connected#7,Connected#8,Connected

RETURN FAIL:

NOT_OK, NOT_OK this could be a possibility because the wrong
username and password, or URL address not found, etc..

4.      Monitoring SipTrunk on FXO

URL sent is:

http://$IP_ADDRESS_WELGATE/api.asp?username=$username&password=$password&amp;
lineType=fxo&mode=sipTrunk

Return format:

api_status@Trunk ID,Register Type,TEL No,TEL No,Proxy Server
Port,Outbound Proxy,Outbound Server Port

RETURN SUCCESS:

Contoh return untuk yang 4 PORT

OK@1,Register,1000,192.168.0.140,5060,192.168.0.140,5060#1,Register,1001,192.168.0.141,5060,192.168.0.141,5060

RETURN FAIL:

NOT_OK, NOT_OK this could be a possibility because the wrong
username and password, or URL address not found, etc..

5.      Log in automatically

URL sent is:

http://$IP_ADDRESS_WELGATE/api.asp?username=$username&password=$password&#038;
mode=login

SUCCESS:

Automatically open a new tab and are logged!.

FAIL:

Still appear login form!

Thanks gozigomilis@gmail.com

cost, charge, fee
($USD 2000)

dhclient(1934) is already running – exiting.


[root@alfamart ~]# dhclient eth1
dhclient(1934) is already running – exiting.

This version of ISC DHCP is based on the release available
on ftp.isc.org. Features have been added and other changes
have been made to the base software release in order to make
it work better with this distribution.

Please report for this software via the Red Hat Bugzilla site:
http://bugzilla.redhat.com

exiting.

[root@alfamart ~]# ps -eLF | grep dhclient
root 969 1 969 0 1 2278 976 0 13:37 ? 00:00:00 /sbin/dhclient -1 -q -lf /var/lib/dhclient/dhclient-eth0.leases -pf /var/run/dhclient-eth0.pid eth0
root 1934 1 1934 0 1 2278 696 0 13:38 ? 00:00:00 dhclient eth2
root 16689 16647 16689 0 1 25809 900 0 17:12 pts/1 00:00:00 grep dhclient

kill -9 969 1934

[root@alfamart ~]# dhclient eth1

 

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: