Endpoint manager - see Ip private address


(Mr Nemo 00) #1

Hello

in Asterisk Info
(… admin/config.php?display=asteriskinfo&module=Peers)
i can see

205 extension
Contact: 205/sip:205@Public-Ip-address:57323;x-ast-orig- 845098454c Avail

or
471 extension
Contact: 471/sip:471@Public-Ip-address:57973 ee49895e63 Avail

In Endpoint manager — > Extension Mapping

205 extension
contact : sip:205@Public-Ip-Addess:21973;x-ast-orig-host=172.16.10.19:21973

For 205 i can see also Private Address (172.16.10.19) !

471 extension
contact : sip:471@Public-Ip-Addess:57973

i can see ONLY Public ip address.

Why ?


(Joshua C. Colp) #2

When Asterisk receives a REGISTER and the endpoint is behind NAT it will place the public IP address and port in the REGISTER, while keeping the original value in “x-ast-orig-host”.

If the REGISTER already contains the public IP address and port in the REGISTER, then Asterisk can’t place an original value in “x-ast-orig-host” because it doesn’t have one. This can happen if the endpoint discovers its public IP address and port before sending the REGISTER, and uses it instead of the LAN IP address and port.

What endpoint is 471? What device or phone?


(Mr Nemo 00) #3

Tnx

all extensions are pjsip phone (Grandstream GXP 1610) but the networks of origin are different as are the firewalls


(Joshua C. Colp) #4

Some routers with SIP support can also result in the REGISTER being changed to have the public IP address and port, removing the LAN IP address and port as well so it would not show up.


(Mr Nemo 00) #5

tnx
I assumed that was the reason, but better confirmation


(Jared Busch) #6

rasterisk -x ‘pjsip show aor 471’

You might get info from that. Depending.

My GitHub has something I have been tinkering with intermittently. It tries to show all know IP addresses.

https://github.com/sorvani/freepbx-helper-scripts/tree/extensions_status/Extension_Status


(Mr Nemo 00) #7

Tnx
but i need to rem

// if (!defined(‘FREEPBX_IS_AUTH’)) { die(‘No direct script access allowed’); }


(Jared Busch) #8

Sorry about that I was working on adding security to it and that’s not finished yet


(Mr Nemo 00) #9

Strange…

Old Grandstream GXP 2000 i can see Private and Pubblic Ip
New Grandstream GXP 1610 i can see only Public adress

Same network and firewall (pabx is on cloud)


(Jared Busch) #10

Remove the commenting for the debug at the end of the file and it will dump the raw data out below the grid so you can actually see what it’s parsing to get that information


(Mr Nemo 00) #11

ok tnx
i don’t no why…

same network \ firewall (Fortigate)

GXP 2000 ----> OK Public and private address
Grandstream|GXP2000|1.2.5.3
URI: PUBLIC IP
Via: PUBLIC IP
CallID: 172.30.140.105

GXP 1610 ----> ONLY PUBLIC IP
Gramdstream|GXP1610|1.0.7.6|
URI: PUBLIC IP
Via: PUBLIC IP
CallID: Not an IP

Other network \ firewall (Linux based)

GXP 2000 ----> OK Public and private address
( the same as above… but same different values in VIA, here there is Private IP)
URI: PUBLIC IP
Via: 172.16.10.224
CallID: 172.16.10.224

GXP 1610 ----> OK Public and private address
URI: PUBLIC IP
Via: 172.16.10.112
CallID: Not an IP


(Mr Nemo 00) #12

suggest freepbx style :slight_smile:

table { font-family: Arial, Helvetica, sans-serif; font-size: 14px; width: 100%; } tr:hover { background-color: #F1F9F5; } th { height: 50px; text-align: left; background-color: #E5EEEA; color: black; } th, td { padding: 15px; border-bottom: 1px solid #ddd; text-align: left; }

(Jared Busch) #13

When I get paid to spend my time on this, maybe I’ll care about it more.

At the moment it was a random idea I had, and spent some hours over the last year to build it.


(system) closed #14

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