MOR API did close

From Kolmisoft Wiki
Jump to navigationJump to search

Description

MOR API Changes DID status to Closed.

Usage

  • Call: /api/did_close
  • Methods: POST, GET(if allowed, not recomended)



Parametres (in this order only)



Request

We want close DID which dids_id = 1.

We send:

HTML POST: http://<SERVER_IP>/billing/api/did_close?u=admin&dids_id=1&hash=bc2f114099d16656d37e45fd9e8744cb9386d462

NOTE: only dids_id used for hash generation

Returns

Success

<?xml version="1.0" encoding="UTF-8"?>
<page>
  <status>
     <success>DID successfully closed</success>
  </status>
</page>




Errors

<?xml version="1.0" encoding="UTF-8"?>
<page>
  <status>
     <error>Error message</error>
  </status>
</page>

Error messages:

  • Incorrect hash – Hash was not correct. Check API_Secret_Key and order or params while concatenating hash_string.
  • Access Denied – Only Admin, Accountant or Reseller may use API.
  • DID is assigned to Dial Plan.
  • DID is not assigned to Device.
  • DID was not found.
  • DID is already closed.