สอบถามครัีบ การ restart service

Elastix IP Pbx

Moderator: jubjang

สอบถามครัีบ การ restart service

โพสต์โดย tarojung » 02 มี.ค. 2011 08:56

สอบถามครับใน elastix เขียน Dialplan ให้สามารถ restart service เอง ได้มั้ยครับ คือผมมีปัญหาสายค้างในส่วนของ Fxo ที่โทรไปข้ัางนอก

แล้วอยากให้แบบโทรเข้าไปแล้วให้มันเคลียร์สายให้เองครับ อยากทราบว่าทำอย่างไร ช่วยแนะนำวิธีเขียนหน่อยครับ

ขอบคุณครับ
tarojung
Bronz Member
 
โพสต์: 16
ลงทะเบียนเมื่อ: 11 ก.ค. 2010 17:41

Re: สอบถามครัีบ การ restart service

โพสต์โดย nuiz » 02 มี.ค. 2011 12:20

ใช้ fxo แบบไหนครับ เป็น fxo card หรือว่า fxo voip gateway

กรณีเป็น fxo card มันมีพารามิเตอร์อยู่ครับว่าจะให้เคลียร์สายภายในกี่วินาที ไม่ทราบว่าใช้ zaptel หรือว่า dahdi จะได้บอกชื่อไฟล์ถูกครับ

กรณีเป็น fxo voip gateway ปกติจะเซ็ตบอกมันว่า disconnect tone หรือ busy tone มีช่วง pulse on/off อย่างละกี่ millisecond
** หากมีปัญหากับอุปกรณ์ที่ซื้อมาเองหรือบริการที่ทำขึ้นมาเอง ให้โพสต์ถามในเว็บบอร์ดนี้นะครับ **
** งานเร่งด่วนติดต่อว่าจ้างที่เบอร์ 08-5161-9439 อีเมล์ iamaladin@gmail.com ไลน์ NuizVoip ครับ **
nuiz
Diamond Member
 
โพสต์: 6995
ลงทะเบียนเมื่อ: 24 มี.ค. 2010 09:33

Re: สอบถามครัีบ การ restart service

โพสต์โดย tarojung » 02 มี.ค. 2011 13:01

ใช้แบบ เป็น fxo card ครับ

ใช้แบบ dahdi ครับ คือปัญหามันเกิดเป็นบางครั้งครับที่ไม่ยอมวางสาย แล้วถ้าเราเขียน dialplan ไป restart dahdi ได้หรือเปล่าครับ

รบกวนช่วยแนะนำครับ

ขอบคุณครับ
tarojung
Bronz Member
 
โพสต์: 16
ลงทะเบียนเมื่อ: 11 ก.ค. 2010 17:41

Re: สอบถามครัีบ การ restart service

โพสต์โดย nuiz » 02 มี.ค. 2011 13:44

ครับ ปกติจะเป็นปัญหาเมื่อด้าน fxo วางสายก่อน เป็นเพราะว่าการ์ด fxo มัน detect สัญญาณ disconnect tone หรือ busy tone จาก pstn ได้บ้าง ไม่ได้บ้าง ลองทำแบบนี้ก่อนก็ได้ครับ

ในไฟล์ /etc/asterisk/chan_dahdi.conf มีพารามิเตอร์ที่เกี่ยวกับ hangup อยู่หลายตัวครับ เกี่ยวเนื่องกัน ดังนี้

;busydetect=yes
;
; If busydetect is enabled, it is also possible to specify how many busy tones
; to wait for before hanging up. The default is 3, but it might be
; safer to set to 6 or even 8. Mind that the higher the number, the more
; time that will be needed to hangup a channel, but lowers the probability
; that you will get random hangups.
;
;busycount=6
;
; If busydetect is enabled, it is also possible to specify the cadence of your
; busy signal. In many countries, it is 500msec on, 500msec off. Without
; busypattern specified, we'll accept any regular sound-silence pattern that
; repeats <busycount> times as a busy signal. If you specify busypattern,
; then we'll further check the length of the sound (tone) and silence, which
; will further reduce the chance of a false positive.
;
;busypattern=500,500
;
; NOTE: In make menuselect, you'll find further options to tweak the busy
; detector. If your country has a busy tone with the same length tone and
; silence (as many countries do), consider enabling the
; BUSYDETECT_COMPARE_TONE_AND_SILENCE option.
;
; To further detect which hangup tone your telco provider is sending, it is
; useful to use the ztmonitor utility to record the audio that main/dsp.c
; is receiving after the caller hangs up.

;tonezone = 36

บรรทัดสุดท้าย ตัวเลข 36 คือ Thailand ครับ

ลองปรับดูก่อนนะครับ เผื่อจะช่วยได้

สำหรับ pstn ในประเทศไทย ของ tot ค่า busy tone/busy pattern นี้จะเป็น ดัง 0.5 sec และ ดับ 0.5 sec ดังนั้นบรรทัด busypattern เป็น 500,500 ครับ

เอาเครื่องหมาย ; หน้าบรรทัดออก

แต่ถ้าเอา fxo ไปต่อกับตู้ pabx ก็ต้องลองฟังเสียงดูครับ หรือเปิด spec ตู้ดูว่าสัญญาณ busy tone มันมี time on/time off เท่าไหร่ ผมเคยเจอว่าตู้ panasonic (จำชื่อรุ่นไม่ได้) มี time on/time off ถี่มากครับ

การ restart Dahdi ก็ทำไม่ยากครับ ถ้าติดตั้ง Dahdi บน CentOS และตอนติดตั้งคอมไพล์ใช้คำสั่ง make config ด้วย ก็จะใช้คำสั่ง

service dahdi restart

แต่ไม่รู้จะแก้ปัญหาได้มั๊ย ผมว่าลองให้พอร์ต fxo มันดีเทค busy tone ก่อนดีกว่าครับ

หรืออัดเสียง busy tone ส่งมาให้หน่อยได้ป่ะครับ เดี๋ยวผมดูให้ว่ามันมี tone on/tone off อย่างละกี่ milliseconds

มีอีกไฟล์นึงแนะนำให้เข้าไปดูครับ คือ /etc/dahdi/system.conf ว่าด้วยเรื่องของ loadzone และ defaultzone แก้ให้เป็น th (Thailand) ครับ

loadzone=th
defaultzone=th

ซึ่งจะมีค่า Default Busytone เป็นแบบนี้ 400/500,0/500
โดยที่ 400/500 คือความถี่ 400 Hz นาน 500 ms
0/500 คือความถี่ 0 Hz (เสียงเงียบ) นาน 500 ms
** หากมีปัญหากับอุปกรณ์ที่ซื้อมาเองหรือบริการที่ทำขึ้นมาเอง ให้โพสต์ถามในเว็บบอร์ดนี้นะครับ **
** งานเร่งด่วนติดต่อว่าจ้างที่เบอร์ 08-5161-9439 อีเมล์ iamaladin@gmail.com ไลน์ NuizVoip ครับ **
nuiz
Diamond Member
 
โพสต์: 6995
ลงทะเบียนเมื่อ: 24 มี.ค. 2010 09:33


ย้อนกลับไปยัง Elastix - Unified Communications Software

ผู้ใช้งานขณะนี้

่กำลังดูบอร์ดนี้: ไม่มีสมาชิกใหม่ และ บุคคลทั่วไป 1 ท่าน

cron