[Solved] Voicemail not picking up after time threshold

Ok here is my issue. I have a dialplan setup that is working very well except that it is not sending callers from my PSTN line to voicemail. After the 20 sec of ringing the customer is then disconnected without voicemail ever picking up, below is a copy of my extensions.conf:

[code][default]
exten => _NXXNXXXXXX,1,Dial(SIP/1${EXTEN}@OOMA,20)
exten => _XXX.,1,Dial(SIP/${EXTEN}@OOMA,20)
exten => _XXX.,2,Hangup
exten => _XXX.,3,Congestion

[macro-phone] ;Macro for all phones on network
exten => s,1,Dial(SIP/${MACRO_EXTEN},20)
exten => s,n,Goto(${DIALSTATUS},1)
exten => ANSWER,1,Hangup
exten => CANCEL,1,Hangup
exten => NOANSWER,1,Voicemail(${MACRO_EXTEN}@default,u)
exten => BUSY,1,Voicemail(${MACRO_EXTEN}@default,b)
exten => CONGESTION,1,Voicemail(${MACRO_EXTEN}@default,b)
exten => CHANUNAVAIL,1,Voicemail(${MACRO_EXTEN}@default,u)
exten => a,1,VoicemailMain(${MACRO_EXTEN}@default)

[stations]
exten => 105,1,Macro(phone)
exten => 110,1,Macro(phone)
exten => 444,1,VoicemailMain(default) ;setup voicemail box

[users]
include => default
include => stations
include => ooma-in

[ooma-in] ;Incoming call context for OOMA
exten = s,1,Answer
exten = s,n,Wait(1)
exten = s,n,Dial(SIP/105,&SIP/110,20) ;Call from OOMA ring these phones
exten = s,n,Hangup[/code]

Now I know that I need to make the changes to the ooma-in context in this file, however I don’t know exactly how to do it as all the changes I have made so far result in OOMA not being passed to *. Voicemail is working perfectly for calls that are initiated on * (ext 105 and 110) however it does not working for incoming calls from OOMA. So here is what I would like to do if anyone can help me.

I would like calls to come in on my OOMA, if the call is a specific number I would like it to ring for the allotted time (20 seconds in this case) and then hang up. If it is from any other number I would like it to ring for the allotted time and then send the user to the voicemail box for my ext 105, even though it will ring all of my phones on every call. Does this make sense? Is this possible? If so can someone please point me in the right direction, please and thank you in advance.

Looks like I solved, at least half of my own issue. I put this into my OOMA-in dialplan and this seems to work:

[OOMA-in] ;Incoming call context for OOMA exten => s,1,Answer exten => s,n,Wait(1) exten => s,n,Dial(SIP/105&SIP/110,20) ;Call from OOMA ring these phones exten => s,n,Goto(${DIALSTATUS},1) ;Process to deliver call to voicemail if no answer after 20 secs exten => NOANSWER,1,Voicemail(105@default,u) exten => BUSY,1,Voicemail (105@default,b) exten => CONGESTION,1,Voicemail (105@default,b) exten => CHANUNAVAIL,1,Voicemail (105@default,u) exten => a,1,VoicemailMain(105@default)

Can anyone help me with the specific number filtering?

Anyone that can provide me direction on this I would appreciate it.

I now have voicemail setup for all incoming calls, however I am trying to use ex-girlfriend logic to stop a specific number from ever reaching voicemail. Here is what I’ve tried to no avail:

[code][OOMA-in] ;Incoming call context for OOMA
exten => s,1,Answer
exten => s,n,Wait(1)
exten => s/9999999999,n,Goto(myex,s,1)
exten => s,n,Dial(SIP/105,20) ;Call from OOMA ring these phones
exten => s,n,Goto(${DIALSTATUS},1) ;Process to deliver call to voicemail if no answer after 20 secs
exten => NOANSWER,1,Voicemail(105@default,u)
exten => BUSY,1,Voicemail (105@default,b)
exten => CONGESTION,1,Voicemail (105@default,b)
exten => CHANUNAVAIL,1,Voicemail (105@default,u)
exten => a,1,VoicemailMain(105@default)

[myex]
exten => s,1,Dial(SIP/105&SIP/110,30)
exten => s,n,Hangup[/code]

I think Its better to use ${CALLERID(num)} variable so that you can have more powerful dialplan .

The ex-girlfriend line increments the values of n, so when it doesn’t match, there is a gap in the priorities, and the dialplan terminates.

Thanks David this helped.

For anyone else that runs into this issue, attached is how I solved this.

[code][OOMA-in] ;Incoming call context for OOMA
exten => s,1,Answer
exten => s,2,Wait(1)
exten => s/9999999999,3,Goto(myex,s,1) ;Exclude myex from going to voicemail
exten => s,3,Dial(SIP/105,20) ;Call from OOMA ring these phones
exten => s,4,Goto(${DIALSTATUS},1) ;Process to deliver call to voicemail if no answer after 20 secs
exten => NOANSWER,1,Voicemail(105@default,u)
exten => BUSY,1,Voicemail (105@default,b)
exten => CONGESTION,1,Voicemail (105@default,b)
exten => CHANUNAVAIL,1,Voicemail (105@default,u)
exten => a,1,VoicemailMain(105@default) ;Voicemail greeting based on Status for mailbox 105

[myex]
exten => s,1,Dial(SIP/105&SIP/110,30) ;Call from myex Dial all phones hangup after 30 secs
exten => s,2,Hangup
[/code]

Good thing for me that this is just for my home phone system and won’t require extensive dialplan adjustments. Otherwise having to change this could become cumbersome in the future. Again I’m extremely appreciative of the help david.

omid, can you please point me to more info regarding your CallerID function? All i could find doing a search was information on using SET callerID, which in this case is not what I wanted, I needed to screen based on the caller ID. I’m about 2 weeks into this asterisk thing, so any tips you can point me to which will help me rewrite/optimize my dialplan logic will be extremely helpful. At this point I’m a sponge.

Thank you both for your help.