MOR API did device assign

From Kolmisoft Wiki
Revision as of 13:11, 11 December 2012 by Admin (talk | contribs) (Created page with 'MOR API DID assign Device <br><br> ---- <br><br> * Call: /api/did_assign_device * Methods: POST, GET(if allowed, not recomended) * Params: ** did - DID number to be created '…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

MOR API DID assign Device




  • Call: /api/did_assign_device
  • Methods: POST, GET(if allowed, not recomended)
  • Params:
    • did - DID number to be created Required.
    • device_id - Device ID in MOR database, to be assigned for specified DID Required.
    • u - username to login. Required.
    • p - password to login. Required.
    • hash - SHA1 hash constructed using params and API_Secret_Key ( More described in Constructing hash). Required.
  • Returns:
    • Success
      • <status>Device assigned to DID</status>
    • Errors:
      • <error>Incorrect hash</error> - Hash was not correct. Check API_Secret_Key and order or params while concatenating hash_string.
      • <error>Don't be so smart</error> - Only Admin, Accountant or Reseller may use API.
      • <error>Device was not found</error> - Enter existing Device ID.
      • <error>Your are not authorized to use this Device</error> - Specified Device is not available to this user.
      • <error>You are not authorized to manage DIDs</error> - If Accountant or Reseller is using API, they should have all permissions to perform specified actions.
      • <error>DID does not exist</error> - Enter existing DID number.
      • <error>Invalid DID specified</error> - Enter a valid (numeric) DID number.
      • <error>Your are not authorized to use this DID</error> - Specified DID is not available to this user.
      • <error>DID is terminated</error> - DID is terminated and cannot be used.
      • <error>DID is not free</error> - DID is being used in a Dial Plan or another Device is already assigned.
      • <error>Device was not assigned</error>



Request

http://123.123.123.123/billing/api/device_create/u=admin&p=password&did=123456789&device_id=1&hash=bc2f114099d16656d37e45fd9e8744cb9386d462

  • admin - owner's username
  • password - owner's password
  • did - DID number
  • device_id - Device ID in MOR database, to be assigned for specified DID




           <page>
                 <status>Device assigned to DID</status>
           </page>
           <page>
                 <status>Device assigned to DID</status>
           </page>
  • Now we can view these changes in GUI through DID edit.

* Note that username and password are not included in hash