วันเสาร์ที่ 15 พฤษภาคม พ.ศ. 2553

The Asterisk Monitor Web Panel

มีหลายๆคน ที่ทำเกี่ยวกับ VoIP (IP-PBX) โดยใช้ เจ้าตัว Asterisk นั้น ได้มาถามผมว่า มี Tools ตัวไหน
บ้างไหม อ่ะที่ สามารถ monitor ผ่าน web page เพื่อดูว่า มี user ไหน online อยู่บ้าง
ผมก็ได้ไป จ๊ะเอ๋ กับเจ้าตัว Monast [แต่ผมว่า Asterisk GUI ยัง work กว่าน่ะ]
งั้นก็มาเริ่มเรื่องกันเลยดีกว่า ไอเสือ ลุย

อันนี้ผมอ้างอิงกับ OS : Redhat Enterprise 5
ตัวนี้ supports กับ asterisk version 1.4 และ 1.6 ครับ

ขั้นแรก ก็
ทำการสร้าง directory ขึ้นมาเพื่อทำการเก็บ source ก่อนน่ะคับ

# mkdir monast

# cd monast

#svn checkout https://monast.svn.sourceforge.net/svnroot/monast/trunk/

เมื่อทำการโหลด source เสร็จเรียบร้อยแล้ว ก็ให้ทำการเพิ่มสิทธ์ ให้กับไฟล์ install.sh เพื่อให้สามารถทำการ execute ได้

# chmod +x install.sh

# ./install.sh

เมื่อทำการติดตั้งเสร็จแล้วก็ใ้ห้ทำการ แก้ไข ค่าต่างๆให้ถูกต้อง

filename : /etc/monast.conf

hostname = localhost
hostport = 5038
username = userasterisk
password = passasterisk

================================================

filename : /etc/asterisk/manager.conf

[general]
enabled = yes
webenabled = yes
port = 5038
bindaddr = 0.0.0.0


[userasterisk]
secret = passasterisk
read = system,call,log,verbose,agent,user,config,dtmf,reporting,cdr,dialplan
write = system,call,agent,user,config,command,reporting,originate

========================================================

จากนั้นก็ทำการ restart asterisk ก่อนครับ
เมื่อทำการ restart asterisk เรียบร้อยแล้ว ก็ให้ทำการสั่ง run

# /root/monast/pymon/monast.py
เมื่อ run ผ่านแล้วก็ให้ทำการเปิด Browser ไปที่ localhost/monast
ก็จะได้หน้าตาแบบนี้ครับ

แต่ถ้าขึ้นว่า

Monast Error

Could not connect to localhost:5039 (Connection refused).

Make sure monast.py is running so the panel can connect to its port properly.

ให้ตรวจสอบให้แน่ใจว่าได้ทำการ run /root/monast/pymon/monast.py อยู่

ป้ายกำกับ:

0 ความคิดเห็น:

แสดงความคิดเห็น

สมัครสมาชิก ส่งความคิดเห็น [Atom]

<< หน้าแรก