Match ports in the phone config and PBX?

Status
Not open for further replies.

Techops

Customer
Joined
Feb 5, 2018
Messages
45
Reaction score
0
Heys,

Read the manual section and watched the training vids but couldn't find this info.

Extensions > Phone Provisioning > Local SIP Port of phone = some number

Settings > Network > Ports > SIP Port used by PBX = a different number

Wouldn't these port numbers need to match?
 
Each end has a "listening port". the default at the PBX end is 5060. When the set/device that contacts the PBX is provisioned, you tell it to use that port.

In the device, you also have a listening port, it can be 5060, or 5061, or 5070, etc. as long as it doesn't conflict with something else on the network IF you don't use an SBC or VPN. If the device is simply behind a router with other SIP devices, then the ports must be unique as they are seen by the PBX as (publicIP+port). When the device registers with the PBX it will let 3CX know what port it is listening on.
 
  • Like
Reactions: YiannisH_3CX
Each end has a "listening port". the default at the PBX end is 5060. When the set/device that contacts the PBX is provisioned, you tell it to use that port.

In the device, you also have a listening port, it can be 5060, or 5061, or 5070, etc. as long as it doesn't conflict with something else on the network IF you don't use an SBC or VPN. If the device is simply behind a router with other SIP devices, then the ports must be unique as they are seen by the PBX as (publicIP+port). When the device registers with the PBX it will let 3CX know what port it is listening on.

Interesting. So, would the PBX then be using Port Forwarding internally?

The PBX receives all SIP on traffic on 5060 then forwards the packets to each different phone/port as needed?

Fyi, thinking about STUN extensions in this use case.
 
If only one stun phone at the location , then you leave settings

If more than one, than each phone requires different local sip port , local rdp audio ports start and end - configured under Phone Provisioning (no two phones can have the same settings), on the remote firewall you need to setup port forwarding for the correct ports to the relevant internal IP address of the phone

Another option to overcome multiply phones at the same location is SBC - https://www.3cx.com/blog/releases/session-border-controller-sbc-update

What phones are you think about installing ?
 
If only one stun phone at the location , then you leave settings

If more than one, than each phone requires different local sip port , local rdp audio ports start and end - configured under Phone Provisioning (no two phones can have the same settings), on the remote firewall you need to setup port forwarding for the correct ports to the relevant internal IP address of the phone

Another option to overcome multiply phones at the same location is SBC - https://www.3cx.com/blog/releases/session-border-controller-sbc-update

What phones are you think about installing ?

Thanks for the info, I actually just saw this same thing last week. Multiple phones need to have unique SIP and RTP ports.

An SBC does indeed looks like a good solution.

We're installing some multiple Yealink sets.
 
It is phones using STUN that benefit from this configuration. When multiples phones are in the same location then you need to have different sip ports for each phones so that the PBX can signal each phone individually. The port forwarding is done in the firewall that is in front of the phones so the firewall can forward messages to the correct phone depending on the port the message arrived from.

The PBX has only one sip port and all phones can communicate with the PBX to that port. When a phone registers it sends the server a registration message and tells the server my public is 1.1.1.1 and my port is 5065. Then the server will reply with a 200 OK message saying to the phone OK i see you and you can reach me at IP 2.2.2.2 and port 5060. Now the PBX knows that phone A is located at that IP 1.1.1.1 address and uses port 5065.
If a second phone is located at the same location the public IP will the same but the port has to be different. So the second phone will have to tell the PBX that it's IP is 1.1.1.1 but the port is 5066. The response of the server however will be the same as both phones can find the server to IP 2.2.2.2.

Hope this makes sense
 
The PBX receives all SIP on traffic on 5060 then forwards the packets to each different phone/port as needed?

Yes, but routing (or "forwarding"), in this case, will be based on information in the SIP message and rules you create in the PBX.
 
It is phones using STUN that benefit from this configuration. When multiples phones are in the same location then you need to have different sip ports for each phones so that the PBX can signal each phone individually. The port forwarding is done in the firewall that is in front of the phones so the firewall can forward messages to the correct phone depending on the port the message arrived from.

The PBX has only one sip port and all phones can communicate with the PBX to that port. When a phone registers it sends the server a registration message and tells the server my public is 1.1.1.1 and my port is 5065. Then the server will reply with a 200 OK message saying to the phone OK i see you and you can reach me at IP 2.2.2.2 and port 5060. Now the PBX knows that phone A is located at that IP 1.1.1.1 address and uses port 5065.
If a second phone is located at the same location the public IP will the same but the port has to be different. So the second phone will have to tell the PBX that it's IP is 1.1.1.1 but the port is 5066. The response of the server however will be the same as both phones can find the server to IP 2.2.2.2.

Hope this makes sense

Yup, that does make sense.

So given what you said and what Saqqara said, we'll need to make sure the phones are set with a static IP less the port forwarding on the firewall breaks due to the phone changing it's IP.
 
Yes, but routing (or "forwarding"), in this case, will be based on information in the SIP message and rules you create in the PBX.

Rules you create in the PBX: are you meaning Inbound Rules?
 
Yes, you need to setup fixed IP's for the phones (normally can be done via your dhcp server, where you reserve the IP for the IP mac address), else port forwarding may fail due to the phone ip address changing

Sometimes called Port forwarding or inbound rules
 
  • Like
Reactions: YiannisH_3CX
How many Yealink phones are your setting up ?
 
Rules you create in the PBX: are you meaning Inbound Rules?

Since you were talking about calls coming into 3CX on port 5060, it is assumed that the port was already forwarded to the PBX by the router.

This could be an incoming trunk call from a provider (in which case, inbound rules), or a call being placed by an extension. All (messaging) comes in on port 5060 (or another fixed port, if you have changed it). These are SIP messages, and what is in that message determines what the PBX does with the call. I hope I'm understanding correctly, your original question.
 
Status
Not open for further replies.

Latest Posts

Forum statistics

Threads
111,884
Messages
589,542
Members
164,742
Latest member
Zain101