Difference between revisions of "MOR API dids get"
From Kolmisoft Wiki
Jump to navigationJump to search
Line 41: | Line 41: | ||
<page> | <page> | ||
<dids> | <dids> | ||
<did> | |||
<did> | <did>37066xxxxxx</did> | ||
<provider>Test Provider</provider> | <provider>Test Provider</provider> | ||
<language> | <language>language</language> | ||
<status> | <status>Active</status> | ||
<owner> | <reseller>Test Reseller</reseller> | ||
<device></device> | <owner>User Resellers</owner> | ||
<device>IAX2/105</device> | |||
<dial_plan></dial_plan> | <dial_plan></dial_plan> | ||
<simultaneous_call_limit>Unlimited</simultaneous_call_limit> | <simultaneous_call_limit>Unlimited</simultaneous_call_limit> | ||
<tone_zone></tone_zone> | <tone_zone>it</tone_zone> | ||
<id>6501</id> | |||
</did> | </did> | ||
<did> | <did> | ||
<did> | <did>37066xxxxxx</did> | ||
<provider>Test Provider</provider> | <provider>Test Provider</provider> | ||
<language> | <language></language> | ||
<status> | <status>Active</status> | ||
< | <reseller>Test Reseller</reseller> | ||
<device></device> | <device></device> | ||
<dial_plan></dial_plan> | <dial_plan>testDialPlan (authbypin)</dial_plan> | ||
<simultaneous_call_limit>Unlimited</simultaneous_call_limit> | <simultaneous_call_limit>Unlimited</simultaneous_call_limit> | ||
<tone_zone></tone_zone> | <tone_zone></tone_zone> | ||
<id>6502</id> | |||
</did> | </did> | ||
</dids> | </dids> |
Revision as of 11:46, 6 May 2015
Description
MOR API DIDs get
Usage
- Call: /api/dids_get
- Methods: POST, GET(if allowed, not recomended)
Parametres
- hash - SHA1 hash constructed using API_Secret_Key ( More described in Constructing hash). Required.
- u - username for authentication. Required.
- search_did_number - DID number
- search_status - free, reserved, active, closed, terminated
- search_did_owner - text
- search_dialplan - dialplan_id
- search_user - user_id
- search_device - device_id
- search_provider - provider_id
- search_language - word which is used in DIDs configuration as languege
- search_hide_terminated_dids - 1 - hide, 0 - show
Request
We have search_status = free, API Secret Key = secret
We send:
HTML POST: http://<SERVER_IP>/billing/api/dids_get?u=admin&search_status=free&hash=6e79d4a82f68102f43be11d873177f47817f84df
- Now we can find free DIDs in GUI DIDs list.
* Note that username are not included in hash
Returns
Success
<?xml version="1.0" encoding="UTF-8"?> <page> <dids> <did> <did>37066xxxxxx</did> <provider>Test Provider</provider> <language>language</language> <status>Active</status> <reseller>Test Reseller</reseller> <owner>User Resellers</owner> <device>IAX2/105</device> <dial_plan></dial_plan> <simultaneous_call_limit>Unlimited</simultaneous_call_limit> <tone_zone>it</tone_zone> <id>6501</id> </did> <did> <did>37066xxxxxx</did> <provider>Test Provider</provider> <language></language> <status>Active</status> <reseller>Test Reseller</reseller> <device></device> <dial_plan>testDialPlan (authbypin)</dial_plan> <simultaneous_call_limit>Unlimited</simultaneous_call_limit> <tone_zone></tone_zone> <id>6502</id> </did> </dids> </page>
Errors
- <error>Incorrect hash</error> - Hash was not correct. Check API_Secret_Key and order or params while concatenating hash_string.
- <error>Access Denied</error> - User with UNIQUEHASH not found or params id not send. Enter correct id.
- <error>No DIDs found</error> - No DIDs found
Example:
<?xml version="1.0" encoding="UTF-8"?> <page> <error>Error message</error> </page>