All integration guides
Connect PortaSwitch to TelecomsXchange
In short: In PortaBilling, add a vendor TelecomsXchange and a SIP connection, direction To vendor, remote IP 174.136.44.213 (sip01) port 5060 UDP, with tech prefix 80039# or the CLD translation s/^/80039#/. Authorise PortaSIP's public IP on the TelecomsXchange account, or attach a vendor authorization with the VoIP login. To sell, create a customer account whose ID is 174.136.44.213 for IP authentication.
PortaSwitch to a purchased route
- Your PortaSwitchVendor connection, identified by IP
- then, 80039#447700900123, TelecomsXchangesip01, UDP 5060
- Seller's routeThe route you purchased
On this page
PortaSwitch splits the work between PortaBilling, where vendors, connections, customers and accounts live, and PortaSIP, which handles the SIP. TelecomsXchange is a vendor when you buy routes and a customer when you sell them. For every TelecomsXchange value in one place, see Connect a SIP platform.
Warning
TelecomsXchange does not accept SIP REGISTER. There is no registration to configure. PortaSIP is recognised by its source IP or by digest authentication on the INVITE.
Before you start#
- A SIP account on TelecomsXchange with PortaSIP's public 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#. - Administrator access to PortaBilling. Menu names below follow the current admin interface (Infrastructure → Vendors); older releases use the same objects under Vendors and Connections.
- To sell: a route with IP Address:Port set to PortaSIP, for example
203.0.113.10:5060, and the values in Interconnect Info.
How do I send calls to TelecomsXchange?#
- Go to Infrastructure → Vendors and add a vendor, for example
TelecomsXchange. - Digest variant only: open the vendor's Authorization, click Add and enter a Name, the account's VoIP Login as Login and its VoIP Password as Password. You assign this authorization to the connection later.
- Create a connection (Create connection), one per purchased route:
| Field | Value |
|---|---|
| Description | TCXC 80039 UK |
| Service type | Voice calls |
| Type of connections | SIP |
| Direction | To vendor |
| Tariff | A tariff with the route's TelecomsXchange rates |
| Identify gateway by | IP |
| Remote IP | 174.136.44.213 (the address of sip01.telecomsxchange.com) |
| Port | 5060 |
| Protocol | UDP |
| Tech prefix | 80039# |
- Instead of the Tech prefix field, you can set the number translation in the connection's service configuration under Translate CLD, as a Perl substitution:
s/^/80039#/PortaBilling works in E.164, so 447700900123 leaves as 80039#447700900123.
- For the digest variant, attach the vendor authorization from step 2 to the connection.
- Include the connection in the routing plan your customers' products use.
Tip
Download each route's rates from TelecomsXchange (Accounts → Edit Account → Purchased Routes) and load them into the connection's tariff, so PortaBilling's least-cost routing compares TelecomsXchange with your other vendors.
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 and media. - Create a customer, for example
TelecomsXchange, with the product and routing plan you want to sell on. - Add an account under it with ID
174.136.44.213. With IP authentication, PortaSIP doesn't challenge the INVITE: it sends the remote IP to PortaBilling as the account ID and skips the password check. - Make sure your PortaSIP is configured for authorisation by IP address for this traffic. See PortaOne's IP-based authorisation documentation for your release.
- If your TelecomsXchange route adds an Outgoing Prefix (Edit Route → Outgoing Number Translation Parameters), remove it with the customer's dialing rules so PortaBilling sees E.164.
How do I receive calls on numbers I bought?#
Set the number's SIP Endpoint (Primary) in DID Settings on TelecomsXchange to PortaSIP, for example sip:14165551234@203.0.113.10:5060. In PortaBilling:
- Add a connection under the TelecomsXchange vendor with Direction From vendor, Remote IP
174.136.44.213, and a tariff for what TelecomsXchange charges you for the number's traffic. - Provision the number on the account, IP Centrex extension or service that should answer it, in E.164 format.
How do I test it?#
- Place a call from a test account to a number covered by the route.
- In PortaBilling, open the xDRs of the account and of the vendor connection to see the connection used, the translated number and the disconnect reason.
- Use PortaSIP's SIP log viewer, or
sngrepon the PortaSIP host, to see the INVITE to174.136.44.213and the reply. - 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 | No vendor authorization on the connection while your IP isn't authorised. Add one with the VoIP login and password from Edit Account. |
| 403 Forbidden | PortaSIP's public IP isn't authorised and no valid credentials were sent. Check the source IP against IP Address and Additional Allowed IPs; check the account isn't blocked or out of balance. |
| 404 Not Found | Missing or wrong tech prefix. Check the connection's Tech prefix or Translate CLD, and that the number is E.164 without + or 00. |
| 408 Request Timeout | No reply from TelecomsXchange. Check the connection's remote IP, port and protocol, and outbound UDP 5060. |
| 503 Service Unavailable | The route is blocked or failed on the seller's side. Check My Interconnections; your routing plan can fail over to the next vendor. |
| One-way or no audio | Check RTP proxying on the connection and the media IP in the SDP, and open the RTP range. |
| No inbound calls, or 403 on inbound | No account with ID 174.136.44.213, or PortaSIP challenges instead of authorising by IP. Check the account and the firewall. |
| Inbound calls rejected as not allowed | The customer's product or routing plan doesn't cover the destination. |
References#
Common questions
Can PortaSIP register to TelecomsXchange?
No. TelecomsXchange is peering only and does not accept REGISTER. PortaSIP sends calls through a To vendor connection, recognised by its source IP or by digest credentials from a vendor authorization.
Should I use the connection's Tech prefix field or a translation rule?
Either. The Tech prefix field adjusts the connection's translation rules so the prefix is added on the way out and removed when CDRs are processed. A Translate CLD rule such as s/^/80039#/ does the same explicitly.
How do I tell several TelecomsXchange routes apart?
Create one connection per purchased route. They share the remote IP and differ in tech prefix, which is exactly what PortaBilling's Tech prefix field is for.
How does PortaSIP recognise calls from TelecomsXchange?
By IP: PortaSIP passes the remote IP 174.136.44.213 to PortaBilling as the account ID, so the account's ID must be that IP and PortaSIP must be set to authorise by IP rather than challenge.
- Can PortaSIP register to TelecomsXchange?
- No. TelecomsXchange is peering only and does not accept REGISTER. PortaSIP sends calls through a To vendor connection, recognised by its source IP or by digest credentials from a vendor authorization.
- Should I use the connection's Tech prefix field or a translation rule?
- Either. The Tech prefix field adjusts the connection's translation rules so the prefix is added on the way out and removed when CDRs are processed. A Translate CLD rule such as s/^/80039#/ does the same explicitly.
- How do I tell several TelecomsXchange routes apart?
- Create one connection per purchased route. They share the remote IP and differ in tech prefix, which is exactly what PortaBilling's Tech prefix field is for.
- How does PortaSIP recognise calls from TelecomsXchange?
- By IP: PortaSIP passes the remote IP 174.136.44.213 to PortaBilling as the account ID, so the account's ID must be that IP and PortaSIP must be set to authorise by IP rather than challenge.
Finished this guide?
This guide matches platform build 83b4ebc9. Markdown version.