ไฟล์ queues.conf ของ Asterisk

Asterisk Opensource IP Pbx

ไฟล์ queues.conf ของ Asterisk

โพสต์โดย voip4share » 16 มี.ค. 2010 09:59

ไฟล์ queues.conf นี้นะครับเป็นไฟล์หลักที่ Asterisk จะใช้ในการควบคุมการทำงานของ Queues ครับ ซึ่งเราจะใช้ Queue ในการรับสายที่โทรเข้ามายัง Asterisk ไม่ว่าจะโทรมาจากสายภายในหรือสายภายนอกก็ตาม แล้วให้กระจายไปยังเบอร์ต่างๆที่เรากำหนดไว้ ได้ทั้งเบอร์ภายในและเบอร์ภายนอกเลยนะครับ ปกติจะใช้ Queue ในการทำ Call Center ครับ สำหรับออปชั่นต่างๆในไฟล์ queues.conf มีรายละเอียดดังนี้ครับ

[general]
;
; Global settings for call queues
;
; Persistent Members
บันทึก dynamic member ของแต่ละ queue ไว้ใน astdb ซึ่งเมื่อรีสตาร์ท Asterisk แต่ละ member ก็จะถูกอ่านเข้าไปไว้ใน queue ของใครของมันโดยอัตโนมัติ ไม่ต้องรีจิสเตอร์ใหม่ ดีฟอลท์คือ yes
dynamic member คือเอเย่นต์หรือพนักงานที่จะรองรับสาย ที่ลงทะเบียนเข้าไปใน queue โดยการกดหมายเลขของ queue
;
persistentmembers = yes
;
; AutoFill Behavior
การทำงานของ queue ตั้งแต่แรกจนถึงปัจจุบันมีการทำงานแบบ serial ซึ่งหมายความว่าสายลูกค้าหรือ caller จะถูกนำมาพักไว้ใน queue แบบ first-in, first-out ใครเข้ามาก่อนก็จะได้รับบริการก่อน ถึงแม้ว่าในขณะนั้นจะมีเอเย่นต์ที่พร้อมจะรับสายมากกว่า 1 คนก็ตาม สายแรกจะถูกจับคู่กับเอเย่นต์คนแรก สายที่สองจะถูกจับคู่กับเอเย่นต์คนที่สอง ซึ่งคู่ที่ 2 จะยังไม่ได้คุยกันจนว่าคู่แรกจะได้คุยกัน ซึ่งการทำงานแบบนี้จะทำให้ลูกค้าเสียเวลารอสายนาน ทั้งๆที่เอเย่นต์ก็พร้อมจะรับสายอยู่แล้ว
ถ้าเร็วเซ็ต autofill=yes จะทำให้ queue เปลี่ยนการทำงานไปเป็นแบบ pararell หรือทำงานแบบคู่ขนาน ขณะระบกำลังพยายามเชื่อมต่อลูกค้าสายแรกให้คุยกับเอเย่นต์คนแรก สายที่ 2 ก็สามารถเชื่อมต่อกับเอเย่นต์ที่ 2 ได้เลยโดยไม่ต้องรอให้เอเย่นต์สายแรกรับสายลูกค้าสายแรกก่อน
ค่าดีฟอลท์ของ autofill คือ no

autofill = yes
;
monitor-type
กำหนดวิธีการที่จะให้ Asterisk ใช้บันทึกเสียงการสนทนาระหว่างลูกค้าและเอเย่นต์ ถ้าเรากำหนดเป็นแบบ MixMonitor จะทำให้ Asterisk บันทึกเสียงโดยใช้แอปพลิเคชั่นที่มีชื่อว่า MixMonitor แทน Monitor (เก่ากว่า) ถ้าเราเซ็ต monitor-type ที่นี่จะมีผลกับทุก queue หรือเซ็ตในแต่ละ queue เองก็ได้ ถ้าต้องการให้แต่ละ queue ใช้รูปแบบการบันทึกเสียงไม่เหมือนกัน
ถ้าเราไม่ระบุออปชั่นนี้หรือใส่เครื่องหมาย ; ไว้หน้าบรรทัด จะใช้ค่าดีฟอลท์คือ Monitor

monitor-type = MixMonitor
;
; UpdateCDR behavior.
; This option is implemented to mimic chan_agents behavior of populating CDR dstchannel field of a call with an agent name, which you can set
; at the login time with AddQueueMember membername parameter.

