Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [globals]
- INTERNAL_DIAL_OPT=,30
- [features]
- exten = *29,1,Verbose(1, "User ${CALLERID(num)} dialed the voicemail feature.")
- same = n,VoiceMailMain(${CHANNEL(endpoint)}@backpackbang,s)
- same = n,Hangup()
- exten = 8000,1,Verbose(1, "User ${CALLERID(num)} dialed the voicemail feature.")
- same = n,VoiceMailMain(09614204020@backpackbang)
- same = n,Hangup()
- [dialing-errors]
- exten = _X.,1,Verbose(1, "User ${CALLERID(num)} dialed an invalid number.")
- same = n,Playback(pbx-invalid)
- same = n,Hangup()
- [dial-users]
- exten = _100X,1,Verbose(1, "User ${CALLERID(num)} dialed ${EXTEN}.")
- same = n,Set(DIALED_EXTEN=${EXTEN})
- same = n,Gotoif($[${DEVICE_STATE(PJSIP/${EXTEN})} = BUSY]?dialed-BUSY,1:)
- same = n,Dial(PJSIP/${EXTEN}${INTERNAL_DIAL_OPT})
- same = n,Goto(dialed-${DIALSTATUS},1)
- exten = dialed-NOANSWER,1,NoOp()
- same = n,Voicemail(${DIALED_EXTEN}@backpackbang,u)
- same = n,Hangup()
- exten = dialed-BUSY,1,NoOp()
- same = n,Voicemail(${DIALED_EXTEN}@backpackbang,b)
- same = n,Hangup()
- exten = dialed-CHANUNAVAIL,1,NoOp()
- same = n,Playback(pbx-invalid)
- same = n,Hangup()
- exten = _dialed-.,1,Goto(dialed-NOANSWER,1)
- exten = h,1,Hangup()
- [outbound-dial]
- exten = _011.,1,Hangup() ; a sample to identify what to restrict
- ; Dial outbound through our SIP ITSP when number is atleast 9 digits beginning 0
- exten = _0XXXXXXXX!,1,Verbose(1, "Didn't match any restricted numbers, proceeding with outbound dial.")
- same = n,Set(CALLERID(name)=Backpack Technologies Inc.)
- same = n,Set(CALLERID(num)=09614204020)
- same = n,Dial(PJSIP/${EXTEN}@support)
- same = n,Hangup()
- [internal-main]
- ; The order of includes here is important for matching the right extensions.
- include = features
- include = dial-users
- include = queues
- include = outbound-dial
- include = dialing-errors
- [queues]
- exten = 4020,1,Goto(ivr-greeting,1)
- exten = ivr-greeting,1,NoOp(${CALLERID(all)} is in the greeting section)
- same = n,Answer()
- same = n(options),NoOp(In OPTIONS section)
- same = n,GotoIf($[${EXISTS(${LoopCount})}]?read)
- same = n,Set(LoopCount=0)
- same = n(read),NoOp(${LoopCount})
- same = n,Read(MENUCHOICE,/etc/asterisk/asterisk-main-menu,1,s,2,3)
- same = n,GotoIf($[ "${MENUCHOICE}" = "1"]?ivr-intent-bangla)
- same = n,GotoIf($[ "${MENUCHOICE}" = "2"]?ivr-intent-english)
- same = n(invalid),SayDigits(${MENUCHOICE})
- same = n,Playback(pbx-invalid)
- same = n,Set(LoopCount=$[${LoopCount} + 1])
- same = n,GotoIf($[ "${LoopCount}" <= "2"]?options)
- same = n,Voicemail(09614204020@example,u)
- same = n,Hangup()
- same = n(ivr-intent-bangla),Goto(ivr-intent-bangla,1)
- same = n(ivr-intent-english),Goto(ivr-intent-english,1)
- exten = ivr-intent-english,1,NoOp(${CALLERID(all)} is in now Intent English Section)
- same = n,Answer()
- same = n(options),NoOp(In OPTIONS - Intent english section)
- same = n,GotoIf($[${EXISTS(${LoopCount})}]?read)
- same = n,Set(LoopCount=0)
- same = n(read),NoOp(${LoopCount})
- same = n,Read(ENGLISHINTENTCHOICE,/etc/asterisk/asterisk-intent-english,1,s,2,3)
- same = n,GotoIf($[ "${ENGLISHINTENTCHOICE}" = "1"]?sales)
- same = n,GotoIf($[ "${ENGLISHINTENTCHOICE}" = "2"]?ivr-invoice-english)
- same = n(invalid),SayDigits(${ENGLISHINTENTCHOICE})
- same = n,Playback(pbx-invalid)
- same = n,Set(LoopCount=$[${LoopCount} + 1])
- same = n,GotoIf($[ "${LoopCount}" <= "2"]?options)
- same = n,Voicemail(09614204020@example,u)
- same = n,Hangup()
- same = n(sales),Goto(sales,1)
- same = n(ivr-invoice-english),Goto(ivr-invoice-english,1)
- exten = ivr-intent-bangla,1,NoOp(${CALLERID(all)} is in now Intent Bangla Section)
- same = n,Answer()
- same = n(options),NoOp(In OPTIONS - Intent Bangla Section)
- same = n,GotoIf($[${EXISTS(${LoopCount})}]?read)
- same = n,Set(LoopCount=0)
- same = n(read),NoOp(${LoopCount})
- same = n,Read(BANGLAINTENTCHOICE,/etc/asterisk/asterisk-intent-bangla,1,s,2,3)
- same = n,GotoIf($[ "${BANGLAINTENTCHOICE}" = "1"]?sales)
- same = n,GotoIf($[ "${BANGLAINTENTCHOICE}" = "2"]?ivr-invoice-bangla)
- same = n(invalid),SayDigits(${BANGLAINTENTCHOICE})
- same = n,Playback(pbx-invalid)
- same = n,Set(LoopCount=$[${LoopCount} + 1])
- same = n,GotoIf($[ "${LoopCount}" <= "2"]?options)
- same = n,Voicemail(09614204020@example,u)
- same = n,Hangup()
- same = n(sales),Goto(sales,1)
- same = n(ivr-invoice-bangla),Goto(ivr-invoice-bangla,1)
- exten = ivr-invoice-english,1,NoOp(${CALLERID(all)} is in now Invoice English section)
- same = n,Answer()
- same = n(options),NoOp(In OPTIONS section - Invoice English Section)
- same = n,GotoIf($[${EXISTS(${LoopCount})}]?read)
- same = n,Set(LoopCount=0)
- same = n(read),NoOp(${LoopCount})
- same = n,Read(ENGLISHINVOICENUMBER,/etc/asterisk/invoice-intent-english,6,s,1,12)
- same = n,Set(CALLERID(name)=INVOICE#${ENGLISHINVOICENUMBER})
- same = n,Goto(support)
- same = n(invalid),SayDigits(${ENGLISHINVOICENUMBER})
- same = n,Playback(pbx-invalid)
- same = n,Set(LoopCount=$[${LoopCount} + 1])
- same = n,GotoIf($[ "${LoopCount}" <= "2"]?options)
- same = n,Voicemail(09614204020@example,u)
- same = n,Hangup()
- same = n(support),Goto(support,1)
- exten = ivr-invoice-bangla,1,NoOp(${CALLERID(all)} is in now Invoice Bangla section)
- same = n,Answer()
- same = n(options),NoOp(In OPTIONS section - Invoice Bangla Section)
- same = n,GotoIf($[${EXISTS(${LoopCount})}]?read)
- same = n,Set(LoopCount=0)
- same = n(read),NoOp(${LoopCount})
- same = n,Read(BANGLAINVOICENUMBER,/etc/asterisk/invoice-intent-bangla,6,s,1,12)
- same = n,Set(CALLERID(name)=INVOICE#${BANGLAINVOICENUMBER})
- same = n,Goto(support)
- same = n(invalid),SayDigits(${INTENTCHOICE})
- same = n,Playback(pbx-invalid)
- same = n,Set(LoopCount=$[${LoopCount} + 1])
- same = n,GotoIf($[ "${LoopCount}" <= "2"]?options)
- same = n,Voicemail(09614204020@example,u)
- same = n,Hangup()
- same = n(support),Goto(support,1)
- exten = sales,1,Verbose(1, "${CALLERID(all)} entering sales queue")
- same = n,Answer()
- same = n,Queue(sales)
- same = n,Voicemail(09614204020@backpackbang,u)
- same = n,Hangup()
- exten = support,1,Verbose(1, "${CALLERID(all)} entering support queue")
- same = n,Answer()
- same = n,Queue(support)
- same = n,Voicemail(09614204020@backpackbang,u)
- same = n,Hangup()
- exten = *54,1,Verbose(1, "Logging in Queue Member ${Queues}")
- same = n,Set(QueuesBuffer=${Queues})
- same = n,Set(MemberChannel=${CHANNEL(channeltype)}/${CHANNEL(endpoint)})
- same = n,While($["${SET(next=${POP(QueuesBuffer,^)})}" != ""])
- same = n,Verbose(1, "Logging in Queue Member ${MemberChannel} to ${next}")
- same = n,AddQueueMember(${next},${MemberChannel},,,${MemberChannel})
- same = n,Verbose(1, "${AQMSTATUS}")
- same = n,EndWhile
- same = n,Playback(agent-loginok)
- same = n,Hangup()
- exten = *56,1,Verbose(1, "Logging off Queue Member")
- same = n,Set(QueuesBuffer=${Queues})
- same = n,Set(MemberChannel=${CHANNEL(channeltype)}/${CHANNEL(endpoint)})
- same = n,While($["${SET(next=${POP(QueuesBuffer,^)})}" != ""])
- same = n,Verbose(1, "Logging off Queue Member ${MemberChannel} from ${next}")
- same = n,RemoveQueueMember(${next},${MemberChannel})
- same = n,Verbose(1, "${RQMSTATUS}")
- same = n,EndWhile
- same = n,Playback(agent-loggedoff)
- same = n,Hangup()
- exten = *72,1,Verbose(1, "Pause Queue Member")
- same = n,Set(MemberChannel=${CHANNEL(channeltype)}/${CHANNEL(endpoint)})
- same = n,PauseQueueMember(,${MemberChannel})
- same = n,Verbose(1, "${PQMSTATUS}")
- same = n,Playback(dictate/paused)
- same = n,Hangup()
- exten = *87,1,Verbose(1, "Unpause Queue Member")
- same = n,Set(MemberChannel=${CHANNEL(channeltype)}/${CHANNEL(endpoint)})
- same = n,UnpauseQueueMember(,${MemberChannel})
- same = n,Verbose(1, "${UPQMSTATUS}")
- same = n,Playback(agent-loginok)
- same = n,Hangup()
- [local]
- exten = _X.,1,NoOp()
- same = n,Verbose(1, "${CALLERID(all)} dialed.")
- same = n,Set(CDR_PROP(disable)=1)
- same = n,Goto(internal-main,${EXTEN},1)
- exten = _*X.,1,NoOp()
- same = n,Verbose(1, "${CALLERID(all)} dialed.")
- same = n,Set(CDR_PROP(disable)=1)
- same = n,Goto(internal-main,${EXTEN},1)
- [trunk-incoming]
- exten = 09614204020,1,Verbose(1, "New caller, ${CALLERID(num)} dialed from external to hunt number.")
- same = n,Goto(queues,ivr-greeting,1)
- exten = _+X.,1,Goto(invalid,1)
- exten = _X.,1,Goto(invalid,1)
- exten = invalid,1,Verbose(1, "Invalid extension")
- same = n,Answer()
- same = n,Playback(pbx-invalid)
- same = n,Hangup()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement