Hi ittogo,
This depends on your implementation and specific requirements however here are the pros and cons of each:
1) SBC
Pros
- Does not need port forwarding in the remote firewall in front of the phones like in STUN
-Tunnels remote phones to the PBX both SIP and Voice over one single port thus making VoIP more reliable and more secure.
-In a site with a number of remote phones behind the same SBC, if one calls the other then the RTP audio will be routed peer to peer (PBX does not have the option PBX delivers audio or record all calls,) so the RTP packets do not pass through SBC tunnel towards the PBX so audio traffic remains local
-The phones can be provisioned by pnp.
- Is not affected by SIP ALG on firewall
Cons
-You need extra device to install the 3CX-SBC (Windows, Linux-Debian8 or Raspberry).
- Number of Phones / BLF per phone behind the SBC depends on the device used as SBC and computing power available to the device
You can find more details on:
https://www.3cx.com/docs/3cx-tunnel-session-border-controller/
https://www.3cx.com/3cxacademy/videos/intermediate/configuring-remote-extensions/
2)STUN
Pros
- Provisioning via RPS
- No extra hardware needed
Cons
-You need on to port forward on the firewall at the remote locationSIP and RTP ports for each phone.
-Audio issue if the option PBX delivers audio is not enabled when phones behind the same public ip try to speak to each other, PBX delivers audio must be enabled.
-Disable SIP ALG on your firewall/modem (at the remote site).
More details about STUN:
https://www.3cx.com/3cxacademy/videos/intermediate/configuring-remote-extensions/