FreeSWITCH
Add Vonyx as a gateway on the FreeSWITCH external profile.
Add Vonyx as a Sofia gateway on the external profile. You get outbound calls on your Vonyx numbers, and inbound calls into the public dialplan.
Before you start
- A Vonyx SIP trunk with a number attached
- FreeSWITCH with the default (vanilla) config, where the
externalprofile listens on port5080 - A public IP or hostname for FreeSWITCH, with UDP
5080and your RTP range open to43.204.9.41
Outbound calls
Create the gateway
register is false: Vonyx checks credentials on each call and doesn't need FreeSWITCH to register. caller-id-in-from puts the caller ID in the From header.
Use G.711
Vonyx supports PCMU and PCMA only. The external profile reads its codec lists from these variables. Change the existing lines:
These variables are shared with the internal profile. To change only the Vonyx side, set inbound-codec-prefs and outbound-codec-prefs to PCMU,PCMA in sip_profiles/external.xml instead.
Set NAT if FreeSWITCH is behind a router
The external profile uses ext-rtp-ip and ext-sip-ip, which default to $${external_rtp_ip} and $${external_sip_ip} (found by STUN). Behind NAT, set them to your public IP:
Replace the existing stun-set lines for these two variables. Forward UDP 5080 and your RTP range to FreeSWITCH, and turn off SIP ALG on the router.
Set the RTP port range
Vonyx sends RTP from UDP 10000–20000. Your own range must be open to 43.204.9.41. It is set in switch.conf.xml:
These are the defaults shown in the sample config. Change them to match your firewall.
Inbound calls
Route the number in the public dialplan
The external profile sends calls to the public context and doesn't ask callers to authenticate. Map your Vonyx number to an extension:
Because port 5080 accepts calls without auth, allow only 43.204.9.41 (and your other carriers) to reach it in your firewall.
Point Vonyx at FreeSWITCH
In the Vonyx console, open the trunk, turn on Inbound calls, and set Inbound address to your FreeSWITCH host with the external port, for example fs.example.com:5080. See Inbound calls.
Test the connection
Changes to vars.xml and the profile need the profile restarted. A new gateway file only needs a rescan.
origination_caller_id_number must be your Vonyx number. The callee hears their own voice echoed back. Then call your Vonyx number from a mobile and check it reaches extension 1000. Use sofia global siptrace on to see the SIP messages.
Limitations
- DTMF and call transfer are not available on Vonyx yet. Don't rely on IVR key presses or
deflect/ REFER on Vonyx calls. - New accounts make 1 call at a time (raise limits).
- No TLS or SRTP: use UDP or TCP on port
5060towards Vonyx.
Troubleshooting
| Problem | Fix |
|---|---|
401 or 407 that never succeeds | Check username and password in the gateway. |
429 after auth succeeds | The caller ID isn't one of your Vonyx numbers. |
INCOMPATIBLE_DESTINATION / 488 | Limit the codec lists to PCMU,PCMA. |
| Inbound calls hit the wrong extension or fail | Check the public dialplan matches the number as Vonyx sends it, and that the inbound address uses port 5080. |
| One-way or no audio | Set external_rtp_ip / external_sip_ip behind NAT, and open your RTP range to 43.204.9.41. |
More in SIP troubleshooting.