Система Asterisk 13 + FreePbx 12.0.76.2
Через административный интерфейс создал очередь с номером 300. Теперь хочется установить extension = userfield того агента, который ответил. В файле скопировал [ext-queues] и изменил контекст h - /etc/asterisk/extensions_override_freepbx.conf
Такая запись работает, если в очереди никто не взял трубку, а вызывающий - нажимает отбой.
Код: Выделить всё
exten => h,1,NoOp(${CDR(uniqueid)} ${CONNECTEDLINE(num)})
exten => h,n,Set(CDR(userfield)=1234567
exten => h,n,NoOp(CDR(userfield) = ${CDR(userfield)})
exten => h,n,HangUp()
Код: Выделить всё
-- Executing [300@ext-queues:39] Queue("SIP/ToFB1-00000039", "300,tr,,,,,,,,") in new stack
== Spawn extension (ext-queues, 300, 39) exited non-zero on 'SIP/ToFB1-00000039'
-- Executing [h@ext-queues:1] NoOp("SIP/ToFB1-00000039", "1454070943.408 ") in new stack
-- Executing [h@ext-queues:2] Set("SIP/ToFB1-00000039", "CDR(userfield)=123456") in new stack
-- Executing [h@ext-queues:3] NoOp("SIP/ToFB1-00000039", "CDR(userfield) = 123456") in new stack
-- Executing [h@ext-queues:4] Hangup("SIP/ToFB1-00000039", "") in new stack
== Spawn extension (ext-queues, h, 4) exited non-zero on 'SIP/ToFB1-00000039'
Код: Выделить всё
-- Executing [300@ext-queues:39] Queue("SIP/ToFB1-0000003a", "300,tr,,,,,,,,") in new stack
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
-- Called SIP/100
-- SIP/100-0000003b connected line has changed. Saving it until answer for SIP/ToFB1-0000003a
-- SIP/100-0000003b is ringing
-- SIP/100-0000003b connected line has changed. Saving it until answer for SIP/ToFB1-0000003a
-- SIP/100-0000003b answered SIP/ToFB1-0000003a
-- Channel SIP/100-0000003b joined 'simple_bridge' basic-bridge <bedd8bd0-36d4-4a15-b56c-1778656d17de>
-- Channel SIP/ToFB1-0000003a joined 'simple_bridge' basic-bridge <bedd8bd0-36d4-4a15-b56c-1778656d17de>
> 0x7fdd1c33a140 -- Probation passed - setting RTP source address to 192.168.0.254:5062
-- Channel SIP/100-0000003b left 'simple_bridge' basic-bridge <bedd8bd0-36d4-4a15-b56c-1778656d17de>
-- Channel SIP/ToFB1-0000003a left 'simple_bridge' basic-bridge <bedd8bd0-36d4-4a15-b56c-1778656d17de>
== Spawn extension (ext-queues, 300, 39) exited non-zero on 'SIP/ToFB1-0000003a'
-- Executing [h@ext-queues:1] NoOp("SIP/ToFB1-0000003a", "1454071015.415 100") in new stack
-- Executing [h@ext-queues:2] Set("SIP/ToFB1-0000003a", "CDR(userfield)=123456") in new stack
-- Executing [h@ext-queues:3] NoOp("SIP/ToFB1-0000003a", "CDR(userfield) = ") in new stack
-- Executing [h@ext-queues:4] Hangup("SIP/ToFB1-0000003a", "") in new stack
== Spawn extension (ext-queues, h, 4) exited non-zero on 'SIP/ToFB1-0000003a'