Apifonica XML is a set of commands providing management capabilities for incoming and outgoing calls. The commands can be combined with each other and form complex instructions in XML format.
How It Works
In the event of an incoming or an outgoing call, Apifonica API makes a request to the specified URL. In response, the platform expects to receive an XML file with instructions on what to do with this call.
The URL containing the instructions is specified as a parameter value in the POST request to Apifonica REST API (for outgoing calls) and in the number properties (for incoming calls). This parameter name is controller.
The URL can refer either to static XML instruction, or to a web application that generates an XML file. Together with the request for the XML instruction, Apifonica API passes a number of parameters on the basis of which an XML file can be generated.
In the view of the foregoing, the Apifonica API allows developers to build dynamic or interactive applications. For example, a web application can determine a country of the caller by its phone number and automatically redirect the call to the call-center operator corresponding to this country.
Apifonica XML Functionality
Apifonica XML enables to perform the following actions with a live call:
- Redirect a call to another phone number.
- Play an audio file for the caller.
- Send a message during the call.
- Accept the caller input from their keypad.
- End the call.
List of commands
Currently, Apifonica XML supports the following commands:
- sendMessage — send a message.
- makeCall — initiate a call to the specified number and connect with the current caller. For incoming calls, this command performs call forwarding. For outgoing calls, it allows organising a callback service.
- endCall — end the call.
- playAudio — play an audio file.
- wait — wait before executing more instructions.
- getInput — accept the keys the caller presses on their device.
- goTo — redirect the call control to a different Apifonica XML file.
You can use different combinations of the commands above to create all kinds of interactive voice and messaging applications.
Because Apifonica API includes not only the REST API functions but also the Apifonica XML instructions, the platform is very flexible. It allows developing complex solutions that are usually built by using expensive hardware and software systems.
The following functionality can be developed by integrating with Apifonica API:
- Virtual PBX
- Distributed call center
- Intercompany telephone network
- Auto answering, including corporate IVR
- Two-factor authentication system
- Caller number masking
- SMS surveys
- Smart SMS marketing.
The above and many other cases can be implemented by using various combinations of REST requests and XML instructions being generated by the subscriber’s server.