; updatecdr = no

;
; Note that a timeout to fail out of a queue may be passed as part of an application call from extensions.conf:
; Queue(queuename,[options],[optionalurl],[announceoverride],[timeout])
; example: Queue(dave,t,,,45)

; shared_lastcall will make the lastcall and calls received be the same in members logged in more than one queue.
; This is useful to make the queue respect the wrapuptime of another queue for a shared member
;
shared_lastcall=no
;
;[markq]
;
; A sample call queue
;
musicclass เป็น Music On Hold (MOH) หรือเสียงรอสาย ที่เล่นให้ลูกค้าใน queue ฟังระหว่างที่เขารอเอเย่นต์รับสาย จะมีผลกับลูกค้าที่อยู่ใน queue นั้นๆเท่านั้นไม่เกี่ยวกับ queue อื่น แสดงว่าแต่ละ queue มีเสียง MOH ไม่เหมือนกันได้ แต่อย่างไรก็ตามเราสามารถเขียนทับออปชั่นนี้เราเซ็ตระบุ MOH class โดยตรงจาก Dialplan โดยใช้ Set(CHANNEL(musicclass)=whatever)
เราสร้าง MOH ได้ไม่ยากเลยครับ โดยอัพโหลดไฟล์เสียง .wav (รูปแบบ 8 KHz, 16 bit, Mono) หรือ .mp3 ไปไว้ในไดเร็คตอรี่ /var/lib/asterisk/moh เสียงที่อยู่ในไดเร็คตอรี่นี้จะเป็น MOH class=default ถ้าเราต้องการให้มีหลายๆ class ก็ให้สร้างไดเร็คตอรี่ย่อยๆไว้ภายใน แล้วอัพโหลดไฟล์เสียงเข้าไป เช่น สร้าง class=voi4share ก็ให้สร้างไดเร็คตอรี่ /var/lib/asterisk/moh/voip4share แล้วก็อัพโหลดไฟล์เสียงเข้าไป ไม่ยากครับ จะสร้างกี่ class ก็ได้
;musicclass = default
;
announcement เป็นเสียงที่จะเล่นให้เอเย่นต์ฟัง เขาจะได้ยินเสียงนี้ทันทีที่ยกหูรับสายลูกค้า ปกติเราจะใช้ออปชั่นนี้เพื่อบอกเอเย่นต์ว่าลูกค้าสายนี้เข้ามาทาง queue ไหน เอเย่นต์จะได้เตรียมพร้อมได้ทันเวลา ออปชั่นนี้มีประโยชน์มากโดยเฉพาะกับเอเย่นต์ 1 คนที่ต้องรับสายลูกค้ามากกว่า 1 queue ยกตัวอย่างบริษัทรับจ้างให้บริการ Call Center ซึ่งเอเย่นต์ 1 คนต้องรับสายลูกค้าหลายบริษัท เราก็เซ็ต queue หนึ่งเป็นของอีกบริษัทหนึ่ง และอีก queue หนึ่งเป็นของอีกบริษัทหนึ่ง แล้วใช้ออปชั่นนี้บอกเอเย่นต์ว่าลูกค้าโทรเข้าเบอร์ของบริษัทไหน
;announce = queue-markq
;
; A strategy may be specified. Valid strategies include:
Strategy เลือกรูปแบบที่จะให้ Asterisk โทรไปยังเบอร์เอเย่นต์
; ringall - โทรไปยังเบอร์เอเย่นต์ทุกเบอร์ที่ยังว่างอยู่ จนกว่าจะมีคนรับสาย(ค่าดีฟอลท์)
; leastrecent - โทรไปยังเบอร์ล่าสุดที่รับสายใน queue นี้
; fewestcalls - โทรไปยังเบอร์ที่รับสายลูกค้าน้อยที่สุด
; random - โทรแบบสุ่ม เบอร์เอเย่นต์คนไหนก็ได้ใน queue
; rrmemory - round robin with memory, remember where we left off last ring pass
; linear - โทรไปเบอร์เอเย่นต์เรียงตามลำดับที่คอนฟิกไว้ในไฟล์คอนฟิก แต่ถ้าเราให้เอเย่นต์ลงทะเบียนใน queue แบบไดนามิค ก็จะโทรไปตามลำดับเบอร์ที่ลงทะเบียน
; wrandom - rings random interface, but uses the member's penalty as a weight when calculating their metric. So a member with penalty 0 will have
; a metric somewhere between 0 and 1000, and a member with penalty 1 will
; have a metric between 0 and 2000, and a member with penalty 2 will have
; a metric between 0 and 3000. Please note, if using this strategy, the member
; penalty is not the same as when using other queue strategies. It is ONLY used as a weight for calculating metric.
;
;strategy = ringall
;
; Second settings for service level (default 0) Used for service level statistics (calls answered within service level time frame)
;servicelevel = 60
;
; A context may be specified, in which if the user types a SINGLE digit extension while they are in the queue, they will be taken out
; of the queue and sent to that extension in this context.
;
;context = qoutcon
;
;
ออปชั่นเกี่ยวกับ Timing ของ Queue
เวลา timeout ที่เกี่ยวข้องกับ queue มีอยู่ 2 ค่า ค่าหนึ่งเป็นพารามิเตอร์ timeout ที่อยู่ไว้ในไฟล์ queues.conf ค่านี้จะกำหนดระยะเวลาที่จะพยายามโทรไปยังเบอร์โทรศัพท์ของเอเย่นต์ก่อนที่จะติดสินใจว่าไม่สามารถติดต่อเอเย่นต์ได้ ส่วนอีกค่าหนึ่งเป็น timeout ซึ่งเป็น argument ที่สองตอนเรียกใช้แอปพลิเคชั่น Queue() ค่านี้จะแทน absolute amout ของเวลาที่จะยอมให้ลูกค้ารออยู่ใน queue ก่อนที่ลูกค้าจะถูกย้ายออกจากคิว (ระบบให้ติดต่อกลับมาใหม่) ในบางสถานการณ์ค่า timeout ทั้งสองค่านี้อาจจะขัดแย้งกัน ยกตัวอย่างเช่น ถ้า timeout ในไฟล์ queues.conf เซ็ตไว้ 5 วินาที และเซ็ตค่า retry ในไฟล์ queues.conf ไว้ 4 และตอนเรียกใช้ Queue() ใช้ argement ที่สองเป็น 10 อาจจะเกิดเหตุการณ์ดังต่อไปนี้

