Folks,
For an incoming call, we present the caller with directory menu:
exten => 8, 1, Directory(default, SIP)
Sometimes, because of network problems, a SIP phone may not register with Asterisk. When the caller selects the last 3 digits of a person’s name whose phone is not registered, asterisk just hangs up the phone (as haven’t defined any other rule).
Ideally, I would like to take the caller to that person’s voicemail.
exten => 8, 1, Directory(default, SIP)
exten => 8,2,Gosub(stdexten(xxx, SIP/xxx)
OR
exten => 8, 1, Directory(default, SIP)
exten => 8,2, Voicemail(xxx, u)
The problem is, I don’t know how to get the extension out of Directory() function and pass it on to the next step.
Is there a way to do this?
Or, is there a better approach?
Thank you in advance for your help.
Regards,
Peter