VoIP Mailing List Archives
Mailing list archives for the VoIP community |
|
View previous topic :: View next topic |
Author |
Message |
johnkiniston at gmail.com Guest
|
Posted: Thu Nov 06, 2014 6:16 pm Post subject: [asterisk-users] Function to get mailbox for a PJSIP Endpoin |
|
|
Howdy,
I'm trying to re-write my voicemail check extension.
I formerly used the SIPPEER function to get the mailbox for a peer with ${SIPPEER(${peer},mailbox)}
Is there a way to do this with PJSIP now that I've converted over?
I see a function PJSIP_ENDPOINT and it has a mailboxes subset but I'm not retrieving any data from it when I query it.
--
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.
---Heinlein |
|
Back to top |
|
|
jcolp at digium.com Guest
|
Posted: Thu Nov 06, 2014 8:09 pm Post subject: [asterisk-users] Function to get mailbox for a PJSIP Endpoin |
|
|
John Kiniston wrote:
Kia ora,
Quote: | I'm trying to re-write my voicemail check extension.
I formerly used the SIPPEER function to get the mailbox for a peer with
${SIPPEER(${peer},mailbox)}
Is there a way to do this with PJSIP now that I've converted over?
I see a function PJSIP_ENDPOINT and it has a mailboxes subset but I'm
not retrieving any data from it when I query it.
|
What is your pjsip.conf like for the endpoint and AOR? (Where have you
configured it). If specified on the AOR then it won't be accessible via
PJSIP_ENDPOINT and there is not, as of yet, a dialplan function for
querying for AOR information.
Cheers,
--
Joshua Colp
Digium, Inc. | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US
Check us out at: www.digium.com & www.asterisk.org
--
_____________________________________________________________________
-- 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 |
|
Back to top |
|
|
johnkiniston at gmail.com Guest
|
Posted: Thu Nov 06, 2014 8:30 pm Post subject: [asterisk-users] Function to get mailbox for a PJSIP Endpoin |
|
|
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?
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?
[endpoint_nat_g722_internal](!)
type=endpoint
transport=transport-udp-nat
context=internal
disallow=all
allow=g722
allow=ulaw
direct_media=no
rtp_symmetric=yes
[auth_userpass](!)
type=auth
auth_type=userpass
[aor_dynamic](!)
type=aor
qualify_frequency=2000 ; Interval at which to qualify an AoR (default: "0")
max_contacts=2
[0015652090cf-1]
type=phoneprov
PROFILE=yealink
FIRMWARE=T28v2.72.0.80.rom
MAC=0015652090cf
endpoint=7102
LINE=1
LABEL=7102
[7102](endpoint_nat_g722_internal)
callerid=Yealink <7102>
auth=7102
aors=7102
[7102](auth_userpass)
username=7102
password=YeahRight
[7102](aor_dynamic)
mailboxes=7102@default
On Thu, Nov 6, 2014 at 6:09 PM, Joshua Colp <jcolp@digium.com (jcolp@digium.com)> wrote:
Quote: | John Kiniston wrote:
Kia ora,
Quote: | I'm trying to re-write my voicemail check extension.
I formerly used the SIPPEER function to get the mailbox for a peer with
${SIPPEER(${peer},mailbox)}
Is there a way to do this with PJSIP now that I've converted over?
I see a function PJSIP_ENDPOINT and it has a mailboxes subset but I'm
not retrieving any data from it when I query it.
|
What is your pjsip.conf like for the endpoint and AOR? (Where have you configured it). If specified on the AOR then it won't be accessible via PJSIP_ENDPOINT and there is not, as of yet, a dialplan function for querying for AOR information.
Cheers,
--
Joshua Colp
Digium, Inc. | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US
Check us out at: www.digium.com & www.asterisk.org
--
_____________________________________________________________________
-- 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.
---Heinlein |
|
Back to top |
|
|
jcolp at digium.com Guest
|
Posted: Fri Nov 07, 2014 9:20 am Post subject: [asterisk-users] Function to get mailbox for a PJSIP Endpoin |
|
|
John Kiniston wrote:
Quote: | 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.
Quote: | 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.
Cheers,
--
Joshua Colp
Digium, Inc. | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US
Check us out at: www.digium.com & www.asterisk.org
--
_____________________________________________________________________
-- 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 |
|
Back to top |
|
|
george.joseph at fairv... Guest
|
Posted: Fri Nov 07, 2014 8:26 pm Post subject: [asterisk-users] Function to get mailbox for a PJSIP Endpoin |
|
|
On Fri, Nov 7, 2014 at 6:20 AM, Joshua Colp <jcolp@digium.com (jcolp@digium.com)> wrote:
Quote: | John Kiniston wrote:
Quote: | 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.
Quote: | 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") |
|
Back to top |
|
|
johnkiniston at gmail.com Guest
|
Posted: Mon Nov 10, 2014 9:56 am Post subject: [asterisk-users] Function to get mailbox for a PJSIP Endpoin |
|
|
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})} = 1]?Set(MAILBOX=${AST_SORCERY(res_pjsip,aor,${ENDPOINT},mailboxes)}))
same => n,ExecIf($[${ISNULL(${MAILBOX})} = 0]?VoicemailMain(${MAILBOX},s))
same => n,ExecIf($[${ISNULL(${MAILBOXCONTEXT})} = 0]?VoicemailMain(@${MAILBOXCONTEXT}))
same => n,Playtones(congestion)
same => n,Congestion(
same => n,Hangup()
On Fri, Nov 7, 2014 at 6:26 PM, George Joseph <george.joseph@fairview5.com (george.joseph@fairview5.com)> wrote:
Quote: |
On Fri, Nov 7, 2014 at 6:20 AM, Joshua Colp <jcolp@digium.com (jcolp@digium.com)> wrote:
Quote: | John Kiniston wrote:
Quote: | 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.
Quote: | 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.
---Heinlein |
|
Back to top |
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|