ลูกค้าโทรเข้ายัง queue
queue เลือกเอเย่นต์และพยายามโทรไปหาเอเย่นต์
เครื่องโทรศัพท์ของเอเย่นต์ดังนาน 5 วินาทีแล้ว เขายังไม่รับสาย
รอ retry 4 วินาที แล้วเริ่มใหม่
queue เลือกเอเย่นต์ที่ 2 แล้วพยายามโทรไปอีก

ลองมานึกดูเล่นๆนะครับว่า เครื่องโทรศัพท์ของเอเย่นต์คนที่ 2 จะดังนานกี่วินาที จะดังนาน 5 วินาทีตามค่าไทม์เอ๊าท์ใน app_queue ซึ่งเซ็ตไว้ 5 วินาทีหรือเปล่า หรือจะดังแค่ 1 วินาทีเนื่องจาก caller มารออยู่ใน queue นาน 9 วินาทีแล้ว และกำลังจะถูกย้ายออกจาก queue เพราะใกล้ครบ 10 วินาทีแล้ว
เราจะเลือกไทม์เอ๊าท์แบบไหน เราเลือกได้โดยกำหนดที่ออปชั่น timeoutpriority เมื่อเซ็ตค่าเป็น conf ระบบจะใช้ค่าไทม์เอ๊าท์ที่ระบุไว้ในไฟล์คอนฟิกซึ่งจะทำให้ลูกค้ารออยู่ใน queue นานกว่าเวลาที่ระบุไว้ใน application argument สำหรับการทำงานแบบที่ได้อธิบายนี้ timeoutpriority=conf จะทำให้โทรศัพท์ของเอเย่นต์คนที่ 2 ดังนาน 5 วินาที ถ้าระบุเป็น timeoutpriority=app จะทำให้ timeout ที่ระบุเป็น argument ตอนเรียกใช้ queue จะสำคัญมาก ซึ่งจะทำให้เครื่องโทรศัพท์ของเอเย่นต์คนที่ 2 ดังแค่ 1 วินาที

