I want to know the private IP of natted phones

This is not a SIP question, or a media transport problem, or a NAT traversal question, I’ve got all that working fine on an AWS deployment with on site handsets at multiple sites.

However, in dealing with provisioning issues and just wanting to help users out more quickly, it would be much easier if I could know what the private IP addresses of the user’s handsets were.

Right now, Endpoint Manager shows me the public IPs of the registrations (SIP INFO), so I can see what site the phone is at, but if I want to find the handset, I then have to go run an IP scan at the site, take up a computer there, etc, etc.

Once upon a time with a different PBX (SnomONE/Vodia) (And I’m not trying to compare apples to oranges, just a point of interest here), I had this ability (NATted setup, and in a certain interface on the PBX, I could see the private IP of the phones, so troubleshooting was much quicker).

Anyone have any ideas or suggestions? I don’t see the info I’m looking for in the asterisk sip peers info; curious if it might be anywhere else?

It’s available in the SIP Reg. contact field

for i in $(rasterisk -x 'sip show peers like ^[0-9]'|grep OK|awk '{print $1}'|cut -d '/' -f 1);do echo $i;rasterisk -x "sip show peer $i"|grep "Contact";done

@dicko Thank you. I am using PJSIP. Is the same available via any pjsip show … command?

Very much appreciate the info.

It’s a little more complicated with pjsip, because there is no guaranteed one to one relationship between an endpoint and an extension, but:-

pjsip show contacts

could be a start

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