Many howtos around the internet on how to remotely access your voicemail box involve a dedicated extension reachable from the outside or an IVR menu entry. But wouldn’t it be much nicer if you could just press the * DTMF key during the announcement? Turns out, this is quite simple:
[incoming-external]
exten => s,1,Dial(SIP/1234,20)
exten => s,n,Voicemail(1234,us)
exten => a,1,VoiceMailMain(1234)
exten => a,n,Hangup()
And it even works when you’re using macros (like I am):
[incoming-external]
exten => 5551234,1,Macro(incoming-plus-voicemail,SIP/1234,20,1234)
exten => 5551337,1,Macro(incoming-plus-voicemail,SIP/1337,20,1337)
[macro-incoming-plus-voicemail] ; SIP/xxx, wait time, voicemail
exten => s,1,Dial(${ARG1},${ARG2}
exten => s,n,Voicemail(${ARG3},us)
; push * during the announcement to access your mailbox
exten => a,1,VoiceMailMain(${ARG3})
exten => a,n,Hangup()
Good simple instructions.
But I tried using this config :
exten => 4189778248,n,Playback(greeting)
exten => 4189778248,n,Voicemail(1000@default,s)
exten => a,1,VoiceMailMain(1000@default)
And since I am not playing the default greeting, the ‘*’ is not interpreted.
Any thought?
I don’t think there’s a way to react to DTMF digits in Playback(). Perhaps you can use ControlPlayback(): set the stop parameter to * and check whether the variable CPLAYBACKSTATUS is set to USERSTOPPED.