MailboxExists() using fullname rather than extension

Hi,
I need to be able to configure voimailbox’s for a huge number of users that will exclusivly dial-in using mobile phones.

As far as I can tell asterisk only supports 9999 voicemail boxes, as this is the maximum number of extensions. Is this correct?

I wish to identify the voicemail boxes via the mobile phone number e.g.07789437653, but obsiovly this is far greater than 9999.

I use the phone number as the fullname parameter, but I cannot see a way of accessing a voicemail inbox via the fullname.

As far as I can tell the MailboxExists() dialplan application will only accept an extension number as a paramter. Is there a way of accessing a mailbox via the fullname? Or is there a way of converting a fullname into an extension number (i’ll have to live with the 9999 limit)?

After lots of research, I managed to use the built in asterisk database to map between phone numbers and extentions.

exten=6001,1,Answer() exten=6001,n,Hangup() exten=6001,n,Set(MYMAILBOX=${DB(voicemailmapping/${CALLERID()})}) exten=6001,n,MailboxExists(${MYMAILBOX}) exten=6001,n,GotoIf($["${VMBOXEXISTSSTATUS}" = "SUCCESS"]?exists) exten=6001,n,Playback(im-sorry) exten=6001,n,Hangup() exten=6001,n(exists),VoiceMailMain(${MYMAILBOX}@default,s)

I then predicted problems with creating the extensions in the first place (e.g. how to increament the extension number using AJAM in a thread safe way!)… so went back to the research.

The solution jumped into my face: In the web gui, go to options and there
you can specify the maximum digits an extension number can be! A lot of wasted time, but hey I learn’t how to use the AstDB, perhaps I will need it llater.

The solution just jumped in my face

After lots of research, I managed to use the built in asterisk database to map between phone numbers and extentions.

exten=6001,1,Answer() exten=6001,n,Hangup() exten=6001,n,Set(MYMAILBOX=${DB(voicemailmapping/${CALLERID()})}) exten=6001,n,MailboxExists(${MYMAILBOX}) exten=6001,n,GotoIf($["${VMBOXEXISTSSTATUS}" = "SUCCESS"]?exists) exten=6001,n,Playback(im-sorry) exten=6001,n,Hangup() exten=6001,n(exists),VoiceMailMain(${MYMAILBOX}@default,s)

I then predicted problems with creating the extensions in the first place (e.g. how to increament the extension number using AJAM in a thread safe way!)… so went back to the research.

The solution jumped into my face: In the web gui, go to options and there
you can specify the maximum digits an extension number can be! A lot of wasted time, but hey I learn’t how to use the AstDB, perhaps I will need it llater.

The solution just jumped in my face