Before placing or receiving a call, you need to have an active DID on your Wavix account. The steps below are optional if you already have an active number on your Wavix account.
To purchase a DID on your Wavix account:
Log in to your account
Click on Buy under Numbers & trunks in the top menu
Select a country and region you wish to purchase a DID in
Choose a specific number or numbers and click Buy now button
You will be redirected to the Cart where you can confirm your choice and check out the DIDs
Some DIDs may require proof of local address and other documents before activation. You would need to upload the required documents and wait for the Wavix Provisioning team to approve them before the numbers become active.
To create a new SIP trunk on the Wavix platform:
Select Trunks under Numbers & trunks in the top menu
Click the Create new button
Select Digest under the Authentication method
Specify SIP trunk name, set SIP trunk password, and select one of the DIDs on your account as Caller ID
Optionally you can set max outbound call duration, max number of simultaneous calls via the SIP trunk, and max call cost. If these parameters are not set, global account limits apply.
Click Create
After the SIP trunk is successfully created, it will appear on the list of SIP trunks on your account.
Please be advised that your 5-digit SIP trunk username is generated automatically and displayed in the SIP trunk ID column
For the purpose of this guide, we will use the following Wavix gateways:
Choose the primary and backup gateways that offer the lowest ping from your premises. The full list of the Wavix regional gateways can be found in the bottom of the page https://app.wavix.com/trunks.
To configure inbound and outbound calls on your FreeSwitch server:
Navigate to /usr/local/FreeSwithc/conf/sip_profiles/external
Create a new file wavix.xml
Copy
Copy
After you created the file, assign FreeSwitch user as the owner of this file so the FreeSwitch application can access it:
Navigate to /usr/local/FreeSwithc/conf/dialplan/
Create a new dialplan wavix_dialplan.xml
Copy
Copy
After you created the file, give FreeSwitch access so it can read it.
“expression="^(\d{10,15})$“- a regular expression matching dialed number. In this example, the rule will work if the dialed phone number contains 10 to 15 digits.
All destination phone numbers must be in the E.164 international format. E.164 numbers can have up to fifteen digits and are usually formatted as follows: [+][country code][subscriber number including area code]. An example of an US number in E.164 format is +16561223344. Calls to numbers without country code or carrying national access codes will be rejected by the Wavix platform.
Below are typical examples of incorrectly formatted phone numbers
Country
US
Number
6561223344
Reason
No country code
Number in E.164 format
+16561223344
Country
UK
Number
020 1122 3344
Reason
No country code, national access code with leading 0
Number in E.164 format
+442011223344
Country
Switzerland
Number
0041797000777
Reason
Leading 00 international prefix
Number in E.164 format
+41797000777
Table 1 International E.164 phone number presentation
Navigate to /usr/local/FreeSwitch/conf/directory/default/
Modify extension configuration file 1000.xml
Copy
Copy
The value of the user_context variable <variable name="user_context" value="wavix"/> must match the name of the gateway configuration you created in the external SIP profile directory. The name should be without the file extension .xml.
Navigate to /usr/local/FreeSwitch/conf/autoload_configs/default/
Define RTP port range to 10000-20000 in the switch.conf.xml
Copy
Copy
In order for FreeSwitch to reread the configuration files, the command fs_cli -x reloadxml should be executed.
Wavix will accept all calls originating from a particular IP address, without requiring any login info, when IP authentication is enabled. Note that you must have a dedicated IP for this option to work correctly.
Follow the steps to enable IP Authentication on the Wavix platform:
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
Wavix support team will review your request and enable IP Authentication on the SIP trunk.
Once your request is approved by the Wavix support team, IP authentication will be activated on your Wavix SIP trunk, and you can configure it on the FreeSwitch:
Navigate to /usr/local/FreeSwitch/conf/
Update vars.xml file with the lines below
Copy
Copy
Uncomment the lines for “ext-rtp-ip” and “ext-sip-ip” in the global configuration file external.xml and set them to reference the variables from vars.xml:
Copy
Copy
Navigate to /usr/local/FreeSwithc/conf/sip_profiles/external/
Create a new SIP profile wavix_ip.xml
Copy
Copy
Add the following line to the dialplan:
Copy
Copy
Once you've created the file, assign FreeSwitch user as the owner of this file so the FreeSwitch application can access it:
Configuration is completed and outbound calls should work now.
Typically, you would use one of the DID numbers you purchased as the Caller ID for SIP trunk.
Alternatively, you can enable Caller ID Passthrough option on the Wavix platform. It allows you to send your own A-numbers directly from FreeSwitch:
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
Wavix support team will review your request and enable Caller ID Passthrough on the SIP trunk.
Once your request is approved by the Wavix support team, the Caller ID Passthrough option will be activated on your Wavix SIP trunk and you can send your own Caller IDs from the FreeSwitch:
Navigate to /usr/local/FreeSwithc/conf/sip_profiles/external/
Update outbound SIP gateway configuration file wavix.xml
Copy
Copy
Assign Caller ID to the variable "effective_caller_id_number" in the extension configuration file:
Copy
Copy
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.
Fig. 6 Wavix regional gateways
Select a regional gateway with the lowest latency to your device (in this example, it is us.wavix.net):
Navigate to /usr/local/FreeSwithc/conf/sip_profiles/external/
Create or update SIP external profile wavix.xml
Copy
Copy
You can check the status of your SIP trunk registration using the "fs_cli -x "sofia status gateway wavix" | grep State" command:
Fig. 7 FreeSwitch SIP trunk registration status
If registration is successful, you will see ‘REGED’ in the “State” column. Please note that if the SIP gateway is not registered, incoming calls will not be routed to your FreeSwitch.
Here is step by step configuring destination for inbound calls on the Wavix platform:
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
Configuration is completed and inbound calls should work now.
Considering SIP Trunk redundancy scenarios is important to ensure the continuity of business operations and protect against potential service interruptions. This guide provides configuration options to ensure redundancy for both incoming and outgoing calls.
In case of a regional gateway failure, Wavix may originate inbound call from any other gateway. You can find the full list of gateways in the bottom of the page https://app.wavix.com/trunks. There are two options available to prevent disruptions of inbound calls. You can set up SIP URI destination for DID number or enable dual SIP trunk registrations from the FreeSwitch. In this guide, we’ll use a SIP URI.
To configure SIP URI destination on the Wavix platform:
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
Copy
Copy
Navigate to /usr/local/FreeSwithc/conf/sip_profiles/external/
Create a new file wavix_fo.xml
Copy
Copy
Update the dialplan for outbound calls by adding the following lines:
Copy
Copy
See a dialplan example below
Copy
Copy