Calls

Quote the price of an outbound call

What a call from one of your SIP accounts to b_number, presenting a_number as the caller ID, will be billed: the destination name, the per-minute price and the billing increment.

The quote replays what the platform does to the call before it is billed: the SIP account's destination rewrite, its caller-ID restrictions, routing rules and caller-ID overrides. It then rates the call with the same code billing uses: exact prices, origin-based rates and markup included.

Not modelled:

  • the carrier (trunk) chosen for the call, which can change the increment and, through the caller ID it presents, the price;
  • blocklists and allowlists: a destination that would be refused is still quoted;
  • where the platform picks a caller ID at random, the first candidate is used.

Send b_number in E.164 (country code first). A national number is quoted only when the SIP account has a rewrite rule that turns it into E.164.

get/api/v1/call_price

Request

  • Base URL: https://app.didlogic.com
  • URL: https://app.didlogic.com/api/v1/call_price
  • Auth: HTTP bearer

Query parameters

a_numberstring required
Example:+13125550100

Caller ID the call presents; up to 5 digits means anonymous

b_numberstring required
Example:+447911123456

Number to call, E.164 (a leading + is accepted)

sipaccountstring required
Example:100001

SIP account name from sipaccounts_index, the account placing the call

Response

The price and increment the call will be billed at

destination_namestring nullable required

Destination as listed in your price list; null for an exact price only

pricenumber float required

Price per minute in USD

Example response

{
  "destination_name": "United Kingdom - O2",
  "price": 0.056,
  "increment": {
    "initial": 30,
    "unit": 1
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.