Voice Exchange

What is it ?

The voice exchange section of this API represents all the exposed APIs related to voice buying and selling. Developers use this section to integrate rates, cdrs, route testing with third party applications.

Visit Github repository for code examples

Don't have an account? Signup here

Base URLhttps://apiv2.telecomsxchange.com
AuthenticationHTTP Digest

Market View

Overview

The Market Rates Lookup API from TelecomsXchange provides real-time access to voice wholesale termination rates from several sellers. The returned data includes a host of valuable information, including prefix, rates, ASR (Answer Seizure Ratio), ACD (Average Call Duration), ratings, reviews, seller payouts, and more.

Warning

Please note that the Market Rates Lookup API is primarily designed to facilitate price comparisons for specific destinations, and is not optimized for fetching extensive sets of results. Therefore, you might encounter performance issues if attempting to retrieve a large number of rates via this API.

Should you need to sync a high volume of rate records simultaneously, we recommend using the Carrier Download Rates API feature, specifically designed for such use-cases.

Usage Constraints

While using the Market Rates Lookup API, ensure to structure your requests efficiently to maintain optimal performance and avoid potential slowdowns.

Returned Data

The returned data from this API call will include:

  • Prefix: The prefix corresponding to each rate.
  • Rates: The cost of voice wholesale termination.
  • ASR: The Answer Seizure Ratio.
  • ACD: The Average Call Duration.
  • Ratings: The ratings given by other users.
  • Reviews: User reviews for each seller.
  • Seller Payouts: The payout rates for each seller.
  • More: Additional information may also be provided.

For more details on the data structure, response format, and potential error codes, please refer to the specific sections of the TelecomsXchange API documentation.

#Search Market View (Voice)

POSThttps://apiv2.telecomsxchange.com/marketview/search

Search Voice termination partners rates, stats and reviews and other unique data usin this method.

P.S: Daily minutes and stats (ASR/ACD) values show based on last rate update for the given prefix.

Body parameters

application/x-www-form-urlencoded
prefixintegerrequired

Country Code , Area Code

Example 1855

searchformintegerrequired

same parameters as web portal accepts

Example 1

typestringrequired

Route Type - cli, nocli , tdm, any

Example CLI

sellerstringrequired

show sms rates only (optional)

Example Pure

pagerintegerrequired

number of pages to return "pagination"

Example 100

offintegerrequired

offset

Example 0

curl --digest \
  -u "$TCXC_USERNAME:$TCXC_API_KEY" \
  -X POST \
  "https://apiv2.telecomsxchange.com/marketview/search" \
  -d "prefix=1855" \
  -d "searchform=1" \
  -d "type=CLI" \
  -d "seller=Pure" \
  -d "pager=100" \
  -d "off=0"
Rates for prefix 227891 seller
SellerPer minASRACDMin / wk
BVBVIGold · TDM$0.162510.5%25s702,993

Lowest price highlighted. Live data adds ratings, reviews and capacity per seller.

Rendered from the example response.

#Carrier Rate Download (CSV)

POSThttps://apiv2.telecomsxchange.com/sellers/rates/{i_tariff}

Overview

The Sell Rates Download API from TelecomsXchange enables you to retrieve and download the current sell rates for a specific seller in CSV format. It's particularly useful for integrating and syncing comprehensive rate decks directly into your billing systems.

Prerequisites

Before you begin, you must know the i_tariff value for the seller/connection rates you wish to retrieve. This value can be found using either the Market View API or the List Seller IDs API.

For instance, the i_tariff value for the seller "PureTelephone" with the route "CLI" is 866. You may use this ID as an example to familiarize yourself with the process.

Ideal Usage

This API proves beneficial in cases where the full synchronization of rate decks into your billing system is required, offering a more efficient method to manage and analyze sell rates data. Please refer to the specific sections of the TelecomsXchange API documentation for details on request structure, response format, and handling potential error codes.

Path parameters

i_tariffintegerrequired

Tariff ID of the seller connection to download. Find it with Market View or List Sellers Route Information.

Example 866

curl --digest \
  -u "$TCXC_USERNAME:$TCXC_API_KEY" \
  -X POST \
  "https://apiv2.telecomsxchange.com/sellers/rates/866"
