Hello Betuj,
One way to achieve this is to play with "Destination" (under INBOUND DID) and their priorities. This is an example:
Code:
DESTINATION CREATION DATE DID ACTIVE VOIP PRIOR MINUTES USED
SIP/1111122222 2011-03-29 16:17 55553333 Active Active 1 00:00
Local/1111122222@voicemail 2011-03-29 16:19 55553333 Active Active 2 00:00
The first priority will try to call the user, if he/she does not answer or is not registered, the call will go to the second one, to 1111122222 in "voicemail" context in your extensions.conf file...it should look like this:
[voicemail]
exten => _X.,1,Set(CHANNEL(language)=es)
exten => _X.,2,Voicemail(${EXTEN}@default,u)
exten => _X.,n,Hangup
You should also define a mailbox named 111112222 in your voicemail.conf (how to do that?....see some examples googling it
is very easy, believe me).
Let me know if this helped you.
Regards,
Fernando