มีข้อยกเว้นอยู่ 2-3 ประการสำหรับ priority rule ยกตัวอย่างเช่น ถ้า timeoutpriority=app และค่า timeout ในไฟล์คอนฟิกเซ็ตไว้เป็น 0 แต่ค่า timeout ใน application argument ไม่เป็น 0 จะทำให้ระบบไม่สนใจค่า timeoutpriority และจะใช้ timeout ใน application argument มาเป็นค่า timeout ยิ่งไปกว่านั้น ถ้าไม่ระบุ timeout ใน application argument ระบบก็จะไม่สนใจค่า timeoutpriority และจะใช้ค่า timeout ในไฟล์คอนฟิกแทน

อย่างไรก็ตามถ้าเราให้ timeoutpriotiry=conf จะทำให้ timeout ในไฟล์คอนฟิก queues.conf มีความสำคัญสูงกว่า timeout ที่ระบุใน argument ที่ 2 ดังนั้นถ้าในไฟล์คอนฟิกมีค่า timeout เป็น 0 แต่ละเอเย่นต์จะถูกคอลไปเรื่อยๆแบบไม่สิ้นสุด และ application timeout จะถูกเซ็คก็ต่อเมื่อหลังจาก call attempt นี้ เทคนิคนี้มีประโยชน์สำหรับการมีเอเย่นต์พร้อมด้วย timeout ที่เป็นแบบกำหนดได้เอง ระบุอยู่ใน Dial() ของ Local channel และจะยอมให้มีการรับมือกับ NO ANSWER ซึ่งควรจะถูกขัดจังหวะโดยการทำลาย child channel
เมื่อ timeout
ค่าดีฟอลท์ของ timeoutpriority คือ app เพื่อให้เหมือนกับเวอร์ชั่นแรกๆของ

;timeout = 15
;retry = 5
;timeoutpriority = app|conf
;
;-----------------------END QUEUE TIMING OPTIONS---------------------------------

Weight เป็น weight ของ queue นี้เปรียบเทียบกับ queue อื่นๆ ซึ่ง queue ที่มี weight สูงกว่าจะได้รับ channel เมื่อมี queue อื่นที่มี weight ต่ำกว่าใช้ channel นี้ด้วย
;weight=0

Wrapuptime เป็นระยะเวลาที่ระบบจะรอหลังจากเอเย่นต์วางสายลูกค้าแล้ว ก่อนที่จะแจ้งสถานะของเอเย่นต์ให้ queue รู้ว่าพร้อมที่จะรับสายต่อไปแล้ว (ดีฟอลท์คือ 0 ไม่ต้องรอ)
;wrapuptime=15

Autofill จะยอมให้มีการทำ queue strategy แต่จะใส่หลายๆคอลในเวลาเดียวกันจนกว่าไม่มีลูกค้ารอใน queue หรือจนกว่าจะไม่มีเอเย่นต์ว่าง
;autofill=yes

Autopause จะ pause เอเย่นต์ถ้าไม่สามารถรับสายลูกค้าได้ เช่นเครื่องโทรศัพท์ใช้งานไม่ได้
;autopause=yes

จำนวนสายสูงสุดที่ระบบจะให้คอยอยู่ใน queue ได้ ดีฟอลท์คือ 0 (ไม่จำกัดจำนวน)
;maxlen = 0
;

Setinterfacevar ถ้าเซ็ตเป็น yes ก่อนที่สายจะถูกบริดจ์ให้คุยกับเอเย่นต์ ระบบจะเซ็ตตัวแปรต่อไปนี้
MEMBERINTERFACE เป็นชื่ออินเตอร์เฟส เช่น Agent/1234
MEMBERNAME เป็นชื่อเอเย่นต์ เช่น Kikka Kenji
MEMBERCALLS เป็นจำนวนคอลที่เอเย่นต์คนนี้รับสายแล้ว
MEMBERLASTCALL เป็นเวลาล่าสุดที่เอเย่นต์รับสาย
MEMBERPENALTY เป็นเอเย่นต์ที่ penalty หรือไม่
MEMBERDYNAMIC แสดงว่าเอเย่นต์เป็นแบบไดนามิคหรือไม่
MEMBERREALTIME แสดงว่าเอเย่นต์เป็นแบบ realtime หรือไม่

;setinterfacevar=no

