{"templateId":"api_docs","sharedDataIds":{"apiDocsStore":"api-docs-telco-api/introduction.yaml","sidebar":"sidebar-sidebars.yaml"},"props":{"definitionId":"telco-api/introduction.yaml","settings":{"baseUrlPath":"/telco-api/introduction"},"disableAutoScroll":true,"seo":{"title":"AVANSER Telco API","llmstxt":{"hide":true}},"dynamicMarkdocComponents":[],"metadata":{"type":"openapi","title":"AVANSER Telco API","version":"202610","description":"AVANSER Telco API is designed to provide an easy way to order and manage client services.\n\nAVANSER Telco API is Agency friendly. Users can be configured to have access to multiple AVANSER accounts, facilitating service automation.\n\n## Authentication\n\n+ AVANSER Telco API requires HTTP Basic Authentication over HTTPS.\n\n    + Contact AVANSER Support to obtain your credentials.\n\n+ AVANSER fluid requires HTTP Basic Authentication to access the services as described [here](https://en.wikipedia.org/wiki/Basic_access_authentication)\n\nAll Requests require authentication\n```\n    Authorization: Basic {Authentication}\n```\n+ HTTP_BASIC\n    + username: {AVANSER_username}\n    + password: {AVANSER_password}\n\n## API Model\n\nTo make the AVANSER Telco API easy, all responses are in JSON format, along with the HTTP Basic authentication. This API has been developed to be friendly with NodeJs, Javascript, Java or PHP.\n\nThe `@transaction` object returned in any reply provide constant feedback on the selected account and the API details.\n\nThis API is designed to ease configuration & provisioning of AVANSER transfer and voicemail services. Future releases will include other call features.\n\nThe complete call feature is however available through the AVANSER support.\n\n### Synchronous Model\n\nAll Resource gathering Requests are Synchronous (GET Requests).\n\n![Synchronous Model](http://mailimg.avanser.com/apiary/TelcoAPI_sync_model.png)\n\n### Asynchronous Model\n\nAll Provisioning requests provide a status update (Callback-URI). If enabled, AVANSER Telco API returns all request status updates, such as:\n\n+ Service Creation\n+ Service Update\n+ Service Decommission\n\nAn acknowledgment message is returned with any asynchronous request. The acknowledgment message confirms if the request was submitted successfully.\n\nRequest status can be always monitored through the [List Requests](http://docs.avansertapi.apiary.io/#reference/0/requests/list-requests) API call.\n\n![Asynchronous Model](http://mailimg.avanser.com/apiary/TelcoAPI_async_model.png)\n\n## Call Tags\n\nCall tags can be used in Templates and Call notification email subject.\n\n| TAG                | Example                                                       | Description                                                                 |\n|:-------------------|---------------------------------------------------------------|-----------------------------------------------------------------------------|\n| `__location__`     | Sydney, NSW, Australia                                        | detected call location                                                      |\n| `__outnum__`       | +61-0290080000                                                | Answer Point number                                                         |\n| `__dateTime__`     | 2016-04-15 10:23:20                                           | call date, according to Answer Point timezone                               |\n| `__bnum__`         | +61-0290080000                                                | Call Tracking service number                                                |\n| `__ani__`          | +61-0420000000                                                | Caller Party number if not available a private reference is returned        |\n| `__adsource__`     | Tracking Service 1                                            | Friendly name associated with the service number                            |\n| `__callDuration__` | 36                                                            | Call duration, expressed in seconds                                         |\n| `__callstatus__`   | `Answered`                                                    | Call status: `Abandoned`, `Unanswered`, `Busy`, `Answered`                  |\n| `__URL__`          | http://path/to/audio/file.mp3                                 | Audio recording download url                                                |\n| `__link__`         | ```<a href=\"\">audio file</a>```                               | Audio recording url, HTML Anchor link format                                |\n\n\n## Callback-URI functionality\n\nWhen a service is successfully provisioned, a Callback is set to the configured `call_callback_uri`.\n\nRequest are sent to the desired `call_callback_uri` as POST.\n\n+ Headers\n```\n    Content-Type: application/json\n```\n\n### Request completed\n```\n{\n  \"account_id\" : 6999,\n  \"request_id\" : \"c9220015e2f48bc7cf4b38186a7b2025\",\n  \"custom_id\" : \"client desired unique id\",\n  \"status\" : \"completed\",\n  \"message\": \"Request completed successfully\"\n  \"service_number\" : \"611300123123\",\n  \"answer_point\": \"614201010100\"\n}\n```\n\n### Request failed\n```\n{\n  \"account_id\" : 6999,\n  \"request_id\" : \"c9220015e2f48bc7cf4b38186a7b2025\",\n  \"custom_id\" : \"client desired unique id\",\n  \"status\" : \"failed\",\n  \"message\" : \"Selected service number is not available\",\n  \"service_number\" : \"611300123123\",\n  \"answer_point\": \"614201010100\"\n}\n```\n\n## Call-URI functionality\n\nIf enabled, calls are reported to the desired url as POST Requests.\n\n| Description            | Parameter    | Example\n|:----------------------|--------------|-------------\n| AVANSER's ClientID    | clientid     | 6999\n| AVANSER's CallID      | callid       | 324213111\n| AVANSER's UniqueId    | uniqueid     | ECS1-1923211.11\n| Tracking Service #    | bnum         | +61-0290081596\n| Tracking Service Name | adname       | Tracking Service 1\n| AnswerPoint #         | target       | +61-0401020304\n| AnswerPoint Name      | targetname   | Sydney Office\n| Caller Party #        | ani          | +61-0410203045\n| Call Date (ISO 8601)  | tzdate       | 2019-11-14T12:11:21+10:00\n| Call Duration (sec.)  | duration     | 30\n| Call Status           | callstatus   | tags, available values are: ***avanser_abandoned_call, avanser_answered_call, avanser_busy_call, avanser_unanswered_call, avanser_fax_call, avanser_missed_call***\n| Call status code      | callcode     | 1\n| Call location         | clocation    | Sydney\n| Call state            | cstate       | MOB\n| Call country          | ccountry     | AU\n\n\n## SMS-Forward functionality\n\nIf enabled for services supporting SMS messages, each inbound SMS is sent to the configured `sms_forward_uri` using an HTTP POST request. The following parameters are sent in the request body:\n\n| Description            | Parameter    | Example\n|:----------------------|--------------|----------------\n| AVANSER's ClientID    | clientId     | 6999\n| SMS Recipient         | to           | +61-0401020304\n| SMS Sender            | from         | +61-0401020305\n| SMS Text              | txt          | `this is a test message`\n| SMS Date              | date         | 2016-04-12 10:10:10\n"},"compilationErrors":[],"markdown":{"partials":{},"variables":{"rbac":{"teams":["anonymous"]},"user":{},"remoteAddr":{"hostname":"avanser.redocly.app","port":4000,"ipAddress":"216.73.216.254"},"lang":"default_locale","env":{"PUBLIC_REDOCLY_BRANCH_NAME":"main"}}},"pagePropGetterError":{"message":"","name":""}},"slug":"/telco-api/introduction","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}