[asterisk-users] redirect based on incoming number
Lyle Giese
lyle at lcrcomputer.net
Mon Aug 9 13:13:35 CDT 2010
Barry Fawthrop wrote:
> How does one redirect calls based on incoming number or caller ID or the
> lack thereof?
>
> current I have for number 123-4567 that it redirects all 800 , 877 and
> 866 numbers to Voicemail directly.
> If the primary area code is 352 then accept this and pass it to
> extension 5555
>
> exten => 1234567/_352XXXXXXX,4,Dial(SIP/5555,240)
> exten => 1234567/_800XXXXXXX,4,Voicemail(5555 at default,b)
> exten => 1234567/_866XXXXXXX,4,Voicemail(5555 at default,b)
> exten => 1234567/_877XXXXXXX,4,Voicemail(5555 at default,b)
> exten => 1234567/1800XXXXXXX,4,Voicemail(5555 at default,b)
> exten => 1234567/1866XXXXXXX,4,Voicemail(5555 at default,b)
> exten => 1234567/1877XXXXXXX,4,Voicemail(5555 at default,b)
> exten => 1234567/+1800XXXXXXX,4,Voicemail(5555 at default,b)
> exten => 1234567/+1866XXXXXXX,4,Voicemail(5555 at default,b)
> exten => 1234567/+1877XXXXXXX,4,Voicemail(5555 at default,b)
> exten => 1234567/_*1866876.,4,Voicemail(5555 at default,b)
> exten => 1234567/_+18668762996,4,Voicemail(5555 at default,b)
>
> Any help will be greatly appriecated
>
> Thanks
>
>
>
>
>
[menu]
exten => s,n,Set(NPA=${CALLERID(num):0:3}); grab area code from caller id
exten => s,n,GotoIF($[ "${NPA}" = "800" ]?marketeer)
exten => s,n,GotoIF($[ "${NPA}" = "888" ]?marketeer)
exten => s,n,GotoIF($[ "${NPA}" = "877" ]?marketeer)
exten => s,n,GotoIF($[ "${NPA}" = "866" ]?marketeer)
exten => s,n,GotoIF($[ "${NPA}" = "855" ]?marketeer)
exten => s,n,GotoIF($[ "${NPA}" = "844" ]?marketeer)
exten => s,n,GotoIF($[ "${NPA}" = "833" ]?marketeer)
exten => s,n,GotoIF($[ "${NPA}" = "822" ]?marketeer)
exten => s,n(marketeer),Set(TIMEOUT(digit)=6); allow humans to bypass
drop into VM
exten => s,n,Set(TIMEOUT(response)=10);
exten => s,n,Set(CALLERID(num)=51${CALLERID(num)})
exten => s,n,Background(missingcallerid); Dial 111 to actually ring a phone
exten => s,n,Voicemail(u111); no digits dialed drop into VM
exten => s,n,Hangup
Lyle
More information about the asterisk-users
mailing list