Setqueueentryvar ถ้าเซ็ตเป็น yes ก่อนที่ลูกค้าจะถูกบริดจ์ให้คุยกับเอเย่นต์ ระบจะเซ็ตตัวแปรดังต่อไปนี้
QEHOLDTIME เป็นระยะเวลาที่ลูกค้ารอสาย
QEORIGINALPOS เป็นตำแหน่งเริ่มแรกของลูกค้าใน queue

;setqueueentryvar=no
;
Setqueuevar ถ้าเซ็ตเป็น yes ตัวแปรต่อไปนี้จะถูกเซ็ตก่อนที่สายลูกค้าจะถูกบริดจ์ให้คุยกับเอเย่นต์ใน queue และก่อนที่ลูกค้าจะออกจาก queue
QUEUENAME ชื่อ queue
QUEUEMAX จำนวนคอลสูงสุดที่ยอมให้อยู่ใน queue
QUEUESTRATEGY เป็น Strategy ของ queue
QUEUECALLS จำนวนคอลปัจจุบันที่อยู่ใน queue
QUEUEHOLDTIME เป็นระยะเวลาเฉลี่ยค่าปัจจุบันที่ลูกค้ารอสาย
QUEUECOMPLETED จำนวนคอลใน queue ที่โทรได้สำเร็จ
QUEUEABANDONED เป็นจำนวนคอลที่ถูกยกเลิกหรือละทิ้ง
QUEUESRVLEVEL เป็นระดับการบริการของ queue
QUEUESRVLEVELPERF ประสิทธิภาพของระดับการบริการปัจจุบันของ queue

;setqueuevar=no
;
Membermacro เป็นชื่อ macro ที่จะรันเมื่อสายลูกค้าถูกบริดจ์เข้ากับเอเย่นต์ แต่เราสามารถ override ได้โดยการเซ็ตออปชั่น macro ในแอปพลิเคชั่น Queue()
; membermacro=somemacro

Announce-frequency กำหนว่าให้ประกาศ queue position บ่อยแค่ไหน และ/หรือระยะเวลารอสายเฉลี่ยให้ลูกค้าฟัง (0 คือ off) อย่างไรก็ตามระบบจะไม่สนใจค่าออปชั่นนี้ถ้าตำแหน่งของลูกค้าใน queue เปลี่ยนตำแหน่งไป (ดูออปชั่น min-announce-frequency)
;announce-frequency = 90

Min-announce-frequency เป็นเวลาน้อยที่สุดระหว่างเริ่มต้นของแต่ละตำแหน่งใน queue และ/หรือการประกาศเวลารอสายเฉลี่ย ออปชั่นนี้เป็นประโยชน์เมื่อต้องการหลีกเลี่ยงการประกาศว่าลูกค้าอยู่ตำแหน่งเดิม ทั้งๆที่ตำแหน่งจริงๆใน queue นั้นเปลี่ยนแล้วและเร็ว (ดู announce-frequency)
;min-announce-frequency = 15

Periodic-announce-frequency กำหนดว่าจะให้ประกาศบ่อยแค่ไหน (ดู periodic-announce)
;periodic-announce-frequency=60

Random-periodic-announce จะให้ประกาศแบบสุ่มหรือไม่ ดีฟอลท์คือ no
;random-periodic-announce=no

Announce-holetime ในการประกาศตำแหน่งใน queue นั้น เราควรจะรวมระยะเวลาโดยประมาณในการคอยสายด้วยหรือไม่ เซ็ตเป็น yes, no หรือ once (ครั้งเดียว) ระบบจะแจ้งระยะเวลารอสายเป็นค่าโดยประมาณ
;announce-holdtime = yes|no|once

เกี่ยวกับการประกาศตำแหน่งใน queue
ค่าที่เลือกได้คือ yes, no, limit และ more ถ้าเซ็ตเป็น no ระบบจะไม่ประกาศตำแหน่งของสายลูกค้า ถ้าเซ็ตเป็น yes ระบบจะประกาศตำแหน่งของสายลูกค้าใน queue ถ้าเซ็ตเป็น more และถ้าจำนวนสายลูกค้ามีมากกว่าจำนวนที่ระบุไว้ในออปชั่น announce-position-limit ลูกค้าจะได้ยินว่าขณะนี้มีลูกค้าโทรเข้ามาจำนวนมาก (เช่นถ้าใน queue มีสายลูกค้าอยู่ 6 สาย เซ็ต announce-position-limit ไว้ที่ 5 ลูกค้าจะได้ยินเสียงว่าขณะนี้มีสายกำลังรอรับบริการอยู่ 5 สาย) ถ้าเซ็ตเป็น limit ระบบจะแจ้งบอกตำแหน่งใน queue ให้แก่เฉพาะลูกค้าที่มีจำนวนเท่ากับที่เซ็ตไว้ใน announce-position-limit

;announce-position = yes

Announce-position-limit ถ้าเซ็ตเป็น announce-position เป็น limit หรือ more จะทำให้ค่าต่อไปนี้จะถูกใช้เพื่อกำหนดว่าจะประกาศเสียงอะไรให้ลูกค้าฟัง ถ้าเซ็ต announce-position เป็นค่าอื่นนอกเหนือจากนี้จะไม่มีผลต่อการทำงานของ queue
;announce-position-limit = 5

Announce-round-seconds ถ้าเซ็ตค่าที่ไม่เป็น 0 ระบบจะประกาศระยะเวลาเป็นวินาทีและนาทีโดยจะวนรอบสู่ค่านี้ ค่าที่ถูกต้องคือ 0, 5, 10, 15, 20 และ 30
; announce-round-seconds = 10
;
Queue-thankyou ใส่ชื่อไฟล์เสียงที่จะประกาศแจ้งลูกค้าให้รู้ตำแหน่ง (postition) และเวลาที่ต้องรอโดยประมาณ (holdtime) ดีฟอลท์เป็นตามด้านล่างนี้เปลี่ยนแปลงได้ถ้าต้องการ
แต่โปรดจำไว้ว่าเราอาจจะป้องกันไม่ให้ระบบเล่นไฟล์เสียงได้ถ้าไม่ใส่ชื่อไฟล์ ยกตัวอย่างเช่น ถ้าไม่ต้องการให้ queue เล่นเสียง queue-thankyou ก็ไม่ต้องใส่ชื่อไฟล์ หรือคอมเม้นต์บรรทัดนี้ไว้

; queue-thankyou=
;
; ("You are now first in line.")
;queue-youarenext = queue-youarenext
; ("There are")
;queue-thereare = queue-thereare
; ("calls waiting.")
;queue-callswaiting = queue-callswaiting
; ("The current est. holdtime is")
;queue-holdtime = queue-holdtime
; ("minutes.")
;queue-minutes = queue-minutes
; ("seconds.")
;queue-seconds = queue-seconds
; ("Thank you for your patience.")
;queue-thankyou = queue-thankyou
; ("Hold time")
;queue-reporthold = queue-reporthold
; ("All reps busy / wait for next")
;periodic-announce = queue-periodic-announce
;
ไฟล์เสียงที่จะให้ Asterisk ประกาศเป็นช่วงๆนั้นนะครับ สามารถเล่นได้หลายไฟล์ ใช้เครื่องหมาย , แยกชื่อไฟล์ ยกตัวอย่างเช่น
;periodic-announce = queue-periodic-announce,your-call-is-important,please-wait

ระบบจะประกาศเสียงตามลำดับไฟล์ที่เราใส่ไว้ หลังจากเล่นเสียงสุดท้ายจบแล้ว การประกาศก็จะเริ่มต้นใหม่จากจุดเริ่มต้น

คอลอาจจะถูกบันทึกเสียงไว้ด้วยแอปพลิเคชั่น Monitor/MixMonitor ซึ่งสามารถเรียกใช้ได้ภายในแอปพลิเคชั่น Queue() เริ่มต้นบันทึกเสียงเมื่อคอลถูกรับสาย ซึ่งจะมีเฉพาะคอลที่มีคนรับสายเท่านั้นที่จะถูกบันทึก ขณะที่ลูกค้ารอสายได้ยินเสียง MOH ระบบจะยังไม่บันทึก
ในการบันทึกเสียง ใช้ออปชั่น monitor-format

ใส่ชื่อไฟล์ที่จะบันทึก ใช้คำสั่งนี้ใน Dialplan
; Set(MONITOR_FILENAME=filename)
ถ้าไม่ระบุชื่อไฟล์ ระบบจะตั้งชื่อเอง โดยใช้คำสั่งนี้ MONITOR_FILENAME=${UNIQUEID}
ระบุรูปแบบไฟล์เสียงที่จะบันทึก ถ้าเราไม่ระบุหรือใส่ ; ไว้หน้าบรรทัด monitor-format ระบบจะไม่บันทึกเสียง
;monitor-format = gsm|wav|wav49

