[asterisk-users] Function to get mailbox for a PJSIP Endpoint?

John Kiniston johnkiniston at gmail.com
Mon Nov 10 08:55:54 CST 2014

Thank you George, That works.

If anyone is curious here is what I'm doing for my mail checking extension.

exten => *98,1,NoOP()
 same =>     n,Answer()
 same =>     n,Set(ENDPOINT=${CHANNEL(endpoint)}) ; Get the peer
 same =>     n,Set(MAILBOX=${PJSIP_ENDPOINT(${ENDPOINT},mailboxes)})
 same =>     n,ExecIf($[${ISNULL(${MAILBOX})} =
 same =>     n,ExecIf($[${ISNULL(${MAILBOX})} =
 same =>     n,ExecIf($[${ISNULL(${MAILBOXCONTEXT})} =
 same =>     n,Playtones(congestion)
 same =>     n,Congestion(8)
 same =>     n,Hangup()

On Fri, Nov 7, 2014 at 6:26 PM, George Joseph <george.joseph at fairview5.com>

> On Fri, Nov 7, 2014 at 6:20 AM, Joshua Colp <jcolp at digium.com> wrote:
>> John Kiniston wrote:
>>> Here's my config, I am configuring the mailboxes as you see below in the
>>> aor.
>>> It looked like that was the recommended place to configure it?
>> There's no recommendation one way or the other really - it depends on
>> what the devices in question are expecting.
>>  If I configure the mailboxes in the Endpoint then the PBX will be
>>> sending unsolicited MWI vs if I configure them in the AOR then my phones
>>> subscribe for MWI Correct?
>> Correct. Since you are configuring on the AOR there is no current way to
>> grab that information in the dialplan from the AOR.
> Actually you can use the AST_SORCERY dialplan function function to
> retrieve any variable from any PJSIP object.  AST_SORCERY("res_pjsip",
> "aor", "myaor", "mailboxes")
> --
> _____________________________________________________________________
> -- 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

A human being should be able to change a diaper, plan an invasion, butcher
a hog, conn a ship, design a building, write a sonnet, balance accounts,
build a wall, set a bone, comfort the dying, take orders, give orders,
cooperate, act alone, solve equations, analyze a new problem, pitch manure,
program a computer, cook a tasty meal, fight efficiently, die gallantly.
Specialization is for insects.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20141110/fa4e950a/attachment.html>

More information about the asterisk-users mailing list