Difference between revisions of "MOR API did trunk device assign"

From Kolmisoft Wiki
Jump to navigationJump to search
(Created page with '=Descriptiom= MOR API Assign DID to Trunk Device <br><br> =Usage= * From '''MOR X12''' call: '''/api/did_trunk_device_assign''' * Methods: POST, GET(if allowed, not recomend…')
 
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
=Descriptiom=
=Description=
<!---This functionality is available from MOR X12-->
[[MOR API]] Assign DID to Trunk Device
[[MOR API]] Assign DID to Trunk Device
<br><br>
<br><br>
Line 9: Line 10:
===Parameters===
===Parameters===


Parameter which is '''included''' into hash:
Parameters which are '''included''' into hash:


* device_id - Trunk Device ID in MOR database, to be assigned for specified DID '''Required'''.
* did - DID number to which Trunk Device have to be assigned. '''Required'''.
* did - DID number to which Trunk Device have to be assigned. '''Required'''.
* device_id - Trunk Device ID in MOR database, to be assigned for specified DID '''Required'''.
 


Parameters which are '''not included''' into hash:
Parameters which are '''not included''' into hash:
Line 26: Line 28:
We send
We send


  HTML POST: http://<SERVER_IP>/billing/api/did_device_assign?u=username&did=123456789&device_id=1&hash=bc2f114099d16656d37e45fd9e8744cb9386d462
  HTML POST: http://<SERVER_IP>/billing/api/did_trunk_device_assign?u=username&did=123456789&device_id=1&hash=bc2f114099d16656d37e45fd9e8744cb9386d462


Now we can view these changes in GUI through DID edit.
Now we can view these changes in GUI through DID edit.
Line 75: Line 77:


* [[MOR API]]
* [[MOR API]]
* [[MOR API did device assign]]

Latest revision as of 05:36, 21 May 2018

Description

MOR API Assign DID to Trunk Device

Usage

  • From MOR X12 call: /api/did_trunk_device_assign
  • Methods: POST, GET(if allowed, not recomended)



Parameters

Parameters which are included into hash:

  • device_id - Trunk Device ID in MOR database, to be assigned for specified DID Required.
  • did - DID number to which Trunk Device have to be assigned. Required.


Parameters which are not included into hash:



Request

We have device_id = 1, did=123456789, API Secret Key = secret

We send

HTML POST: http://<SERVER_IP>/billing/api/did_trunk_device_assign?u=username&did=123456789&device_id=1&hash=bc2f114099d16656d37e45fd9e8744cb9386d462

Now we can view these changes in GUI through DID edit.



Returns

Success

<?xml version="1.0" encoding="UTF-8"?>
<page>
   <status>
      <success>Device assigned to DID</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.
  • Device was not found – Device ID does not exist in system.
  • DID was not found – DID number does not exist or incorrect.
  • Your are not authorized to use this Device – Specified Device is not available to this user.
  • You are not authorized to manage DIDs – If Accountant or Reseller is using API, they should have all permissions to perform specified actions.
  • Your are not authorized to use this DID – Specified DID is not available to this user.
  • DID is terminated – DID is terminated and cannot be used.
  • DID is not free – DID is being used in a Dial Plan or another Device is already assigned.
  • Device was not assigned – unknown error
  • DID must be reserved for a User
  • Device is not a Trunk




See also