[asterisk-users] Determining SIP peer's default mailbox

Philipp Kempgen philipp.kempgen at amooma.de
Sat Oct 31 20:09:22 CDT 2009


Steve Johnson schrieb:
> How can you obtain the default mailbox for a SIP extension (as stored
> in sip.conf and shown with "sip show peer <ext>")?  Is there a
> function to extract it?
> 
> Why?  Some extensions have shared mailboxes and others do not and I
> don't want to duplicate logic, just use the extension's default
> mailbox as coded in sip.conf.
> 
> sip.conf
> ----------
> [100]
> mailbox=100
> 
> [102]
> mailbox=102
> 
> [103]
> mailbox=100
> 
> I want a function which I can use in the dialplan (1.6) that works like:
> DefaultMailbox(100) -> 100
> DefaultMailbox(102) -> 102
> DefaultMailbox(103) -> 100
> 
> for example:
> exten s,n,VoicemailMain(DefaultMailbox(${CALLERID(num)}))

SIPPEER(...|mailbox) I guess.[1] E.g.
    VoicemailMain(${SIPPEER(${CALLERID(num)}|mailbox)});

[1] http://www.das-asterisk-buch.de/2.1/functions-sippeer.html


    Philipp Kempgen
-- 
AMOOMA GmbH - Bachstr. 126 - 56566 Neuwied  ->  http://www.amooma.de
Geschäftsführer: Stefan Wintermeyer, Handelsregister: Neuwied B14998
Asterisk: http://the-asterisk-book.com - http://das-asterisk-buch.de
Videos of the AMOOCON VoIP conference 2009 ->  http://www.amoocon.de
-- 



More information about the asterisk-users mailing list