Buy a phone number from Wavix
Before placing or receiving a call, you need to have an active phone number on your Wavix account. If you already have one, you can skip this section.- Sign in to your Wavix account.
- Click on Buy under Numbers & trunks in the top menu.
- Select the country and region where you wish to purchase a number.
- Choose one or more numbers and click Buy now.
- Review the Cart and complete checkout.
Some numbers require proof of local address or other documents before activation. Upload any requested documents and wait for the Wavix Provisioning team to approve them before the numbers become active.
Create a SIP Trunk on the Wavix platform
- In the top menu, go to Numbers & Trunks → Trunks.
- Click Create new.
- Under Authentication Method, select Digest.
- Enter a SIP trunk name, set a SIP trunk password, and choose one of your numbers as the Caller ID.
- (Optional) Configure additional limits. If not specified, global account limits apply:
- Max outbound call duration
- Max number of simultaneous calls via the SIP trunk
- Max call cost
- Click Create.

Your 5-digit SIP trunk username is generated automatically and shown in the SIP trunk ID column.
Basic SIP trunk setup on FreeSWITCH
For this guide, we use the following Wavix gateways:- Domain name:
us.wavix.net; IP address:209.58.144.243as the primary gateway. - Domain name:
nl.wavix.net; IP address:95.211.82.14as a secondary gateway.
Choose the primary and backup gateways that offer the lowest ping from your premises. The full list of Wavix regional gateways can be found at the bottom of the page: https://app.wavix.com/trunks.
Set up outbound calls
To configure inbound and outbound calls on your FreeSWITCH server:- Navigate to
/usr/local/FreeSwitch/conf/sip_profiles/external - Create a new file
wavix.xml
- The authentication realm must match the domain name of the regional Wavix gateway you would routing your calls over
- Enter the SIP trunk ID and password you configured for the SIP trunk on the Wavix platform in the “username” and “password” variables respectively
- Navigate to
/usr/local/FreeSwitch/conf/dialplan/ - Create a new dialplan file
wavix_dialplan.xml
expression=- a regular expression matching dialed number. In this example, the rule will work if the dialed phone number contains 10 to 15 digits.
[+][country code][subscriber number including area code]. For example, a US number in E.164 format is +16561223344. Calls to numbers without a country code or with national access codes will be rejected by Wavix.
Below are typical examples of incorrectly formatted phone numbers:
| Country | Number | Reason | Number in E.164 format |
|---|---|---|---|
| US | 6561223344 | No country code | +16561223344 |
| UK | 020 1122 3344 | No country code, national access code with 0 | +442011223344 |
| Switzerland | 0041797000777 | Leading 00 international prefix | +41797000777 |
- Navigate to
/usr/local/FreeSwitch/conf/directory/default/ - Modify extension configuration file
1000.xml
The value of the
user_context variable must match the name of the gateway configuration you created in the external SIP profile directory (without the .xml extension).- Navigate to
/usr/local/FreeSwitch/conf/autoload_configs/default/ - Define RTP port range to 10000-20000 in
switch.conf.xml:
- To reload the configuration files, run:
Enable IP authentication
Wavix will accept all calls originating from a particular IP address, without requiring login info, when IP authentication is enabled. You must have a dedicated IP for this option to work correctly.
- Select Trunks under Numbers & trunks in the top menu
- Click the More icon for the desired SIP trunk and click Edit
- Select IP Authentication under the Authentication method
- Put public IP address of your endpoint
- Click Submit
- Click Save to apply changes
- When IP authentication is enabled on a SIP trunk, it cannot be used as a destination for a DID. You must use a SIP URI instead.
- After submitting the IP authentication request, you will not be able to update your IP address or change the authentication method. By default, an IP address can only be mapped to a single SIP trunk. If you need to have several Wavix SIP trunks sharing the same IP address, contact [email protected].
- Navigate to
/usr/local/FreeSwitch/conf/ - Update the
vars.xmlfile with the lines below:
- Uncomment the lines for
ext-rtp-ipandext-sip-ipin the global configuration fileexternal.xmland set them to reference the variables fromvars.xml:
- Navigate to
/usr/local/FreeSwitch/conf/sip_profiles/external/ - Create a new SIP profile
wavix_ip.xml
- Add the following line to the dialplan:
- Once you’ve created the file, assign the FreeSWITCH user as the owner:
Placing outbound calls with caller ID passthrough
Typically, you use one of the DID numbers you purchased as the caller ID for the SIP trunk.
- Select Trunks under Numbers & trunks in the top menu
- Click on the three dots on the right hand side and select the Edit option
- Select Passthrough under the Caller ID
- Click Activate
- Click Save to apply changes
Configure custom caller ID on FreeSWITCH
Once your request is approved, the caller ID passthrough option will be activated on your Wavix SIP trunk and you can send your own caller IDs from FreeSWITCH:- Navigate to
/usr/local/FreeSwitch/conf/sip_profiles/external/ - Update the outbound SIP gateway configuration file
wavix.xml:
- Assign the caller ID to the variable
effective_caller_id_numberin the extension configuration file:
Set up inbound calls
Registering your SIP trunk with one of the regional Wavix gateways is necessary (for digest authentication only) to receive inbound calls. Register and send SIP traffic to regional gateways for low latency access. Read our FAQ.| Amsterdam, NL | Dallas, USA | Singapore, SG | Australia, AU |
|---|---|---|---|
| nl.wavix.net | us.wavix.net | sg.wavix.net | au.wavix.net |
us.wavix.net):
- Navigate to
/usr/local/FreeSWITCH/conf/sip_profiles/external/ - Create or update SIP external profile
wavix.xml:
- Each regional gateway has a unique authentication
realmthat corresponds to its domain name. - Enter the SIP trunk ID and password you configured for the SIP trunk on the Wavix platform in the
usernameandpasswordparameters.
"fs_cli -x "sofia status gateway wavix" | grep State" command:
REGED in the “State” column. If the SIP gateway is not registered, incoming calls will not be routed to your FreeSWITCH.

