How to see a list of logged extension IP?


How to see from which IP each extension are logging from? I’d look in the forums and I wasn’t able to find anything.



It depends on the channel technology you use.
If those extensions are sip extensions, you may try on your console
asterisk -rx ‘sip show peers’

With chan_pjsip, the current preferred channel driver for VoIP, with SIP being the current preferred VoIP protocol, there can be multiple registrations for the same FreePBX “extension”. You can get them all using “pjsip show endpoints”. However you should note that:

  1. registrations are done by SIP URIs, and I’m not sure whether domain names are resolved in this output (they probably shouldn’t be);

  2. the immediate source address of the register request need not match an address to which the contact URI resolves;

  3. although unlikely for phones, the URI domain may resolve to more than one IP address


It return me No such command '‘sip' (type 'core show help ‘sip' for other possible commands) for the first one and the second one I’ve got also the same thing.



From ast cli

sip show peers
pjsip show contacts

In the GUI reports → Asterisk Info

You shouldn’t have got the same. Even if here is an error in the command, you it should have said ‘pjsip’, not ‘sip’.

Did you do what the message said and then try the more likely of the suggested ones.

(pjsip show contacts wasn’t in the list I consulted, but, if it exists, and you are using chan_pjsip, sounds good.)

It return me this:

[[email protected] ~]# sip show peers
-bash: sip: command not found
[[email protected] ~]# pjsip show contacts
-bash: pjsip: command not found

Access the Asterisk CLI with

asterisk -rvvv

I add a asterisk -rx in front of the segond one. This probably why.

Good it work with asterisk -rvvv and once connected pjsip show contacts

Thanks to all for help!


1 Like

I wrote and down and dirty method of showing PJSIP contacts in the browser. The use case I built it for was deploying IP phones, where I could see registered contacts, their User Agent, local IP, etc. and show this to a non-technical remote hands if needed so they can make sure all of the expected endpoints are registered, see potential VLAN issues, etc.

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