Account Login





Lost password?

Number Provisioning API

service icon

Gain full control of your numbers

Our white-label email to fax and fax to email service is fully accessible via our extended API.
Resellers are able to instantly provision and configure number for use as VoIP, call forwarding or Fax.

For further details, please see our extended VoIP API documentation.



Assign UK geographic and non-geographic numbers to your own SIP endpoints

If you own a SIP router or PBX - such as asterisk, we can assign UK PSTN phone numbers from
our own numbering ranges to your own PBX or reseller platform.

Secure API

Our API uses 128-bit SSL encryption and allows resellers to search for available number ranges and
assign numbers in real time via HTTP POST/GET.


To assist you in using our API, we have provided 2 example php scripts:

Please note that you would need your reseller username and password to run either script.

Connection Details

The gateways used for access are:

http://gw.aql.com/telecoms/checknumberapi.php
http://gw.aql.com/telecoms/assignnumberapi.php

 

Process Overview

Our API is divided into 2 processes.
1. Querying of available numbers.
 • This returns a list of available numbers for you to choose from for use in step 2.
2. Assigning Number(s).
 • This stage assigns the number(s) to your account and activates them. In response, you will receive the voip username and password for each of the numbers in the request.

All the communications between client and gateway are carried out using the HTTP POST/GET method.


Querying Available Numbers


Request

 


This step requires the following HTTP POST/GET parameters:

Variable Description
username Reseller’s username
password Reseller’s password
country Country code of the number, UK is 44
areaCode Area code of the number without the leading 0 (zero), e.g. 113 for Leeds instead of 0113
subCode The remainder of the number - The subCode supports * as wildcard
skip Acts to offset the responses by omitting the first x records
show Limit (or increase) the result set returned to x

Response


When a request is posted to our gateway, the response will be in the following format:

<RESPONSE_CODE>
<ADDITIONAL_INFO>


The possible values of <RESPONSE_CODE> are outlined in the following table:

 

Response Description
AQVOIP_FORMAT_ERROR One or more variables is not in the correct format (e.g. if areaCode contains alphabet.)
AQVOIP_AUTH_ERROR Authentication error.
AQVOIP_NO_NUMBER No number which matches the query is available.
AQVOIP_OK Request is successful.
AQVOIP_TEMP_ERROR Temporary error. Please try again in a few moments. We are working on resolution.

Example:
To search for 0113 numbers beginning with 312012 you would use the following variables:
country = 44,
areaCode = 113 and
subCode = 312012*
The gateway would then return the following (only the first 4 numbers are shown here for clarity):

AQVOIP_OK
44-113-3120120_44-113-3120121_44-113-3120122_44-113-3120123_ ...

Depending on the query, the second line of response might contain up to 100 different numbers.

 


Provisioning Numbers


Request


This step requires the following HTTP POST/GET parameters:

Variable Description
username Reseller’s username
password Reseller’s password
phoneNumbers A list of the phone number(s) of all the numbers to be activated separated by underscores
firstNames A list of all the first name(s) of the reseller’s customer separated by underscores
lastNames A list containing all the last name(s) of the reseller’s customer separated by underscores
emails A list containing all the email address(es) of the reseller’s customer separated by underscores

Example of how list variables should look like:
– PhoneNumbers list should be passed in the format of

44-113-3120120_44-113-3120121_44-113-3120122_44-113-3120123_ ...

– firstNames, lastNames and emails should be passed in the format of

Robert_James_John_...

 

Important:

It is important to note that the size (i.e. number of elements) of all of these lists have to be exactly the same. If that is not the case, the response AQVOIP_FORMAT_ERROR will be issued.
The values for the firstNames, lastNames and emails parameters may contain an empty string. If these fields are left blank, this may affect some aql VoIP functionality. An example would be sending a sound fle containing a voicemail message to a customer email address if he/she has a voicemail.
 

Response


The response from our gateway will be of the following format:

<RESPONSE_CODE> <REAL NUMBER>_<VOIP_NUMBER>_<PASSWORD>
<REAL NUMBER>_<VOIP_NUMBER>_<PASSWORD>
.
<REAL NUMBER>_<VOIP_NUMBER>_<PASSWORD>


The possible values of <RESPONSE_CODE> are outlined in the following table:
Response Description
AQVOIP_FORMAT_ERROR One or more variables is not in the correct format
AQVOIP_AUTH_ERROR Authentication error.
AQVOIP_SIMUL_ERROR 1. One or more number in the phoneNumbers variable is not available to be assigned. Please check using our check available number API.
2. Or other reseller/customer is trying to assign the same number for themselves.
Restarting the process or choosing a different set of numbers would usually solve this problem.
AQVOIP_GEN_ERROR General error that arises during number assignment. Please contact our support team on 01133 203040 if the problem persists.
AQVOIP_OK Request is successful.
AQVOIP_TEMP_ERROR Temporary error. Please try again in a few moments. We are working on resolution.

Important:
The order of voipnumber and password will correspond to the order of phoneNumbers, firstNames, lastNames and emails sent to our gateway in step 2.
An example response from this gateway would be:

AQVOIP_OK
44-113-3120120_612345_98765
44-113-3120121_654321_45848


Notes:

  • For the provision number api, we maintain the policy of “assign all” or none. Which means to avoid any inconsistency or anomalies, if an error occurs in any part of the process then none of the numbers will be assigned even though the error might occur half way through the provisioning process.
  • The monthly price for activating a geographic number will be charged to your account and you will be invoiced monthly.
  • It is an advisable practice to check and recheck if numbers are still available using query available number API (see above) before assigning them. This, however, is not compulsory.
  • All lines in the API are terminated by \n and not \r\n.

Number Availability

tel.aql.com currently have over 9 million UK Geographic numbers ready to be assigned within seconds.


Pricing

Each geographic number carries a rental charge of £1.00 + vat per number per month. However, for one-off number purchases, this can be made manually via your tel.aql.com account and number rental is charged at £2.00 + vat per number per month.


Support

Please feel free to contact us if you have any other enquiry via our support system at http://www.aql.com. Our support team will normally respond your query within 20 minutes during normal offce hours.