I don't think the directory check method is reliable; a user can have a
mailbox but if no messages have been left then the directory structure may
not exist.  Through the AMI you can show peer/user information and I believe
it shows you the mailbox associated with user/peer.

-Raj-

-----Original Message-----
From: asterisk-users-boun...@lists.digium.com
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Tech Support
Sent: Thursday, April 21, 2016 4:23 PM
To: 'Asterisk Users Mailing List - Non-Commercial Discussion'
Subject: Re: [asterisk-users] AMI: check if the user has a Mailbox

    I don't think you are going to be able to get that information using the
AMI. You should be able to figure it out though by looking at the voicemail
directory structure in /var/spool/asterisk/voicemail/<context>/<exten #> or
in your database if you're using real time. It's probably just as easy to
write a script that will look for the proper directory as it is to write a
script to query the AMI. 
Regards;
John V. 

-----Original Message-----
From: asterisk-users-boun...@lists.digium.com
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Luca
Bertoncello
Sent: Thursday, April 21, 2016 3:35 PM
To: Asterisk Users
Subject: [asterisk-users] AMI: check if the user has a Mailbox

Hi list!

On an Asterisk-Server I have some users. Just two of them have a Mailbox.
I want to write a little Web interface to manage many things and I'd like to
have a menu point for the voicemail, but just if the user has a Mailbox.

I found the AMI-Command MailboxStatus, but it does not return what I need,
since it returns 0 if the user has a Mailbox but no messages and if the user
has no Mailbox...

Could someone suggest me a way to get this information?

Thanks a lot!
Luca Bertoncello
(lucab...@lucabert.de)

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to
Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


-- 
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


-- 
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to