From Kolmisoft Wiki

Jump to: navigation, search


[edit] Description


Please note that admin/reseller can create CLI just for their own Users Devices.

[edit] Usage

  • Call: /api/cli_add

[edit] Parametres

  • u – username to login. Required.
  • cli_number – this specifies CLI number which will be added. Required If cli_domain is empty.
  • cli_domain - domain of CLI. Required If cli_number is empty. It is not included into hash.
  • cli_description – description of CLI
  • comment – comment of CLI
  • banned – banned (1) or not banned (0).
  • ivr_id – id of the IVR.
  • device_id – id of device this CLI should be assigned to. Required.
  • hash - SHA1 hash constructed using parameters above and API_Secret_Key ( More described in Constructing hash). Required.

Returning XML is put in file. That file is gziped and returned as a response content.

[edit] Request

We have API Secret Key = 456789, cli_number = 12345, device_id = 2 and CLI should be banned.
We send:

HTML POST: http://<server_ip>/billing/api/cli_add?u=admin&cli_number=1234678&cli_description=description&comment=comment&ivr_id=2&banned=1&device_id=2&test=1&hash=1ba6df6ad2532aea7ca035be29b7dd63feb1df88

* Note that username and password are not included in hash

[edit] Returns


      <status>CLI successfully created</status>


  • <error>CLI must be numeric</error> – CLI must be numeric.
  • <error>CLI already exists. It is assigned to user_name device</error> - such CLI is already created and belongs to the user that is mention in this error notice.
  • <error>CLI Number cannot be empty</error> - CLI number must be specified.
  • <error>IVR was not found</error> - if IVR parameter is used, IVR id must be also specified.
  • <error>Device ID cannot be empty</error> - device id must be specified.
  • <error>Access Denied</error> – User was not found by username and password. Use correct username and password. Make sure that username (u) and password (p) are specified.
  • <error>You are not authorised to use this functionality</error> - accountant needs to have Manage Device permissions.
  • <error>Incorrect hash</error> – Hash was not correct. Check API_Secret_Key and order or params while concatenating hash_string.

[edit] See also

Personal tools


Try M2