Asterisk Info--- Peers page


(Chasemixon) #1

Can someone tell me what table this page comes from, I have spent the better part of the day poking around in mysql looking in the tables but can’t seem to find this info. I’m looking for the IP address of the host for each SIP device. I’m just reading NO WRITING… :slight_smile:


(Andrew) #2

asterisk -x "sip show peers"


(Communication Technologies) #3

It doesn’t come from FreePBX (msql), but from Asterisk. You would access via he CLI.


(Chasemixon) #4

Dang it, I was hoping to pull it from a table… :frowning:


(Chasemixon) #5

thanks for the quick replies!


(Itzik) #6

You can also get the endpoints status from AMI and ARI.


(Chasemixon) #7

can you elaborate on that? like I said in the post I’m looking for the IP info for each host?


(Itzik) #8

sip show peers will only show ChanSIP endpoints. If you want to get ChanSIP and PJSIP with one query, you can do it with ARI:

https://wiki.asterisk.org/wiki/display/AST/Asterisk+18+Endpoints+REST+API

See this post for an example. Note, you can also pass the credentials like this:

GET /ari/channels?api_key=username:password

You can also do it with AMI.

PJSIP:
https://wiki.asterisk.org/wiki/display/AST/Asterisk+18+ManagerAction_PJSIPShowEndpoints

ChanSIP:
https://wiki.asterisk.org/wiki/display/AST/Asterisk+18+ManagerAction_SIPpeers

Another good resource: @sorvani put this together, I believe this only works with PJSIP. https://github.com/sorvani/freepbx-helper-scripts/tree/master/Extension_Status


(system) closed #9

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.