Как сделать 2 очериди в queues.conf
Добавлено: 14 июн 2020, 09:58
Есть два номера телефона 999999999 и 888888888888 , нужно сделать чтобы при звонке на 999999999 звонок попадал в одну очередь, а при звонке на 88888888 в другую
queues.conf
такой
[general]
persistentmembers=yes
[queue_callcenter]
music=default
strategy=ringall
ringinuse=yes
wrapuptime=1
servicelevel=60
announce-frequency=60
announce-holdtime=yes
reportholdtime=yes
setqueueentryvar=yes
member => SIP/102
member => SIP/106
[queue_callcenter1]
music=default
strategy=ringall
ringinuse=yes
wrapuptime=1
servicelevel=60
announce-frequency=60
announce-holdtime=yes
reportholdtime=yes
setqueueentryvar=yes
member => SIP/103
member => SIP/104
member => SIP/105
диал план такой
[globals]
RECORDING=1;
DIR_RECORDS=/mnt/calls/
[incoming]
exten => s,1,Goto(menu,s,1)
[incoming1]
exten => s,1,Goto(menu1,s,1)
[recording]
exten => s,1,Set(fname=${UNIQUEID}-${STRFTIME(${EPOCH},,%Y-%m-%d-%H_%M)}-${ARG1}-${ARG2})
exten => s,n,Set(monopt=nice -n 19 /usr/local/bin/lame -b 32 --silent "${DIR_RECORDS}${fname}.wav" "${DIR_RECORDS}${fname}.mp3" && rm -f "${DIR_RECORDS}${fname}.wav" && chmod o+r "${DIR_RECORDS}${fname}.mp3")
exten => s,n,Set(CDR(filename)=${fname}.mp3)
exten => s,n,Set(CDR(realdst)=${ARG2})
exten => s,n,MixMonitor(${DIR_RECORDS}${fname}.wav,b,${monopt})
exten => s,n(no),Verbose(Exit record)
exten => s,n,Return()
[outcoling]
exten => _102, 1, NoOp()
exten => _102, n, Wait(2)
exten => _102, n, Playback(beep)
exten => _102, n, Record(/var/lib/asterisk/moh/voicemail/${EXTEN:2}:wav)
exten => _102, n, Wait(1)
exten => _102, n, Playback(/var/lib/asterisk/moh/voicemail/${EXTEN:2})
exten => _102, n, Wait(2)
exten => _102, n, Hangup()
exten => _XXXXXXXXXXX,1,GoSub(recording,s,1,(${CALLERID(num)},${EXTEN}))
exten => _XXXXXXXXXXX,n,Dial(SIP/zadarma2/${EXTEN})
exten => _XXX,n,Dial(SIP/${EXTEN},,m)
[outcoling1]
exten => _XXXXXXXXXXX,1,GoSub(recording,s,1,(${CALLERID(num)},${EXTEN}))
exten => _XXXXXXXXXXX,n,Dial(SIP/zadarma/${EXTEN})
exten => _XXX,n,Dial(SIP/${EXTEN},,m)
[menu]
exten => s,1,GoSub(recording,s,1,(${CALLERID(num)},${EXTEN}))
exten => s,2,Background(/var/lib/asterisk/moh/voicemail/2)
exten => 1,1,Dial(SIP/103,,m&t)
exten => 2,1,Dial(SIP/104,,m&t)
exten => 3,1,Dial(SIP/105,,m&t)
exten => s,3,Answer()
exten => s,4,Wait(1)
exten => s,5,Queue(queue_callcenter,t)
[menu1]
exten => s,1,GoSub(recording,s,1,(${CALLERID(num)},${EXTEN}))
exten => s,2,Background(/var/lib/asterisk/moh/voicemail/2)
exten => 1,1,Dial(SIP/101,,m&t)
exten => 2,1,Dial(SIP/102,,m&t)
exten => s,3,Answer()
exten => s,4,Wait(1)
exten => s,5,Queue(queue_callcenter1,t)
в сип конфе прописано что первый транк относиться к [incoming] а второй транк к [incoming1]. Когда набираю queue show queue_callcenter и queue show queue_callcenter1 показывает, что есть две очереди, но все звонки с кого телефона я бы не звонил попадают в очередь queue show queue_callcenter1
queues.conf
такой
[general]
persistentmembers=yes
[queue_callcenter]
music=default
strategy=ringall
ringinuse=yes
wrapuptime=1
servicelevel=60
announce-frequency=60
announce-holdtime=yes
reportholdtime=yes
setqueueentryvar=yes
member => SIP/102
member => SIP/106
[queue_callcenter1]
music=default
strategy=ringall
ringinuse=yes
wrapuptime=1
servicelevel=60
announce-frequency=60
announce-holdtime=yes
reportholdtime=yes
setqueueentryvar=yes
member => SIP/103
member => SIP/104
member => SIP/105
диал план такой
[globals]
RECORDING=1;
DIR_RECORDS=/mnt/calls/
[incoming]
exten => s,1,Goto(menu,s,1)
[incoming1]
exten => s,1,Goto(menu1,s,1)
[recording]
exten => s,1,Set(fname=${UNIQUEID}-${STRFTIME(${EPOCH},,%Y-%m-%d-%H_%M)}-${ARG1}-${ARG2})
exten => s,n,Set(monopt=nice -n 19 /usr/local/bin/lame -b 32 --silent "${DIR_RECORDS}${fname}.wav" "${DIR_RECORDS}${fname}.mp3" && rm -f "${DIR_RECORDS}${fname}.wav" && chmod o+r "${DIR_RECORDS}${fname}.mp3")
exten => s,n,Set(CDR(filename)=${fname}.mp3)
exten => s,n,Set(CDR(realdst)=${ARG2})
exten => s,n,MixMonitor(${DIR_RECORDS}${fname}.wav,b,${monopt})
exten => s,n(no),Verbose(Exit record)
exten => s,n,Return()
[outcoling]
exten => _102, 1, NoOp()
exten => _102, n, Wait(2)
exten => _102, n, Playback(beep)
exten => _102, n, Record(/var/lib/asterisk/moh/voicemail/${EXTEN:2}:wav)
exten => _102, n, Wait(1)
exten => _102, n, Playback(/var/lib/asterisk/moh/voicemail/${EXTEN:2})
exten => _102, n, Wait(2)
exten => _102, n, Hangup()
exten => _XXXXXXXXXXX,1,GoSub(recording,s,1,(${CALLERID(num)},${EXTEN}))
exten => _XXXXXXXXXXX,n,Dial(SIP/zadarma2/${EXTEN})
exten => _XXX,n,Dial(SIP/${EXTEN},,m)
[outcoling1]
exten => _XXXXXXXXXXX,1,GoSub(recording,s,1,(${CALLERID(num)},${EXTEN}))
exten => _XXXXXXXXXXX,n,Dial(SIP/zadarma/${EXTEN})
exten => _XXX,n,Dial(SIP/${EXTEN},,m)
[menu]
exten => s,1,GoSub(recording,s,1,(${CALLERID(num)},${EXTEN}))
exten => s,2,Background(/var/lib/asterisk/moh/voicemail/2)
exten => 1,1,Dial(SIP/103,,m&t)
exten => 2,1,Dial(SIP/104,,m&t)
exten => 3,1,Dial(SIP/105,,m&t)
exten => s,3,Answer()
exten => s,4,Wait(1)
exten => s,5,Queue(queue_callcenter,t)
[menu1]
exten => s,1,GoSub(recording,s,1,(${CALLERID(num)},${EXTEN}))
exten => s,2,Background(/var/lib/asterisk/moh/voicemail/2)
exten => 1,1,Dial(SIP/101,,m&t)
exten => 2,1,Dial(SIP/102,,m&t)
exten => s,3,Answer()
exten => s,4,Wait(1)
exten => s,5,Queue(queue_callcenter1,t)
в сип конфе прописано что первый транк относиться к [incoming] а второй транк к [incoming1]. Когда набираю queue show queue_callcenter и queue show queue_callcenter1 показывает, что есть две очереди, но все звонки с кого телефона я бы не звонил попадают в очередь queue show queue_callcenter1