centralita-virtual

VoIPer API calls

VoIPer has a wide range of tools to integrate the virtual PBX with external systems. First of all there are a series of APIs based on web services; This means that your system can make requests to ours over the Internet.

The APIs allow you to integrate our telephone services, virtual number, switchboard, etc. in your applications on PC, in mobile apps or on your website.

The free VoIPer API interface is included in the VoIPer virtual switchboard service.

It includes all the basic functions for operation.

Description of the Voiper Calling API

There are two types of VoIPer call APIs, one to make calls that we call “outbound” and another to notify the incoming calls that we call “inbound”.

The “outbound” API consisting of an HTTP POST request over TLS to the VoIPer server, authentication is required to be able to use it.

The “inbound” API has methods to establish the “PUSH” notification URL in the system and for the server to notify the incoming calls. Authentication is only required to set the URL.

To use any API, the username and password will be provided by VoIPer customer service as a security measure.

URL Webservice

Name Obligatory Default value Description
Source yes Extension number or telephone that originates the call.
Destination yes Extension or telephone number that receives the call.
Dbi yes The telephone number configured as the gateway in the VOBX or SIP Trunk service. Call signalling number. If the indicated number does not belong to the customer, it will be replaced by the default value
Timeout No 60 seconds Ringing seconds of the call.

Endpoint return

As long as the request is correctly processed, regardless of the result of the call, it will return a 200 Ok, otherwise it will return a 422 Un-processable Entity. It can also return a 500 Server Error in case of a badly formed HTTP request. The push notification can be done to the client’s server in HTTP and HTTPS, regardless of the validity of the client’s certificate.

The content of the response will always be in JSON.
Example of a 200 Ok response to an answered call….
{«Response»: »Error», »message»: »Originate failed»}
Example of a 422 Un-processable Entity

Example of invocation of endpoint with curl

/usr/bin/curl -v -X POST –user “usuario:contraseña” –data “source=100&destination=600600600&ddi=900900900&timeout=30”
https://test.panel.voiper.es/api/calls

PATCH /api/calls/push

Invocation parameters

Name Obligatory Default value Description
Extension yes Extension number from which incoming calls will be notified.
Url No URL where the http request of the PUSH notification will be made. If it is an empty value, the notification will be aborted.
Data No POST information that will be sent along with the HTTP request.

Endpoint return

As long as the request is correctly processed it will return a 200 Ok, otherwise it will do so with a 422 Un-processable Entity. It can also return a 500 Server Error in case of a badly formed HTTP request.

The content of the response will always be in JSON.

200 Ok response examples
{“status”:”Ok”}

422 Un-processable Entity Response Example
{“status”:”error”,”error”:”…[descripción del error]…”}

Example of invocation of endpoint with curl

/usr/bin/curl -v -X PATCH –user “usuario:contraseña” –data “extension=100&url=http://midominio.es/directoriosecreto/push.php&data=extension=[extension]&caller=[caller]”

https://test.panel.voiper.es/api/calls

This invocation of the Endpoint will create an HTTP request to http://mydomain.es/directoriosecreto/push.php with the POST content “extension = 100 & caller = 900900900” each time a structure like “name = Client name, S.L.” which will be passed to the phone screen.

If you want to try a Voiper Switchboard for a 30-day free trial, fill out the form and one of our advisors will contact you as soon as possible.

    Menu
    Contacta con nosotros

    VoIPer es líder en telefonía IP para empresas. Con nosotros, aumentará las funcionalidades en las comunicaciones de su empresa, reduciendo los costes hasta un 90%.

      ×
      Contact us

      VoIPer is the leader in business IP telephony. With us, you will increase the functionalities in your company’s communications, reducing costs up to 90%.

        ×