Hi using Asterisk V12 with Yealink T2X, T3x and T4 Series Phones. The PBX is in the Data Centre with a single public IPs so all the peers are remote to the PBX
Peers (Phones) are behind a NAT Firewall
for some reason the same phone model, firmware and settings are producing different results.
Peer 1 is connected to PBX and is recorded using a port of 37892 (Location 1)
Peer 2 is connected to PBX and is recorded using a port of 54916 (Location 2)
Peer 3 is connected to PBX and is recorded using a port of 5062 (Location 3)
all phones i try to connect at location 3 keeps using port 5062 and prevents additional phones from being used. the second phone will fail to register until the peer 3 is unregistered then peer 4 can connect.
so i would like to know what commonalty causes this not to use the random ports as per Peer 1 and 2 above.
i need all phones to be issued with a random port as peer 1 and 2 so i can have several phones at a location.
what i do know is all the phones local ports are set to 5060 and the pbx register port is also set to 5060 for all phones.
It is not clear whether you are talking about RTP or SIP ports.
For RTP. The remote device always chooses its, remote to Asterisk, port number, and Asterisk always chooses the local one.
For SIP, the local port number is the same for all devices. If the devices have dynamic addresses and register, the remote device chooses the remote port number. (If the address is static, Asterisk will not recognize the remote device if it is not configured with the right port number, but setting that port number is still something that is done by the remote device, not Asterisk.
every IP Phone on the local network gets a dhcp address 192.168.1.X
the phones then register to Public IP address of PBX on port 5060, i’m seeing in the PBX logs that some locations are registering with the PBX not on the 5060 port but a random port.
the site i’m having issues on. all phones are showing peer port of 5062 and prevents over phones from getting individual ports.
all the phones local port are set to 5060 and all phones are on the same firmware.
right, if i change the local port of the each phone (so they are unique) all works fine.
but i do not understand why or how some phones at other locations do not need the port changing.