Rate deck7 rows shown · CSV
DestinationPrefixPer minASRACDEffective
UNITED STATES OF AMERICA Fixed - Paid 8001800$0.0000100.0%133s2018-04-10
UNITED STATES OF AMERICA Fixed - Paid 8001833$0.00000.0%0s2018-04-10
UNITED STATES OF AMERICA Fixed - Paid 8001844$0.00000.0%0s2018-04-10
UNITED STATES OF AMERICA Fixed - Paid 8001855$0.0000100.0%79s2018-04-10
UNITED STATES OF AMERICA Fixed - Paid 8001866$0.00000.0%0s2018-04-10
UNITED STATES OF AMERICA Fixed - Paid 8001877$0.0000100.0%11s2018-04-10
UNITED STATES OF AMERICA Fixed - Paid 8001888$0.00000.0%0s2018-04-10

The full download contains the complete rate deck for the seller, ready to import into a billing system.

Rendered from the example response.

#Top Voice Destinations

GEThttps://apiv2.telecomsxchange.com/sellers/toproutes

Overview

The Top Destinations API from TelecomsXchange provides members with a way to fetch a list of the top (5, 10, 20) destinations that have seen the most traffic over a specific period (today, yesterday, this week, this month) and for a specific route type such as TDM, CLI, NCLI, NA.

Usage

This API is ideal for analyzing traffic patterns and understanding the most active destinations. The selectable timeframe and route type allow for flexible, targeted data retrieval, making it easier to monitor and adjust your traffic strategy accordingly.

Please refer to the TelecomsXchange API documentation for more details about how to structure your requests, understand the response format, and handle any potential error codes.

Query parameters

typestringrequired

Route Type supported: CLI, TDM, NCLI, NA

Example CLI

smppintegeroptional

smpp: 0 or 1 or defaults to 0

Example 1

numberintegerrequired

Expects integer values from 1 to 20 and defaults to 5 if not set.

Example 5

periodstringrequired

period: supported values are today, yesterday, week, month

Example today

curl --digest \
  -u "$TCXC_USERNAME:$TCXC_API_KEY" \
  "https://apiv2.telecomsxchange.com/sellers/toproutes?type=CLI&number=5&period=today"
Top destinationsby traffic
  1. 1NIGERMobile - Airtel (CLI), Mobile - Airtel (CLI), Mobile - Airtel (CLI)from $0.1910per min
  2. 2INDIAFixed - ROC (CLI), Mobile - BSNL (CLI), Fixed - ROC (CLI)from $0.0047per min
  3. 3SUDANMobile - Zain (CLI), Mobile - Zain (CLI), Mobile - Zain (CLI)from $0.1179per min
  4. 4NIGERIAMobile - MTN (CLI), Mobile - MTN (CLI), Mobile - MTN (CLI)from $0.0761per min
  5. 5EGYPTMobile - Vodafone (CLI), Mobile - Etisalat (CLI), Mobile - Etisalat (CLI)from $0.0873per min
Rendered from the example response.

Buyers Accounts

Overview

The Sub-Accounts Listing API provided by TelecomsXchange allows authenticated buyers to retrieve a list of all their associated sub-accounts. This includes all SMPP (Short Message Peer-to-Peer), SIP (Session Initiation Protocol), and IoT (Internet of Things) sub-accounts.

Usage

This API is particularly useful for buyers needing to manage multiple sub-accounts, offering a unified view of all associated accounts within a single request. It assists with account organization and management across various protocols and services.

Please refer to the TelecomsXchange API documentation for more details about how to structure your requests, understand the response format, and handle any potential error codes.

#List Buyer Accounts

POSThttps://apiv2.telecomsxchange.com/buyers/account/list

The Accounts Listing API provided by TelecomsXchange allows authenticated parent buyers to retrieve a comprehensive list of all their associated child accounts.

No parameters. Authentication is the only requirement.

curl --digest \
  -u "$TCXC_USERNAME:$TCXC_API_KEY" \
  -X POST \
  "https://apiv2.telecomsxchange.com/buyers/account/list"
Balances
NORTHWIND balance4,035.45USD
Sub-accounts2
AccountBalanceCredit limitStatus
A2P-TRAFFIC SMPPshared$0.00active
NORTHWIND SIP · 203.0.113.104,035.45$60000.00active
Rendered from the example response.

