All integration guides
Connect VICIdial to TelecomsXchange
In short: In Admin → Carriers, add a carrier with a blank Registration String, an account entry for sip01.telecomsxchange.com on UDP 5060, and a dialplan entry that strips the campaign Dial Prefix and dials TECH_PREFIX + E.164 number. Authorise the dialer's public IP on the TelecomsXchange account (10 calls per second per IP), and route numbers you bought with Admin → Inbound DIDs.
VICIdial campaign to a purchased route
- VICIdial campaignDial Prefix 9, auto-dial
- then, 9447700900123, Carrier entryDialplan entry adds the tech prefix
- then, 80039#447700900123, TelecomsXchangesip01, UDP 5060, 10 CPS per IP
- Seller's routeThe route you purchased
On this page
This guide connects VICIdial, the open-source contact-centre suite that runs on Asterisk, to TelecomsXchange: outbound campaign and manual calls to a purchased route, and inbound calls on numbers you bought. For the full list of TelecomsXchange values, see Connect a SIP platform. VICIdial writes the carrier into Asterisk for you; the underlying Asterisk settings are the same as in Connect Asterisk.
Warning
TelecomsXchange does not accept SIP REGISTER. Leave the carrier's Registration String empty. VICIdial is recognised by its server's source IP or by digest authentication on the INVITE.
Before you start#
- A SIP account with the public IP of each VICIdial server that places calls, for example
203.0.113.10(extra servers go under Additional Allowed IPs), 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#. - VICIdial admin access with permission to modify carriers, and leads loaded with a country phone code so VICIdial dials full international numbers.
- The examples use the
SIP/channel driver that ViciBox installs. If your build uses PJSIP for carriers, use the endpoint, aor and identify sections from the Asterisk guide in the account entry instead.
How do I send calls to TelecomsXchange?#
- Go to Admin → Carriers → Add A New Carrier. Set Carrier ID to
TCXC, Carrier Name toTelecomsXchange, Protocol toSIP, Server IP to your dialer (or0.0.0.0for all servers), and Active toY. Leave Registration String blank. - In Account Entry, define the peer. There is no
registerline:
[tcxc]
type=peer
host=sip01.telecomsxchange.com
port=5060
transport=udp
disallow=all
allow=g729
allow=ulaw
allow=alaw ; TCXC passes codecs through: offer what the route supports
dtmfmode=rfc2833
context=trunkinbound ; VICIdial's inbound DID context
insecure=port,invite ; TCXC sends from source ports 5060-5072
nat=force_rport,comedia
canreinvite=no
qualify=no ; TCXC answers OPTIONS only within a call
;defaultuser=VOIP_LOGIN ; digest variant (below)
;secret=VOIP_PASSWORD- In Globals String, name the trunk:
TCXC=SIP/tcxc- In Dialplan Entry, match the campaign's Dial Prefix (
9here), strip it, and dial the tech prefix in front of the number. VICIdial dials the Dial Prefix, then the lead's phone code, then the phone number, so9+44+7700900123arrives as9447700900123. Replace80039#with your route'sTECH_PREFIX:
exten => _9X.,1,AGI(agi://127.0.0.1:4577/call_log)
exten => _9X.,n,Dial(${TCXC}/80039#${EXTEN:1},60,tTo)
exten => _9X.,n,Hangup()If your campaigns dial 011 before non-North-American numbers, add a pattern that strips it too: exten => _9011X.,n,Dial(${TCXC}/80039#${EXTEN:4},60,tTo) with the same AGI and Hangup lines.
- Open the campaign (Campaigns → Campaign ID → Detail) and set Dial Prefix to
9. Use a different prefix digit, and a second carrier dialplan entry, for each route or routing group such as444101#you want campaigns to choose between.
Digest variant. If a dialer sends from an IP that isn't on the account, uncomment defaultuser and secret in the account entry and fill in the account's VoIP Login and VoIP Password. Asterisk answers TelecomsXchange's 401 or 407 challenge with them.
How fast can the dialer send?#
TelecomsXchange accepts 10 calls per second per authorised IP; Edit Account shows it as IP CPS Limit (read-only). Predictive campaigns burst well above that when many agents go ready at once, and the excess is rejected.
- Pace each server: cap simultaneous calls with Max VICIDIAL Trunks in Admin → Servers and Max Trunks in the campaign, and raise the Auto Dial Level gradually. Trunk caps limit concurrent calls rather than the rate, so check the attempt rate in Live Calls while a campaign ramps up.
- Agents × Auto Dial Level is roughly the number of lines VICIdial tries to keep ringing; when many agents go ready together, it places those calls in a burst.
- To go beyond 10 calls per second, spread campaigns over several dialer servers, each with its own public IP added under Additional Allowed IPs, or ask support@telecomsxchange.com to raise the limit. See Create your first account.
How do I receive calls from TelecomsXchange?#
Calls on numbers you bought (and on any route you sell) 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 the dialer's firewall for UDP 5060, and open the RTP range (by default 10000 to 20000). - The account entry above matches that IP (
host=sip01.telecomsxchange.comresolves to it) and puts calls intrunkinbound, where VICIdial looks up the dialled number in its DID list.
How do I receive calls on numbers I bought?#
- On TelecomsXchange, set the number's SIP Endpoint (Primary) in DID Settings to the dialer, for example
sip:14165551234@203.0.113.10:5060. - In VICIdial, go to Admin → Inbound → Add A New DID. Set DID Extension to the number exactly as it arrives,
14165551234, and choose the DID Route:IN_GROUPto queue it to agents, orEXTEN,VOICEMAIL,PHONEorAGENT. - If you use in-groups, assign the in-group to the campaign under Allowed Inbound Groups so agents receive the calls.
How do I test it?#
- Log in an agent and place a Manual Dial call to a number covered by the route.
- On the dialer, run
asterisk -rvvvandsip set debug peer tcxc(orsngrep port 5060on the shell). Look for the INVITE to80039#447700900123(or80039%23447700900123) and the reply. - In the portal, watch the call in Live Calls and find its SIP code in Logs → CDR (Voice).
- In VICIdial, the carrier log (Reports, when enabled under System Settings) shows the SIP hangup cause for each attempt.
What if something goes wrong?#
| You see | What to do |
|---|---|
| 401 or 407 repeated, then the call fails | The dialer isn't sending credentials. Fill in defaultuser and secret in the account entry and check them against Edit Account. |
| 403 Forbidden | The server's public IP isn't authorised. Compare the source IP in sip set debug with the account's IP Address and Additional Allowed IPs; check the account isn't blocked or out of balance. |
| 404 Not Found | Missing or wrong tech prefix, or the Dial Prefix or 011 was left in the number. Check the Request-URI in the trace against the dialplan entry. |
| Many calls fail at once during a campaign | The dialer is above 10 calls per second for that IP. Lower the Auto Dial Level or Max Trunks, or add servers with their own authorised IPs. |
| 408 Request Timeout | No reply from sip01. Check outbound UDP 5060 on the firewall and DNS on the dialer. |
| 503 Service Unavailable | The route is blocked or failed on the seller's side. Check My Interconnections; try another route or a routing group. |
| One-way or no audio | Set externip and localnet in sip.conf (or the PJSIP transport) behind NAT, and open the RTP range. |
| Inbound call goes to the wrong place | No DID matches the E.164 number, so VICIdial uses the default DID. Add the number in Admin → Inbound. |
References#
Common questions
Can VICIdial register to TelecomsXchange?
No. TelecomsXchange is peering only and does not accept REGISTER, so leave the carrier's Registration String blank. VICIdial is recognised by the server's source IP, or by digest credentials in the account entry.
How many calls per second can VICIdial send?
10 calls per second for each authorised IP address. Edit Account shows it as IP CPS Limit. Pace the dialer below it, or authorise more dialer servers' IPs; contact support@telecomsxchange.com to raise it.
Where does the tech prefix go?
In the carrier's Dialplan Entry, in the Dial() string: the campaign dials 9447700900123, and the entry strips the 9 and dials SIP/80039#447700900123@tcxc.
I have several dialer servers. Do I need several carriers?
No. Set the carrier's Server IP to 0.0.0.0 so it is loaded on all servers, and authorise every server's public IP on the account under Additional Allowed IPs.
- Can VICIdial register to TelecomsXchange?
- No. TelecomsXchange is peering only and does not accept REGISTER, so leave the carrier's Registration String blank. VICIdial is recognised by the server's source IP, or by digest credentials in the account entry.
- How many calls per second can VICIdial send?
- 10 calls per second for each authorised IP address. Edit Account shows it as IP CPS Limit. Pace the dialer below it, or authorise more dialer servers' IPs; contact support@telecomsxchange.com to raise it.
- Where does the tech prefix go?
- In the carrier's Dialplan Entry, in the Dial() string: the campaign dials 9447700900123, and the entry strips the 9 and dials SIP/80039#447700900123@tcxc.
- I have several dialer servers. Do I need several carriers?
- No. Set the carrier's Server IP to 0.0.0.0 so it is loaded on all servers, and authorise every server's public IP on the account under Additional Allowed IPs.
Finished this guide?
This guide matches platform build 83b4ebc9. Markdown version.