Vivo - SIP Trunk
On this topic
Vivo’s mission is to expand the possibilities of connections between people. Vivo, one of the largest telecommunications company in Brazil, provides services throughout the national territory and has a complete and convergent portfolio of products (fixed and mobile voice, fixed and mobile broadband, TV, data and IT). With the innovation and high quality of their services, they are able to consolidate themselves as a full communications provider, enabling customers to take charge of their digital life, with security and reliability.
Reference Web Address: Vivo
Before configuring the SIP trunk it is required to go through the following checklist and make changes where necessary:
- NAT (when used) created to 3CX
- Firewall Checker passed
- Firewall SIP ALG checked and if present disabled
Further setup information can be found in our Academy: 3CX Academy Basic Course
Some providers gained support and compatibility with 3CX on a specific product version. It is advisable to always run the latest version of 3CX to ensure ongoing compatibility.
Minimum 3CX Version: 3CX Phone System 15.5 SP6
Before being able to configure your Vivo SIP Trunk with 3CX, you must contact a Vivo representative. They will provide you with all the necessary information required to configure the Trunk and all the networking setup to route the incoming/outgoing traffic from/to Vivo. How to use this information will be explained in this guide.
Important: The 3CX Support team will not assist on networking/firewall configurations.
Below is a short overview of the provider's capabilities and services and whether they’re supported or not:
- CNS (Clip No Screening): No
- Catch All Routing: Yes
- Fax in T38: No
- CLIR (Number Suppression): No
- DTMF via RFC 2833: Yes
- Codec Order: G711 A-law, G729
Before starting to configure your Vivo SIP Trunk in 3CX, you must first make sure that your network is setup correctly.
A Vivo representative will provide you a private network link to connect your 3CX Phone System with them.
You will have for example the following information:
- Vivo Servers Network to send SIP traffic and Media, e.g: 10.128.0.0/9
Vivo SIP Server e.g: 10.255.240.111
Vivo Media Server e.g: 10.255.241.124
- Private Network Provided by Vivo e.g: 10.12.93.184/29
Vivo Gateway e.g: 10.12.93.185
IP for the 3CX PBX e.g: 10.12.93.186
In order to use a Vivo SIP Trunk, you will be provided with a private network link through which you will be exchanging VoIP traffic with the Vivo network. The network topology should look similar to one of the following scenarios:
Scenario #1 describes a simple network using a Router Multi WAN where you will manage both Internet and Vivo connections. In this scenario you will configure the WAN Port 1 for Internet and the WAN Port 2 to connect the link provided by Vivo and configure it using the given network information. Firewalls Rules are necessary in order to route all the traffic pointing to the Vivo’s Servers through the WAN Port 2 and the incoming traffic from Vivo to the 3CX Server. After adding these Firewall Rules, it is recommended that you check that the Vivo’s SIP and Media Servers are reachable and that are accessed through the correct WAN Port 2. To do this you can use the “tracert” command.
The Scenario #2 describes a simple network where the 3CX Server will be using two (2) Network Interface Cards. The 3CX Server will be accessing the internet via the Internet GW, while all Vivo SIP Trunk related traffic will be traversing the second NIC.
3CX Server NIC setup
Following the scenario #2, the NIC 1 is connected to the gateway or interface that connects to the Internet. Important: This NIC interface MUST have a Default Gateway specified.
NIC 2 is connected to the link provided by Vivo. This network interface must NOT have a default gateway configured, just configure it using the IP address for the PBX and network mask provided by Vivo.
Adding Static Route
Next you must add a persistent static route so that the traffic from the 3CX server towards the Vivo’s Servers is routed out through the correct NIC 2. To do this on a Windows OS, you would open a command prompt using the “Run as Administrator” option, then run the following command:
- Static Route for the Vivo’s Servers:
route -p add [VIVO SUBNET IP] mask [VIVO SUBNET MASK] METRIC 1 [VIVO GATEWAY IP]
route -p add 10.128.0.0 mask 255.128.0.0 METRIC 1 10.12.93.185
After adding this static route, it is recommended that you check that the Vivo SIP and Media Servers are reachable from the 3CX Server and that it is accessed through the correct NIC 2. To do this you can use the “tracert” command from the command prompt.
- The range of IP Addresses used by Vivo depends on your location. If you are not sure which IP range to use, please contact Vivo so they can tell you which range to use.
- The IPs in this section were used as examples and may vary from the ones you must use. If you are unsure which information you must use, contact your Vivo representative.
- The 3CX Support team will not assist on networking/firewall configurations.
Configuring the Trunk with 3CX
Adding the Trunk
The general instructions outlining how to add a new SIP Trunk to your 3CX installation can be found here.
Go to “SIP Trunks” and select “Add SIP Trunk”
- Select Country: BR
- Select Provider in your Country: Vivo
- Main trunk number: The DIDs numbers associated with your account will have been given to you by Vivo. Enter one of them in the National Number Format (e.g. 11xxxxxxxx).
- Press OK
This will then take you to the SIP Trunk settings. Under the “General” tab in the “Trunk Details” section enter the Vivo SIP Server IP address provided to you.
Go to the “Options” tab, scroll down to the “Advanced” section and for the parameter “Select which IP to use in 'Contact' (SIP) and 'Connection'(SDP) fields” select “Use this IP Address” and enter the IP address provided by Vivo for the PBX.
After doing this, scroll to the top of the page and press OK to create the SIP Trunk in 3CX. At this point your Vivo Trunk is created.
Adding Additional DIDs
To associate all other DIDs/Numbers you have in your Vivo account with 3CX, go to the “Management Console → SIP Trunks”, double-click on your Vivo Trunk and go to the “DIDs” tab.
Here you should already see 1 entry that is the Main Trunk number you have entered in the previous section. To add all other DIDs/Numbers, you must list them in the International Number Format (e.g. +55xxxxxxxxxx). Once you have added all your numbers to the list, press OK at the top of the page. You can also add the DIDs as * + the last 6 digits of the DID, e.g: sample DID +551121080910 then add it as *080910.
Creating Inbound Rules
Now that you have associated all your DIDs/Numbers with your SIP Trunk in 3CX, you can create Inbound Rules to set where calls will be routed when those numbers are called. Instructions on how to create Inbound Rules can be found here.
If you have a Trunk Billing Contract with Vivo only the Main Trunk Number will be presented on outbound calls as Caller ID.
Outbound Caller ID
Vivo SIP Trunks do not support Clip No Screening which means you cannot present any number you want when calling outbound. Only the Main Trunk Number can be sent, not numbers from a 3rd party or other DIDs associated to your account.
In order to be able to present the Main Trunk Number, in all fields in 3CX where you can set the Outbound Caller ID, it must be input in the National Number Format (e.g. 11xxxxxxxx).
When configuring your Outbound Rules make sure that all numbers are dialed either in the Local, National or International number formats. Please enter in contact with a Vivo representative to know more information about Vivo’s dial plan.
More information about how to create Outbound Rules and how they work can be found here.
Local Calls: 8 digits length for fixed numbers, usually calls start with prefix 2,3,4,5 or 6. For Local Mobile numbers, there are regions that have 9 digits length and usually calls start with prefix 7 or 9, however there are other regions with 8 digits length starting with prefix 6,7,8,9.
Calls within the same city user dials 8 or 9 digits for example a fixed number 21473205 or a mobile number 976649697
National Calls: User needs to dial 0 + Operator's Code (for Vivo is 15) + Number of Destination. National calls could use 13 or 14 digits length.
Example, Calling from Curitiba to São Paulo user dials 0151121473205 or a National Mobile Phone 01511976649697.
International Calls: User needs to dial 00 + Operator's Code (for Vivo is 15) + Country Code + Number of Destination.
Example a call from Brazil to Argentina would be like 00155491166850415.
When using a Vivo Trunk, it is not possible to implement Call Source Identification which mean that on a single 3CX installation only 1 Vivo trunk can exist. Also no other provider can exist on the same installation.