Monitor-type เลือกคำสั่งที่จะใช้บันทึกเสียง
;monitor-type = MixMonitor

ออปชั่นในการเรียกใช้งานแอปพลิเคชั่น MixMonitor (สั่งจาก Dialplan)
เมื่อเราเลือกใช้วิธีการบันทึกเสียงแบบ MixMonitor เราสามารถระบุออปชั่นเพิ่มเติมได้ โดยสั่งจาก Dialplan ดังนี้
; Set(MONITOR_OPTIONS=av(<x>)V(<x>)W(<x>))
ออปชั่น b หมายถึงให้บันทึกเสียงเมื่อแชนแนลถูกบริดจ์แล้วเท่านั้น พูดง่ายๆคือเมื่อปลายทางรับสายแล้ว

เราสามารถระบุคำสั่งที่จะให้ทำหลังจากจบการบันทึกเสียง โดยการสั่งงานจาก Dialplan
; Set(MONITOR_EXEC=mv /var/spool/asterisk/monitor/^{MONITOR_FILENAME} /tmp/^{MONITOR_FILENAME})
คำสั่งที่เราระบุไว้ภายในส่วนข้อมูลอง MONITOR_EXEC จะถูกประมวลผลเมื่อการบันทึกเสียงจบลง ตัวอักษรที่แม๊ตซ์กับ ^{X} จะถูกเปลี่ยนไปเป็น ${X} และตัวแปรทุกตัวก็จะถูกหาค่าก่อนที่จะเริ่มต้นบันทึกเสียง
ส่วนข้อมูลของ MONITOR_FILENAME ก็จะถูกเปลี่ยนจาก ^{X} ไปเป็น ${X} และตัวแปรทุกตัวจะถูกหาค่าก่อนการเริ่มบันทึกเสียง

ออปชั่นที่จะให้ทำหาก Queue ว่างเปล่า

; Asterisk has provided the "joinempty" and "leavewhenempty" options for a while with tenuous definitions of what they actually mean.
; The "joinempty" option controls whether a caller may join a queue depending on several factors of member availability.
; Similarly, then leavewhenempty option controls whether a caller may remain in a queue he has already joined. Both options take a
; comma-separated list of factors which contribute towards whether a caller may join/remain in the queue. The list of
; factors which contribute to these option is as follows:
;
; paused: a member is not considered available if he is paused
; penalty: a member is not considered available if his penalty is less than QUEUE_MAX_PENALTY
; inuse: a member is not considered available if he is currently on a call
; ringing: a member is not considered available if his phone is currently ringing
; unavailable: This applies mainly to Agent channels. If the agent is a member of the queue but has not logged in, then do not consider the
; member to be available
; invalid: Do not consider a member to be available if he has an "invalid" device state.
; This generally is caused by an error condition in the member's channel driver.
; unknown: Do not consider a member to be available if we are unable to determine the member's
; current device state.
; wrapup: A member is not considered available if he is currently in his wrapuptime after taking a call.
;
; For the "joinempty" option, when a caller attempts to enter a queue, the members of that
; queue are examined. If all members are deemed to be unavailable due to any of the conditions
; listed for the "joinempty" option, then the caller will be unable to enter the queue. For the
; "leavewhenempty" option, the state of the members of the queue are checked periodically during
; the caller's stay in the queue. If all of the members are unavailable due to any of the above
; conditions, then the caller will be removed from the queue.
;
; Some examples:
;
;joinempty = paused,inuse,invalid
;
; A caller will not be able to enter a queue if at least one member cannot be found
; who is not paused, on the phone, or who has an invalid device state.
Leavewhenempty สายลูกค้าไม่สามารถเข้ามาใน queue ได้ถ้าไม่มีเอเย่นต์อยู่ใน queue เลยแม้แต่คนเดียว
;leavewhenempty = inuse,ringing
;
; A caller will be removed from the queue if at least one member cannot be found who is not on the phone, or whose phone is not ringing.
;
; For the sake of backwards-compatibility, the joinempty and leavewhenempty options also accept the strings "yes" "no" "strict" and "loose".
; The following serves as a translation for these values:
;
; yes - (empty) for joinempty; penalty,paused,invalid for leavewhenempty
; no - penalty,paused,invalid for joinempty; (empty) for leavewhenempty
; strict - penalty,paused,invalid,unavailable
; loose - penalty,invalid
;