- Select My numbers under Numbers & trunk in the top menu
- Click on the three dots on the right-hand side and select the Edit number option.
- Select the destination trunk in the Destination section
- Click Add to add the destination for the DID
- Click Save to apply changes
SIP trunk redundancy
Considering SIP trunk redundancy is important to ensure business continuity and protect against service interruptions. This guide provides configuration options to ensure redundancy for both incoming and outgoing calls.Redundancy options for inbound calls
In case of a regional gateway failure, Wavix may originate inbound calls from any other gateway. You can find the full list of gateways at https://app.wavix.com/trunks. There are two options to prevent disruptions of inbound calls: set up a SIP URI destination for the DID number or enable dual SIP trunk registrations from FreeSWITCH. In this guide, we’ll use a SIP URI.
- Select My numbers under Numbers & trunk in the top menu
- Click the three dots icon for the desired DID and click Edit number
- Select SIP URI under the Destination and enter URI in the format: DID@
<Public IP of your endpoint> - Click Add
- Click Save to apply changes
- Navigate to /usr/local/FreeSwitch/conf/dialplan/
- Specify your DID numbers in dialplan in
<extension name="in-wavix">extension
Redundancy options for outbound calls
- Navigate to
/usr/local/FreeSwitch/conf/sip_profiles/external/ - Create a new file
wavix_fo.xml
- Update the dialplan for outbound calls by adding the following lines:
Troubleshooting
Inbound call issues
- Make sure you have granted FreeSWITCH access to the XML files you have created.
- Make sure that the context name in the dialplan, internal extension, and SIP profile extension are matching.
Outbound calls issues
- A
603 Declinedresponse might be received when calling a destination with a per-minute rate higher than the max call rate set for your account. You can find your effective max call rate on theTrunkspage. Contact[email protected]to request a change to your max call rate. - Another possible reason for
603 Declinedresponses is lack of active registration. You can check the registration status of the SIP trunk as outlined above. - Wrong destination number format. Make sure you dial the full international number (E.164):
19085594899(US),4408001218915(UK). Dialing9085594899won’t work. Strip prefixes like0,00, or011in front of the dialed number.
FreeSWITCH diagnostics
- Verify SIP trunk registration with
sofia status gateway <gateway-name>in thefs_clicommand prompt. If registration is successful, you will seeREGEDin the “State” column. If the SIP gateway is not registered, incoming calls will not be routed to your FreeSWITCH. - To analyze SIP traffic, use the
sngreptool with appropriate filters