3
« on: January 17, 2011, 05:08:16 »
Hi All,
I need your help on to how do i merge my existing outgoing to the new one. Im having problem on the channel to used.
[Outgoing]
exten => _9XXXXXXX,1,Wait(1)
exten => _9XXXXXXX,n,Set(myChannel=${CHANNEL})
exten => _9XXXXXXX,n,Set(Origin=${CUT(myChannel,-,1)})
exten => _9XXXXXXX,n,Set(Origin=${Origin:4})
exten => _9XXXXXXX,n,ChanIsAvail(SIP/8009&SIP/8010&SIP/8011&SIP/8012&SIP/8013&SIP/8014&SIP/8015&SIP/8016)
exten => _9XXXXXXX,n,Set(KEY=${Origin}-${EXTEN})
exten => _9XXXXXXX,n,Macro(selfrec,${KEY})
exten => _9XXXXXXX,n,Set(theChannel=${CUT(AVAILCHAN,-,1)})
exten => _9XXXXXXX,n,NoOp(Channel available is ${theChannel} ...)
exten => _9XXXXXXX,n,NoOp(${theChannel} has state ${DEVICE_STATE(${theChannel})})
exten => _9XXXXXXX,n,Set(CDR(userfield)=OUTGOING-BY-${Origin})
exten => _9XXXXXXX,n,Dial(${theChannel}/${EXTEN})
exten => _9XXXXXXX,n,Hangup
exten => _9XXXXXXX,102,Playback(all-circuits-busy-now)
exten => _9XXXXXXX,103,Hangup
[macro-selfrec]
exten => s,1,Set(CALLFILENAME=${ARG1}-${STRFTIME(${EPOCH},,%Y%m%d-%H%M%S)})
exten => s,n,MixMonitor(/raid/var/spool/asterisk/monitor/Today/${CALLFILENAME}.wav,W(3))
exten => s,n,NoOp
[New Outgoing]
exten => _9XXXXXXX,1,Set(QDIALER_QUEUE=q-${EXTEN})
exten => _9XXXXXXX,n,Set(QDIALER_NUMBER=${EXTEN})
exten => _9XXXXXXX,n,Set(QDIALER_AGENT=Agent/${CALLERID(num)})
exten => _9XXXXXXX,n,Set(QDIALER_CHANNEL=SIP/${QDIALER_NUMBER})
exten => _9XXXXXXX,n,Set(QueueName=${QDIALER_QUEUE})
exten => _9XXXXXXX,n,Macro(selfrec,${EXTEN})
exten => _9XXXXXXX,n,Goto(qlog-queuedial,${EXTEN},1)
thanks.