Skip to content

Request new Service

Request

Submit a new service request.

When the request is accepted a number is reserved for this service.

Automatic number allocation

Along with the service details each new request requires to specify service_number

The service_number object allow our customer to specify the "search rules" for the new service number easing the number selection process.

What follow is a series of examples on how tok use the automatic number allocation feature:

by location

{
 "service_number":
 {
  "country": "AU",
  "search_type": "location",
  "location": "LEVEL 2 150-152 Elizabeth St, 2000 NSW Australia",
  "radius": 20
 }
}

by coordinates

{
 "service_number":
 {
  "country": "AU",
  "search_type": "location",
  "lat": -33.865143,
  "lng": 151.209900,
  "radius": 20
 }
}

by "matching prefix" or "service number"

{
 "service_number":
 {
  "country": "AU",
  "search_type": "number",
  "number": "61290081596"
 }
}

number can be either the number to match as close as possible or one of AVANSER's available service number chosen through Search Numbers service available for this API.

by number type

{
 "service_number":
 {
  "country": "AU",
  "search_type": "number_type",
  "number_type": "MOBILE"
 }
}

by szu

{
 "service_number":
 {
  "country": "AU",
  "search_type": "szu",
  "szu": "sydney"
 }
}

Example: new transfer service

Transfer service allows our customer to transfer the Caller Party to the desired Answer Point

Example: new voicemail service

Voicemail service allows our customers to play a message to the Caller Party and record a message.

Message is stored along with the CDR data and is always available either in the Portal or using our WebAPI service.

Example: new prompt service

Prompt service allows our customers to play a message to the Caller Party.

Security
HTTP_BASIC
Bodyapplication/json
nameany

Friendly name

Example:"Tracking Service 1"
custom_idany

custom_id is returned in the confirmation callback

Example:"{any custom unique id}"
service_numberobject

Provide information about the requested service

serviceobject(InboundService)

Service configuration details

call_uristring

if defined sets the url for the Call-URI functionality, each call is reported to this url if configured.

Example:"http://path/to/call_reporting_uri"
sms_forward_uristring

If defined, each inbound SMS is sent to this URL using HTTP POST, with the parameters in the request body.

Example:"http://path/to/sms_forward_uri"
callback_uristring

if defined sets the url for the Callback-URI functionality, if defined callback is sent when request status is updated.

Example:"http://path/to/callback_uri"
curl -i -X POST \
  -u '<username>:<password>' \
  https://tapi.avanser.com/v1/requests \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "TAPI Transfer EXAMPLE",
    "custom_id": "tapi-transfer-example-1",
    "service_number": {
      "country": "AU",
      "search_type": "number_type",
      "number_type": "MOBILE"
    },
    "service": {
      "type": "transfer",
      "answer_point_name": "TAPI answer point EXAMPLE #1",
      "answer_point": "61420123123",
      "call_whisper": "https://example.tld/audio/call_whisper.wav",
      "voicemail": "https://example.tld/audio/voicemail.wav",
      "record_call": false,
      "transcription": {
        "transcribe_call": true,
        "enable_pci_redaction": true,
        "enable_pii_redaction": true
      },
      "call_reporting": {
        "report": "none"
      }
    },
    "call_uri": "http://example.tld/debug.php?call-uri",
    "sms_forward_uri": "http://example.tld/debug.php?sms_forward_uri",
    "callback_uri": "http://example.tld/debug.php?callback_uri"
  }'

Responses

Successful response

Bodyapplication/json
@transactionobject
responseobject
Response
{ "@transaction": { "id": "c9220015e2f48bc7cf4b38186a7b2025", "account-id": "5995", "request": { … } }, "response": { "message": "Success", "code": 200, "request_id": "c9220015e2f48bc7cf4b38186a7b2025", "service_number": "6129008596" } }