API¶
Smartswitch contains several Application Programming Interfaces (API).
Each of these interfaces was created for specific purposes.
When choosing an interface, we recommend that you familiarize yourself with all the available interfaces, as well as the goals they serve.
Interfaces are listed in order of increasing complexity of use and entry threshold for the programmer.
We recommend switching to a more complex interface only if a less complex interface does not allow you to solve your problem.
REST¶
This interface allows third-party applications to communicate with Smartswitch with minimal involvement into Smartswitch logic and structure.
The purpose of creating the REST interface is to allow third-party applications to communicate with Smartswitch using a minimalistic API, with a minimum number of functions and arguments.
Also, third-party systems that support the REST protocol can theoretically connect to Smartswitch after configuration, without additional modification, in case if they have enough options to configure the integration.
So, it is possible to implement a connection without the involvement of a programmer.
- the intuitive understanding of the relationship between objects on the client side becomes more difficult
- many questions arise for technical support
- server side logic gets more complicated
- API changes procedure becomes more complicated
- it becomes necessary to write extensive documentation with examples.
Therefore, we use REST only for primitive operations.
For the Smartswitch object-oriented model, we use the ICE interface (see below), which elegantly solves the above problems.
- ease of use
- simple syntax
- low entry threshold for programmer
- the ability to connect third-party systems that support connection via REST, without modifying the latter
- limited use
- third-party systems for the provision of paid HTTP services (see HLR dipping or LNP/MNP dipping)
- third-party CRM-systems
- sites
- applications of your clients (for example, you can give your client a URL to check the balance)
For details, see REST API.
ICE¶
This interface allows third-party applications to communicate more closely with Smartswitch.
The interface is an object-oriented model of Smartswitch.
The goal of creating the ICE interface was to enable third-party applications to communicate with Smartswitch using a complex API,
with a large number of functions, arguments, and mutual dependencies.
You need to involve a programmer to connect third-party applications through this interface.
The ICE interface contains all the APIs present in the REST interface.
However, besides this, the ICE interface contains many APIs that are not found in the REST interface.
Thus, the ICE interface can always be used instead of the REST interface.
However, the converse is not true.
- great features
- convenient to develop complex systems
- high entry threshold for the programmer.
- customized version of the admin web portal
- customized version of the user's web portal
- customized version of the company's web portal
- CRM systems, requiring close integration with Smartswitch
- sites requiring close integration with the Smartswitch
For details, see ICE API.
AMI¶
This is the lowest-level interface that allows third-party applications to access the details of making calls through Smartswitch.
It is not a replacement for the REST or ICE API, but complements them in cases when you need more control over the call or need to obtain call status events.
When connecting third-party applications through this interface, you need to involve a programmer.
The exception is if you connect a third-party application that was created to connect to Asterisk.
In this case, you can replace Asterisk with Smartswitch, without modifying this third-party application.
- customized web phone
- customized number pool calling system
- customized version of the admin web portal
- customized version of the user's web portal
- customized version of the company's web portal
- third-party CRM systems, requiring full control over the call
- third-party CRM systems supporting Asterisk
- sites that require full control over the call
For details, see AMI API