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: Mon Nov 17, 2014 3:52 pm Post subject: [asterisk-users] Get the status of a PJSIP endpoint? |
|
|
Is there an equivalent to ${SIPPEER(${peer},status)} for PJSIP?
The closest I've been able to get is to use AST_SOURCERY to see if they have a contact
${AST_SORCERY(res_pjsip,aor,${peer},contact) but I'm not certain if I'll still have a contact entry after a phone has gone unreachable?
--
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 |
|
|
george.joseph at fairv... Guest
|
Posted: Tue Nov 18, 2014 12:55 pm Post subject: [asterisk-users] Get the status of a PJSIP endpoint? |
|
|
On Mon, Nov 17, 2014 at 1:52 PM, John Kiniston <johnkiniston@gmail.com (johnkiniston@gmail.com)> wrote:
Quote: | Is there an equivalent to ${SIPPEER(${peer},status)} for PJSIP?
|
I could swear there was a non-obvious way to get state but I guess it's so non-obvious that I can't find it again. I'll create one if I can;t find it.
Quote: |
The closest I've been able to get is to use AST_SOURCERY to see if they have a contact
${AST_SORCERY(res_pjsip,aor,${peer},contact) but I'm not certain if I'll still have a contact entry after a phone has gone unreachable?
|
Yeah, this isn't going to give you current state.
|
|
Back to top |
|
|
george.joseph at fairv... Guest
|
Posted: Tue Nov 18, 2014 1:01 pm Post subject: [asterisk-users] Get the status of a PJSIP endpoint? |
|
|
On Tue, Nov 18, 2014 at 10:55 AM, George Joseph <george.joseph@fairview5.com (george.joseph@fairview5.com)> wrote:
Quote: |
On Mon, Nov 17, 2014 at 1:52 PM, John Kiniston <johnkiniston@gmail.com (johnkiniston@gmail.com)> wrote:
Quote: | Is there an equivalent to ${SIPPEER(${peer},status)} for PJSIP?
|
I could swear there was a non-obvious way to get state but I guess it's so non-obvious that I can't find it again. I'll create one if I can;t find it.
|
Oh yeah... It's DEVICE_STATE(PJSIP/endpoint)
Not as non-obvious as I thought.
Quote: | Quote: |
The closest I've been able to get is to use AST_SOURCERY to see if they have a contact
${AST_SORCERY(res_pjsip,aor,${peer},contact) but I'm not certain if I'll still have a contact entry after a phone has gone unreachable?
|
Yeah, this isn't going to give you current state.
|
|
|
Back to top |
|
|
johnkiniston at gmail.com Guest
|
Posted: Tue Nov 18, 2014 1:33 pm Post subject: [asterisk-users] Get the status of a PJSIP endpoint? |
|
|
Thanks George, That appears to do what I need and it's easier to call as well. Win/Win!
It even looks like I can use the same function on my 1.8 boxes so now I can go back and update those to use the same code I'm writing now.
On Tue, Nov 18, 2014 at 11:00 AM, George Joseph <george.joseph@fairview5.com (george.joseph@fairview5.com)> wrote:
Quote: | On Tue, Nov 18, 2014 at 10:55 AM, George Joseph <george.joseph@fairview5.com (george.joseph@fairview5.com)> wrote:
Quote: |
On Mon, Nov 17, 2014 at 1:52 PM, John Kiniston <johnkiniston@gmail.com (johnkiniston@gmail.com)> wrote:
Quote: | Is there an equivalent to ${SIPPEER(${peer},status)} for PJSIP?
|
I could swear there was a non-obvious way to get state but I guess it's so non-obvious that I can't find it again. I'll create one if I can;t find it.
|
Oh yeah... It's DEVICE_STATE(PJSIP/endpoint)
Not as non-obvious as I thought.
Quote: | Quote: |
The closest I've been able to get is to use AST_SOURCERY to see if they have a contact
${AST_SORCERY(res_pjsip,aor,${peer},contact) but I'm not certain if I'll still have a contact entry after a phone has gone unreachable?
|
Yeah, this isn't going to give you current state.
|
--
_____________________________________________________________________
-- 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
|