VoIP:OpenAPI

From VTX Public Wiki

Revision as of 14:52, 27 September 2024 by Marc Leurent (talk | contribs) (Create PAGE)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

VoIP OpenAPI allows developers and CRM integrators to interact with a VPBX ( Virtual PBX ) to get realtime information and change some settings ( Presence Status, CDRs, Features, Push Event Notifications ) allowing to get realtime integration within any tool or dashboard

OpenAPI allows several cloud services to talk together, ex: to have the VoIP able to talk with a CRM System over an API

Introduction[edit | edit source]

Prerequisites[edit | edit source]

To be able to use the VoIP API service, you will need the following prerequisites

  1. VPBX Service: You need to subscribe to a VPBX service
  2. OpenAPI Credentials: You need to request Request an OPENAPI account ( Controlled Introduction + Friendly Adopter only for the time being )
  3. API Server Firewall Restriction: You need to give us the list of IPs that will use the account

API Feature List[edit | edit source]

  • CDRs: Call Data Record
    • Get user or customer past CDR
    • Get realtime push notification CDR at the end of calls => Allow Instant billing for CDRs
  • Users
    • Get CDRs
    • Get/Change/Delete Features ( Call Forwards, DND,
    • Get Presence Status
  • Subscriptions
    • See realtime notification subscriptions
    • Delete realtime notification subscriptions
    • Refresh notification subscriptions

Documentation[edit | edit source]

API Swagger Documentation (IP Restricted) : https://api.ipvoip.ch/openapi/swagger-ui/

Usage[edit | edit source]

Gather Needed Credentials and API Key[edit | edit source]

HTTP Credentials
Name Description Example
URL URL of the VOIP API service https://api.ipvoip.ch/openapi/v1/system/server
login HTTP Basic Auth Login openapi@123456.bus.ent
password HTTP Basic Auth Password HIDDEN
HTTP Header X-C5-Application Service PSK XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
Content-Type:

application/json

Content Type "Content-Type: application/json"

Test API Connection[edit | edit source]

mlr@nb-acs-mlr:[~]$ curl --netrc-file ~/.curl/openapi@123456.bus.ent.cnf --header "X-C5-Application: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX" -H "Content-Type: application/json" https://api.ipvoip.ch/openapi/v1/system/server 
{
  "buildCustomer" : "Release",
  "buildVersion" : "7.7.2.12",
  "buildNumber" : "1",
  "buildDate" : "2024-05-28T17:21:44+0200",
  "bulkLimitCommon" : 100,
  "bulkLimitAddUser" : 100,
  "bulkLimitAddAddressBookEntry" : 1000
}%