Buyer Route Testing

This folder contains test requests for validating buyer routing configurations on the TelecomsXChange (TCXC) platform.

Use these requests to:

  • Authenticate as a TCXC buyer using environment variables for credentials

  • Retrieve available test numbers

  • Submit and validate test calls against purchased routes

  • Verify quality parameters (ASR, ACD, PDD) and routing behavior before moving traffic to production

Prerequisites

  • A valid TCXC buyer account

  • An API key or token configured via Postman environment variables (no secrets hard-coded in requests)

  • The {{base_url}} variable pointing to the correct TCXC API environment (sandbox or production)

#Get Test Numbers

GEThttps://apiv2.telecomsxchange.com/buyers/tools/getnumbers

Overview

The Global Phone Numbers API from TelecomsXchange enables users to retrieve valid phone numbers from any country worldwide, which can then be used to initiate voice and SMS tests. Designed with network operation centers in mind, this API is ideal for entities that require continuous access to working numbers in various countries for testing purposes.

Key Features and Use Cases

  • Worldwide Access: Retrieve valid phone numbers from any country globally.
  • Limit Setting: Define a limit in the API call to control how many numbers you receive in each response.
  • Comprehensive Information: Along with phone numbers, get the country name, code, and description in the response.
  • Validity Check: Ensure that you only receive valid, usable numbers.
  • Randomization: On every API call, random numbers are provided to avoid duplicates.

Try the Demo App

A demo application is available for users who want to explore and understand the API before integrating it into their systems.

Try Demo App

Post-Retrieval Actions

Once you've retrieved the numbers, you can use the Route Test API to initiate test calls, enabling a full cycle of number acquisition and test execution.

For further information on how to structure your requests, interpret the response format, and handle potential error codes, please consult the TelecomsXchange API documentation.

Query parameters

prefixintegerrequired

Country code + Area code

Example 91

countrystringrequired

Country name i.e. India

Example India

descriptionstringrequired

Network name . i.e. Airtel

Example Airtel

curl --digest \
  -u "$TCXC_USERNAME:$TCXC_API_KEY" \
  "https://apiv2.telecomsxchange.com/buyers/tools/getnumbers?prefix=91&country=India&description=Airtel"
Test numbers3 numbers available
  • +201021634650Egypt · Mobile - Vodafone
  • +201023792381Egypt · Mobile - Vodafone
  • +201032091935Egypt · Mobile - Vodafone
Rendered from the example response.

#Initiate Route Test

POSThttps://apiv2.telecomsxchange.com/buyers/routetest

Overview

The Route Test API from TelecomsXchange enables users to initiate testing on one or more routes using a single API request. This feature is designed to facilitate efficient and comprehensive testing processes for network routes.

Usage

This API is ideal for users who need to validate and test the functionality of multiple network routes simultaneously. By allowing a single API request to handle testing for more than one route, it streamlines the testing process and improves overall efficiency.

For additional details on how to format your requests, understand the response format, and manage potential error codes, please refer to the TelecomsXchange API documentation.

Body parameters

application/x-www-form-urlencoded
i_accountintegerrequired

Billing Account ID

Example 1022

cld1integerrequired

The first phone number to dial

Example 962790326274

cli1integerrequired

The caller id to use when calling the first number or CLD1

Example 18882874637

i_connection1integerrequired

Carrier Route to use for the test call e.g 315 is IDT, You can find this infromation in Market View API.

Example 315

cld2integerrequired

The second phone number to dial

Example 18882874637

cli2integerrequired

The second caller id to use when calling the second number or CLD 2

Example 9542405411

i_connection2integerrequired

Carrier Route to use for the test call on second number

Example 864

curl --digest \
  -u "$TCXC_USERNAME:$TCXC_API_KEY" \
  -X POST \
  "https://apiv2.telecomsxchange.com/buyers/routetest" \
  -d "i_account=1022" \
  -d "cld1=962790326274" \
  -d "cli1=18882874637" \
  -d "i_connection1=315" \
  -d "cld2=18882874637" \
  -d "cli2=9542405411" \
  -d "i_connection2=864"
Route test
Test call queuedTest call has been initiated

Results (PDD, ASR, audio) arrive in the members portal and via CDRs once the call completes.

Rendered from the example response.

Buyer Live Calls

