Steve Johnson
2009-Oct-31 21:22 UTC
[asterisk-users] Determining extension's sip.conf default mailbox
Hello list, 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)})) Suggestions? Thanks!
Philipp Kempgen
2009-Nov-01 01:09 UTC
[asterisk-users] Determining SIP peer's default mailbox
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 --