Dialplan using MailboxExists and shared mailbox

Hi,

I have a situation where multiple SIP clients share the same mailbox, i.e. users 101, 102 and 103 are all configured with mailbox “100@default”.

I also one central macro for local SIP calling so that the actions taken when a call is received are consistent. This presents a problem however.

Say that extension 103 wants to call extension 101. Extension 101 doesn’t answer the phone and it needs to go to voicemail. The only information I’ve been able to pass to the Macro is the number to call, i.e. SIP/101. At the point where it needs to go to voicemail, I first want to check that the mailbox exists… but I can only use “101” to check which is obviously not going to work because the mailbox is shared and is numbered 100.

Of course this works fine when users are locally picking up voicemail by using VoiceMail() because the mailbox line is configured in sip.conf, but is there any way to perform a lookup of user configuration options from sip.conf during a dialplan? Or is there a more elegant way to use shared mailboxes when you can’t read the sip.conf?

Thanks in advance

Chris