# Problems with VoiceMailMain

**URL:** <https://community.asterisk.org/t/problems-with-voicemailmain/10627>\
**Category:** Asterisk Support\
**Created:** [November 20, 2006, 10:10pm UTC](https://community.asterisk.org/t/problems-with-voicemailmain/10627 "2006-11-20T22:10:47Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![axlel](https://avatars.discourse-cdn.com/v4/letter/a/a8b319/32.png) [@axlel](https://community.asterisk.org/u/axlel)\
**Post date:** [November 20, 2006, 10:10pm UTC](https://community.asterisk.org/t/problems-with-voicemailmain/10627/1 "2006-11-20T22:10:47Z")

</div>

Hi.  
I am a begginer in asterisk.  
Please excuseme for mi bad english or terms in this message.

Mi problem is the next. I put a extension for acces to voicemail.

exten =\> \*102,1,VoiceMailMain()

When dial to this extension, the voicemail sistem attend the call, receives the MailBox and the password. If the password is bad, said wrong password, and request again the MailBox and Password, but if both are correct, no say noting and after to silence hang the call. This is the log of the CLI (intentionally, I enter a wrong password to check if the sistem read the voicemail.conf. See in the line 4).

1-- Executing VoiceMailMain(“SIP/KABC-82d0”, “”) in new stack  
2-- Playing ‘vm-login’ (language ‘es’)  
3-- Playing ‘vm-password’ (language ‘es’)  
4-- Incorrect password ‘23’ for user ‘32’ (context = default)  
5-- Playing ‘vm-incorrect-mailbox’ (language ‘es’)  
6-- Playing ‘vm-password’ (language ‘es’)  
7== Spawn extension (interno, \*102, 1) exited non-zero on 'SIP/KABC-82d0’  
8-- Executing Hangup(“SIP/KABC-82d0”, “”) in new stack  
9== Spawn extension (interno, h, 1) exited non-zero on ‘SIP/KABC-82d0’

I modify the permissions of folders in /var/spool/asterisk/voicemail, to discard access problems.

Thanks for help.

---

<div class="post-metadata">

**Author:** ![808blogger](https://avatars.discourse-cdn.com/v4/letter/8/b5e925/32.png) [@808blogger](https://community.asterisk.org/u/808blogger)\
**Post date:** [November 21, 2006, 2:59am UTC](https://community.asterisk.org/t/problems-with-voicemailmain/10627/2 "2006-11-21T02:59:18Z")

</div>

Likely you have a context issue or at the least you should pass some variables in there.

try it like this

exten =\> \*102,1,Answer()  
exten =\> \*102,2,VoiceMailMain(${CALLERDIDNUM}@default)  
exten =\> \*102,3,Hangup()

HOWEVER Replace default with the context that the extensions belong to? you could potentially do it like this

exten =\> \*,102,2,VoiceMailMain(${CALLEDIDNUM}@${CONTEXT})

keep in mind these are just suggestions, pass the variables it will be easier.

[quote=“axlel”]Hi.  
I am a begginer in asterisk.  
Please excuseme for mi bad english or terms in this message.

Mi problem is the next. I put a extension for acces to voicemail.

exten =\> \*102,1,VoiceMailMain()

When dial to this extension, the voicemail sistem attend the call, receives the MailBox and the password. If the password is bad, said wrong password, and request again the MailBox and Password, but if both are correct, no say noting and after to silence hang the call. This is the log of the CLI (intentionally, I enter a wrong password to check if the sistem read the voicemail.conf. See in the line 4).

1-- Executing VoiceMailMain(“SIP/KABC-82d0”, “”) in new stack  
2-- Playing ‘vm-login’ (language ‘es’)  
3-- Playing ‘vm-password’ (language ‘es’)  
4-- Incorrect password ‘23’ for user ‘32’ (context = default)  
5-- Playing ‘vm-incorrect-mailbox’ (language ‘es’)  
6-- Playing ‘vm-password’ (language ‘es’)  
7== Spawn extension (interno, \*102, 1) exited non-zero on 'SIP/KABC-82d0’  
8-- Executing Hangup(“SIP/KABC-82d0”, “”) in new stack  
9== Spawn extension (interno, h, 1) exited non-zero on ‘SIP/KABC-82d0’

I modify the permissions of folders in /var/spool/asterisk/voicemail, to discard access problems.

Thanks for help.[/quote]

---

<div class="post-metadata">

**Author:** ![baconbuttie](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/baconbuttie/32/916_2.png) [@baconbuttie](https://community.asterisk.org/u/baconbuttie)\
**Post date:** [November 21, 2006, 3:45am UTC](https://community.asterisk.org/t/problems-with-voicemailmain/10627/3 "2006-11-21T03:45:06Z")

</div>

> [@808blogger](#):
>
> ${CALLERDIDNUM}

do you mean ${CALLERID(num)} ??

---

<div class="post-metadata">

**Author:** ![axlel](https://avatars.discourse-cdn.com/v4/letter/a/a8b319/32.png) [@axlel](https://community.asterisk.org/u/axlel)\
**Post date:** [November 21, 2006, 3:21pm UTC](https://community.asterisk.org/t/problems-with-voicemailmain/10627/4 "2006-11-21T15:21:12Z")

</div>

The problem not is specify a number of mailbox or context, my context is a default, then when writting VoiceMailMain() without arguments, the voicemail system ask the Mailbox and Password for “default” context.

I tried writing specific mailbox and context, this is a example.

exten =\> \*102,n,VoiceMailMain(32@default)

After to execute this extension, the diference is that no ask the MailBox, but next to digit the password, the himself error happens.
