Possible to go to VM depending on caller ID?

Hi, I’d like to be able to direct calls from my mobile to go straight to VM box to check messages. Is there some way of setting a filter or some such that will do this?

Cheers.

I found the answer googling and looking up info on GotoIf:

exten => s,1,GotoIf($["${CALLERID(num)}" = “xxxxxxxxx”]?collector)
exten => s,n,Verbose(1,Extension dave)
exten => s,n,Dial(SIP/dave,15)
exten => s,n,Playback(vm-nobodyavail)
exten => s,n,Voicemail(dave@default)
exten => s,n,Playback(vm-goodbye)
exten => s,n(collector),VoiceMailMain(dave@default)
exten => s,n,Hangup()

Perhaps someone else will find it useful.

There is a simpler way to do routing based on CallerID in Asterisk. Please check the following link:

voip-info.org/tiki-index.php … sions.conf

(look for ex-girl friend extension /logic :smile::):):))

Thanks :smile:

Ok Based on that I now have:

[default]
exten => s/xxxxxxxxxx,1,VoiceMailMain(sdave@default)
exten => s/xxxxxxxxxx,n,Hangup()
exten => s,1,Verbose(1,Extension dave)
exten => s,n,Dial(SIP/dave,15)
exten => s,n,Playback(vm-nobodyavail)
exten => s,n,Voicemail(dave@default)
exten => s,n,Playback(vm-goodbye)
exten => s,n,Hangup()

Replace the x’s with calling number.