EurIAX
API Documentation

EuroIAX's REST API allows you to trigger and control calls between two parties and send digitally recorded messages.

More information:
Mass Calling Services

Base URL
All URLs referenced in this documentation have the following base:

 http://www.euroiax.com/api/v1


Resource: Make call
Trigger a call from a IAX/SIP source channel to a PSTN number.

Request

 GET /makecall?api_key=[API KEY]&phone=[PHONE NUMER]&src=[SOURCE CHANNEL]

ParameterDescription
api_keyYour API key
(both client side and server side API keys can be used - more information here)
phonePhone number (E.164 format with two leading zeros)
srcSource channel
(only used when using a server side API key - more information here)

JSON response

 {"result":result,"error":error,"uniqueid":uniqueid} 

ParameterDescription
result1 – Success; < 0 – Error
errorError detail (blank if success)
uniqueidCall unique ID (blank if error)

The response is returned only after the call has been answered or when an error occurs.

Example

 curl "http://www.euroiax.com/api/v1/makecall?api_key=aaaaaa&phone=00442078878888
&src=SIP/1234@mypbx.foo"

Resource: Hangup call
Hangup a call after it has been established.

Request

 GET /hangupcall?api_key=[API KEY]&uniqueid=[CALL UNIQUE ID]

ParameterDescription
api_keyAPI key that triggered the call
(both client side and server side API keys can be used - more information here)
uniqueidCall Unique ID

JSON response

 {"result":result,"error":error} 

ParameterDescription
result1 – Success; < 0 – Error
errorError detail (blank if success)

Example

 curl "http://www.euroiax.com/api/v1/hangupcall?api_key=aaaaaa&uniqueid=12345678"


Resource: Play file
Trigger a call to a PSTN number and play a MP3 file.

Request

 GET /playfile?api_key=[API KEY]&phone=[PHONE NUMER]&url=[MP3_FILE_URL]

ParameterDescription
api_keyYour API key
(only server side API keys can be used - more information here)
phonePhone number (E.164 format with two leading zeros)
urlURL of the MP3 file (url encoded)

JSON response

 {"result":result,"error":error,"uniqueid":uniqueid} 

ParameterDescription
result1 – Success; < 0 – Error
errorError detail (blank if success)
uniqueidCall unique ID (blank if error)

The response is returned only after the call has been answered or when an error occurs.

Example

 curl "http://www.euroiax.com/api/v1/playfile?api_key=aaaaaa&phone=00442078878888
&url=http%3A%2F%2Ffoo.com%2Ffile.mp3"

Resource: Simple survey
Trigger a call to a PSTN number, play a MP3 file and wait for a key.

Request

 GET /simplesurvey?api_key=[API KEY]&phone=[PHONE NUMER]&url=[MP3_FILE_URL]

ParameterDescription
api_keyYour API key
(only server side API keys can be used - more information here)
phonePhone number (E.164 format with two leading zeros)
urlURL of the MP3 file (url encoded)
url2URL of the MP3 file to be played after a key is pressed (url encoded; optional)

JSON response

 {"result":result,"error":error,"uniqueid":uniqueid,"responseurl":responseurl} 

ParameterDescription
result1 – Success; < 0 – Error
errorError detail (blank if success)
uniqueidCall unique ID (blank if error)
responseurlURL to retrieve the response (see below)

The response is returned only after the call has been answered or when an error occurs.

Example

 curl "http://www.euroiax.com/api/v1/simplesurvey?api_key=aaaaaa&phone=00442078878888
&url=http%3A%2F%2Ffoo.com%2Ffile.mp3&url2=http%3A%2F%2Ffoo.com%2Fthankyou.mp3"

Resource: Generate client side API key
Generate a client side API key for a specific source channel.

Request

 GET /generateclientsideapikey?api_key=[API KEY]&src=[SOURCE CHANNEL]

ParameterDescription
api_keyYour API key
(only server side API keys can be used - more information here)
srcSource channel

JSON response

 {"result":result,"error":error,"new_api_key":new_api_key} 

ParameterDescription
result1 – Success; < 0 – Error
errorError detail (blank if success)
new_api_keyNew client side API key (blank if error)

Example

 curl "http://www.euroiax.com/api/v1/generateclientsideapikey?api_key=aaaaaa
&src=SIP/1234@mypbx.foo"

Webmaster | About us | Rates | FAQ | Terms of use
All prices in Euros.
Copyright © 2005-2013 Invictasoft, Lda.