Get Summary and Details of Active calls for the authenticated buyer account. e.g "total_rows": "100" means that there are 100 active calls in total at this time from your buyer account. the value includes traffic from all sub-accounts as well.

#List Active Calls

POSThttps://apiv2.telecomsxchange.com/buyers/livecalls

 return all currently active voice calls on the buyer’s account

Body parameters

application/x-www-form-urlencoded
prefixintegerrequired

optional - leave empty to show all or enter country code that you want to filter the active calls results for.

Example 1

curl --digest \
  -u "$TCXC_USERNAME:$TCXC_API_KEY" \
  -X POST \
  "https://apiv2.telecomsxchange.com/buyers/livecalls" \
  -d "prefix=1"
Live callsright now
Active calls2
Connected2
Routes in use2
CallRouteAccountDuration
6002 18004362367Tollfreedollars USA-TollFreeNorthwind38:14
19094149795 15595074769PureTelephone USA CLI (OVH)Northwind4:13
Rendered from the example response.

Buyer CDRs

APis related to billing - such as CDRs (call detail records) for buyers.

#List CDRs

POSThttps://apiv2.telecomsxchange.com/buyers/callhistory/

Search and filter Call Detailed Records.

Body parameters

application/x-www-form-urlencoded
showstringrequired

"good" for none zero duration, "bad" for zero duration, "all" for both failed and successfull calls.

Example good

date_fromdatetimerequired

Only show calls that started on this date/time or later, given as an ISO-8601 date/time string, like YYYY-MM-DDTHH:MM:SS (for example 2018-10-05T22:45:32)

Example 2019-11-02 23:59:59

date_todatetimerequired

Only show calls that ended on this date/time or earlier, given as an ISO-8601 date/time string, like YYYY-MM-DDTHH:MM:SS (for example 2018-10-06T02:10:03)

Example 2019-11-05 23:59:59

curl --digest \
  -u "$TCXC_USERNAME:$TCXC_API_KEY" \
  -X POST \
  "https://apiv2.telecomsxchange.com/buyers/callhistory/" \
  -d "show=good" \
  -d "date_from=2019-11-02 23:59:59" \
  -d "date_to=2019-11-05 23:59:59"
Call detail records3 shown · 0 answered
TimeCallRouteDurationCost
2019-11-03 · 23:52:25+971590908045 982391383658dwci TDM -HDfailed$0.0000
2019-11-03 · 23:52:14+971591834442 982391383658dwci TDM -HDfailed$0.0000
2019-11-03 · 23:51:4911656503 201212650157Teltorhub TDMfailed$0.0000
Rendered from the example response.

#Filter CDRs

POSThttps://apiv2.telecomsxchange.com/buyers/callhistory/

Fitering CDRs to a sepcific number or for calling starting with a specific prefix.

Body parameters

application/x-www-form-urlencoded
showstringrequired

"good" for none zero duration, "bad" for zero duration, "all" for both failed and successfull calls.

Example good

prefixstringrequired

Enter Country Code or full number e.g 12262101683

Example 201%

date_fromdatetimerequired

Only show calls that started on this date/time or later, given as an ISO-8601 date/time string, like YYYY-MM-DDTHH:MM:SS (for example 2018-10-05T22:45:32)

Example 2019-11-02 23:59:59

date_todatetimerequired

Only show calls that ended on this date/time or earlier, given as an ISO-8601 date/time string, like YYYY-MM-DDTHH:MM:SS (for example 2018-10-06T02:10:03)

Example 2019-11-05 23:59:59

curl --digest \
  -u "$TCXC_USERNAME:$TCXC_API_KEY" \
  -X POST \
  "https://apiv2.telecomsxchange.com/buyers/callhistory/" \
  -d "show=good" \
  -d "prefix=201%" \
  -d "date_from=2019-11-02 23:59:59" \
  -d "date_to=2019-11-05 23:59:59"
Call detail records3 shown · 1 answered
TimeCallRouteDurationCost
2019-11-03 · 23:45:16308422 201061987074Teltorhub TDMfailed$0.0000
2019-11-03 · 23:42:29308422 201061987074Teltorhub TDM9s$0.0134
2019-11-03 · 23:37:4574122754 201063551361Teltorhub TDMfailed$0.0000
Rendered from the example response.