All integration guides
Connect VoipSwitch to TelecomsXchange
In short: In VoipSwitch (VSM), add a gateway for sip01.telecomsxchange.com port 5060 over UDP with Ping off, put the tech prefix (80039#) in its Dialed number prefix field, and point a routing plan entry at it. Authorise VoipSwitch's public IP on the TelecomsXchange account, or fill the gateway's User name and User password with the VoIP login. To sell, add a wholesale client with IP 174.136.44.213.
VoipSwitch to a purchased route
- Your VoipSwitchGateway, Ping off, no registration
- then, 80039#447700900123, TelecomsXchangesip01, UDP 5060
- Seller's routeThe route you purchased
On this page
VoipSwitch (VoipSwitch Manager, VSM) sends calls to carriers through gateways chosen by a routing plan, and accepts calls from carriers and resellers as wholesale clients. TelecomsXchange is a gateway when you buy routes and a wholesale client when you sell them. For every TelecomsXchange value in one place, see Connect a SIP platform.
Warning
TelecomsXchange does not accept SIP REGISTER. A VoipSwitch gateway doesn't register, so there is nothing to turn off, but don't configure TelecomsXchange as a registration or SIP account anywhere else. VoipSwitch is recognised by its source IP or by digest authentication on the INVITE.
Before you start#
- A SIP account on TelecomsXchange with VoipSwitch's public signalling IP, for example
203.0.113.10, or a VoIP login and password from Edit Account → Add SIP Digest Auth. - A purchased route and its tech prefix from My Interconnections, for example
80039#. In this guide,TECH_PREFIXstands for that value, andVOIP_LOGINandVOIP_PASSWORDfor the account's VoIP Login and VoIP Password. - Admin access to VSM.
- To sell: a route with IP Address:Port set to VoipSwitch, for example
203.0.113.10:5060, and the values in Interconnect Info.
How do I send calls to TelecomsXchange?#
- In VSM, go to Calls routing → Gateways and click Add. Add one gateway per purchased route.
- On the General tab, set:
- Name: for example
TCXC 80039 UK. It is only a label. - IP number:
sip01.telecomsxchange.com. VoipSwitch accepts a domain name here; it resolves to174.136.44.213. - Port:
5060. - Protocol: UDP.
- Ping: off. TelecomsXchange answers OPTIONS only within a call; with Ping off, the gateway status stays up.
- User name and User password: leave empty for IP authentication, or enter
VOIP_LOGINandVOIP_PASSWORDfor digest authentication.
- Name: for example
- Put the tech prefix in the gateway's Dialed number prefix field:
80039#. VoipSwitch adds it in front of the number, so447700900123leaves as80039#447700900123. - Enable the codecs the route supports (G.729 and G.711 are typical; the Purchased Route Confirmation email lists them). TelecomsXchange passes codecs through and doesn't transcode.
- Go to Calls routing → Routing plan and add an entry for the destinations the route covers, for example prefix
44, with the TelecomsXchange gateway as its route.
Numbers must reach the gateway in E.164 format, without + or 00. If your clients dial 00, strip it with the client's Dialing plan prefix rule 00->, and copy the same rule to the Tariff prefix if your tariffs are in E.164.
Prefix syntax. VoipSwitch's prefix fields take a small rule language: a plain value such as 80039# is added in front, 00-> removes a leading 00, and 00->80039# replaces 00 with the tech prefix in one step. If a dialing plan rule and a gateway rule both apply, the dialing plan rule wins.
Tip
To let TelecomsXchange pick the route, use a single gateway whose Dialed number prefix is a routing group prefix such as 444101#.
How do I bill the cost?#
On TelecomsXchange, open Accounts → Edit Account and download the route's rates from Purchased Routes in Default format. Import them into a VoipSwitch tariff (3.2 How to add/import tariff rates) and set it as the gateway's tariff, so VoipSwitch records your cost per call.
How do I receive calls from TelecomsXchange?#
When you sell a route, TelecomsXchange is your customer. Its calls come from 174.136.44.213 over UDP, from source ports 5060 to 5072, with the number in E.164 format such as 14165551234.
- Allow
174.136.44.213on your firewall for SIP (UDP) and your RTP range. - In VSM, add a client of the Wholesale type, for example
TelecomsXchange. - On its IP Numbers tab, add
174.136.44.213. Wholesale clients are authenticated by IP address, and calls from that IP are billed to this client. - Assign the tariff you sell at; every client account needs one, even if you only use it to accept calls.
- Make sure your routing plan sends the E.164 destinations onward to your own gateways.
- If your TelecomsXchange route adds an Outgoing Prefix (Edit Route → Outgoing Number Translation Parameters), strip it with the client's Dialing plan prefix, for example
77#->.
Warning
If you also buy from TelecomsXchange, don't let the wholesale client's calls route back to the TelecomsXchange gateway. Restrict that client's routing so a misrouted call can't loop.
How do I receive calls on numbers I bought?#
Set the number's SIP Endpoint (Primary) in DID Settings on TelecomsXchange to VoipSwitch, for example sip:14165551234@203.0.113.10:5060. VoipSwitch authenticates DID sources as wholesale clients, so the same client with IP 174.136.44.213 accepts the call; then assign the number in VoipSwitch's DID settings to the retail client, PBX or IVR that should answer it.
How do I test it?#
- Place a call from a test client to a number covered by the route.
- In VSM, check the active calls and the call history for the gateway used, the dialed number sent (
80039#447700900123) and the result. - On the VoipSwitch server,
sngrep port 5060or Wireshark shows the INVITE and the reply from sip01. - On TelecomsXchange, watch the call in Live Calls and find its SIP code in Logs → CDR (Voice).
What if something goes wrong?#
| You see | What to do |
|---|---|
| 401 or 407, then the call fails | VoipSwitch's IP isn't authorised and the gateway's User name and User password are empty or wrong. Enter VOIP_LOGIN and VOIP_PASSWORD from Edit Account. |
| 403 Forbidden | VoipSwitch's public IP isn't authorised and no valid credentials were sent, or the account is blocked or out of balance. |
| 404 Not Found | Missing or wrong tech prefix, or 00 left in the number. Check the gateway's Dialed number prefix and the client's dialing plan rules. |
| 408 Request Timeout | No reply from sip01. Check the gateway's IP number, Port and Protocol, and outbound UDP 5060. |
| 503 Service Unavailable | The route is blocked or failed on the seller's side. Check My Interconnections, and give the routing plan entry a second gateway. |
| Gateway shown as down | Ping is on. Turn it off for the TelecomsXchange gateway. |
| One-way or no audio | VoipSwitch advertises a private IP, or RTP is blocked. Check the media IP in the SDP and open the RTP range. |
| Inbound calls rejected | 174.136.44.213 isn't on the wholesale client's IP Numbers tab, the client has no tariff, or the firewall blocks it. |
References#
Common questions
Can VoipSwitch register to TelecomsXchange?
No. TelecomsXchange is peering only and does not accept REGISTER. A VoipSwitch gateway sends calls without registering; it is recognised by its source IP or answers the digest challenge with the gateway's User name and User password.
Where does the tech prefix go?
In the gateway's Dialed number prefix field, for example 80039#. VoipSwitch adds it in front of the number sent to that gateway. Use one gateway per purchased route.
Should I turn on Ping for the gateway?
No. TelecomsXchange answers SIP OPTIONS only within a call, so with Ping on the gateway can be marked down. With Ping off, VoipSwitch treats the gateway as up.
How does TelecomsXchange appear when I sell to it?
As one wholesale client authenticated by IP 174.136.44.213. Calls arrive in E.164 format such as 14165551234 and are billed with the client's tariff.
- Can VoipSwitch register to TelecomsXchange?
- No. TelecomsXchange is peering only and does not accept REGISTER. A VoipSwitch gateway sends calls without registering; it is recognised by its source IP or answers the digest challenge with the gateway's User name and User password.
- Where does the tech prefix go?
- In the gateway's Dialed number prefix field, for example 80039#. VoipSwitch adds it in front of the number sent to that gateway. Use one gateway per purchased route.
- Should I turn on Ping for the gateway?
- No. TelecomsXchange answers SIP OPTIONS only within a call, so with Ping on the gateway can be marked down. With Ping off, VoipSwitch treats the gateway as up.
- How does TelecomsXchange appear when I sell to it?
- As one wholesale client authenticated by IP 174.136.44.213. Calls arrive in E.164 format such as 14165551234 and are billed with the client's tariff.
Finished this guide?
This guide matches platform build 83b4ebc9. Markdown version.