9. Provisioning interfaces

9.1. REST API
9.2. SOAP and XMLRPC API

The sip:carrier provides two kinds of provisioning interfaces for easy interconnection with 3rd party tools. The one recommended by Sipwise is the REST API, and the other (soon deprecated) one is SOAP and XMLRPC. Any new functionality is only added to the REST interface, so do not base any new development on SOAP or XMLRPC.

9.1. REST API

The sip:carrier provides a REST API to provision various functionality of the platform. The entry point - and at the same time the official documentation - is at https://<your-ip>:1443/api. It allows both administrators and resellers (in a limited scope) to manage the system.

You can either authenticate via username and password of your administrative account you’re using to access the admin panel, or via SSL client certificates. Find out more about client certificate authentication in the online api documentation.

9.2. SOAP and XMLRPC API

[Important]

SOAP and XMLRPC API are deprecated and disabled by default since mr3.6.1. Please consider using REST API as SOAP and XMLRPC API will be deleted in upcoming release(s). To enable SOAP and XMLRPC change /etc/ngcp-config/config.yml by setting ossbssfrontendfcgi and execute ngcpcfg apply.

The sip:carrier provides two (soon deprecated) XML based provisioning interfaces - SOAP and XMLRPC. The server provides online documentation about all the functions available. To access the online documentation for the first time, you need to follow the following instructions:

  • Generate a password for http access to the provisioning interfaces:
htpasswd -nbs myuser mypassword
[Note]

Also see man 1 htpasswd on how to generate crypt or MD5 passwords if you like. Of course you may use any other process to generate crypt, MD5 or SHA hashed passwords. But using htpasswd ensures the hashes are also understood by Nginx. To install htpasswd please run apt-get install apache2-utils on your system.

  • Edit /etc/ngcp-config/config.yml. Under section ossbsshtpasswd, replace user and pass with your new values and execute ngcpcfg apply as usual.
  • Access https://<ip>:2443/SOAP/Provisioning.wsdl and login with your new credentials.
[Note]

The default port for provisioning interfaces is 2443. You can change it in /etc/ngcp-config/config.yml by modifying ossbssapacheport and execute ngcpcfg apply.

[Important]

The displayed online API documentation shows all the currently available functionalities. Enabling or disabling features in /etc/ngcp-config/config.yml will directly reflect in the functions being available via the APIs.

[Important]

If your SOAP client throws errors because of the inline <documentation> tags (e.g. Visual Studio and the stock PHP SOAP client complain about this), try to use the WSDL URL https://<ip>:2443/SOAP/Provisioning.wsdl?plain instead, which supresses the output of these tags.