; If this is set to yes, the following manager events will be generated: AgentCalled, AgentDump, AgentConnect, AgentComplete; setting this to
; vars also sends all channel variables with the event. (may generate some extra manager events, but probably ones you want)
;
; eventwhencalled = yes|no|vars
;
; If this is set to yes, the following manager events will be generated:
; QueueMemberStatus
; (may generate a WHOLE LOT of extra manager events)
;
; eventmemberstatus = no
;
Reportholdtime ถ้าเซ็ตเป็น yes ระบบจะรายงานระยะเวลาที่ลูกค้าถือสายรอให้เอเย่นต์ทราบก่อนที่จะเชื่อมต่อสายให้
; reportholdtime = no
;
Ringinuse ถ้าต้องการให้ queue หลีกเลี่ยงการส่งคอลไปยังเอเย่นต์ที่อยู่ในสถานะ 'in use' ให้เซ็ตออปชั่นนี้เป็น no (ตอนนี้มีเฉพาะ SIP Channels เท่านั้นที่สามารถรายงานสถานะ in use ของแชนแนลได้)
; ringinuse = no

Memberdelay เซ็ตค่าดีเลย์ก่อนที่เอเย่นต์จะถูกบริดจ์เข้ากับสายลูกค้า (หรือก่อนที่เอเย่นต์จะได้ยินเสียงประกาศ) เซ็ตค่าดีเลย์ที่ต้องการ หน่วยวินาที
; memberdelay = 0

Timeoutrestart เซ็ตเป็น yes ค่าเวลา timeout สำหรับเอเย่นต์ในการตอบรับสายลูกค้าจะถูกรีเซ็ต ถ้าระบบได้รับ BUSY หรือ CONGESTION จะเป็นประโยชน์ถ้าเอเย่นต์สามารถยกเลิกสายด้วยการ reject หรือวิธีไหนก็ได้ที่คล้ายๆกัน
; timeoutrestart = no

Defaultrule ถ้าต้องการใช้งาน rule ตามที่ตั้งไว้ในไฟล์ queuerules.conf เป็นแบบดีฟอลท์ ให้ระบุค่า defaultrule เป็นชื่อ rule ที่ต้องการ
; defaultrule = myrule
;
; Each member of this call queue is listed on a separate line in the form technology/dialstring. "member" means a normal member of a
; queue. An optional penalty may be specified after a comma, such that entries with higher penalties are considered last. An optional
; member name may also be specified after a second comma, which is used in log messages as a "friendly name". Multiple interfaces may
; share a single member name. An optional state interface may be specified after a third comma. This interface will be the one for which
; app_queue receives device state notifications, even though the first interface specified is the one that is actually called.
แต่ละเอเย่นต์ใน queue เราเขียนให้อยู่คนละบรรทัด รูปแบบเป็น Technology/Dialingstring
; It is important to ensure that channel drivers used for members are loaded before app_queue.so itself or they may be marked invalid until
; reload. This can be accomplished by explicitly listing them in modules.conf before app_queue.so. Additionally, if you use Local channels as
; queue members, you must also preload pbx_config.so and chan_local.so (or pbx_ael.so, pbx_lua.so, or pbx_realtime.so, depending on how
; your dialplan is configured).
;
;member => DAHDI/1
;member => DAHDI/2,10
;member => DAHDI/3,10,Bob Johnson
;member => Agent/1001
;member => Agent/1002
;member => Local/1000@default,0,John Smith,SIP/1000

; Note that using agent groups is probably not what you want. Strategies do not propagate down to the Agent system so if you want
; round robin, least recent, etc, you should list all the agents in this file individually and not use agent groups.

;member => Agent/@1 ; Any agent in group 1
;member => Agent/:1,1 ; Any agent in group 1, wait for first available, but consider with penalty
voip4share
Administrator
 
โพสต์: 656
ลงทะเบียนเมื่อ: 18 พ.ย. 2009 11:26
ที่อยู่: รามคำแหง กรุงเทพฯ

ย้อนกลับไปยัง Asterisk SIP Server

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

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

cron