Difference between revisions of "MOR API provider update"

From Kolmisoft Wiki
Jump to navigationJump to search
(Created page with "=Description= MOR API for updating providers. <br><br> =Usage= * From '''MOR X17''' call: '''/api/provider_update''' * Methods: POST, GET(if allowed, not recomended) <br><br> ===Parametres=== * u - username to login. '''Required'''. * provider_id - Selects Provider '''Required'''. * active - 1 for active, 0 for not active * name - Provider's name, must be unique * dtmfmode - DTMF Mode, accepted values [inband, info, rfc2833, auto], * if ccl is active and Provider...")
 
 
(2 intermediate revisions by one other user not shown)
Line 24: Line 24:
* tariff_id - Tariff to use, can be any Provider Tariff (tariffs.purpose == 'provider')
* tariff_id - Tariff to use, can be any Provider Tariff (tariffs.purpose == 'provider')
* server_ids - Asterisk Servers, must be in following format "1,3,4"
* server_ids - Asterisk Servers, must be in following format "1,3,4"
* login - Authentication Login/Username ("anonymous" and "unknown" are not allowed)
* password - Authentication Password
* register - Authentication Register, 0 - Not register, 1 - Register
* if Network related type is Dynamic, Register is automatically set to 0
* cid_name - Provider CallerID Name
* cid_number - Provider CallerID Number
* network_type - Network related type, accepted values [hostname ip dynamic]
* server_ip - Network related Hostname
* if Network related type is Dynamic, Hostname is automatically set to 'dynamic'
* ipaddr - Network related Server IP
* if Network related type is Dynamic, Server IP is automatically set to blank
* port - Network related Port, any integer value which is higher than 0
* if Network related type is Dynamic, Port is automatically set to 0
* fromdomain - SIP Specific Fromdomain
<br><br>
<br><br>
===Request===
===Request===
If API Secret Key = secret
If API Secret Key = secret
Line 32: Line 47:
  HTML POST: http://<SERVER IP>/billing/api/provider_update?u=admin&provider_id=7&name=Test3221&hash=e5e9fa1ba31ecd1ae84f75caaa474f3a663f05f4
  HTML POST: http://<SERVER IP>/billing/api/provider_update?u=admin&provider_id=7&name=Test3221&hash=e5e9fa1ba31ecd1ae84f75caaa474f3a663f05f4


'''* Note that username (u) is not included in the hash'''
<br><br>
<br><br>
===Returns===
===Returns===



Latest revision as of 09:13, 25 October 2023

Description

MOR API for updating providers.




Usage

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



Parametres

  • u - username to login. Required.
  • provider_id - Selects Provider Required.
  • active - 1 for active, 0 for not active
  • name - Provider's name, must be unique
  • dtmfmode - DTMF Mode, accepted values [inband, info, rfc2833, auto],
  • if ccl is active and Provider is SIP, then accepted values are [rfc2833, auto]
  • location_id - Any Location (locations) by owner (locations.user_id)
  • timeout - Ringing Timeout, any integer value which is equal to 30 or higher
  • max_timeout - Call Timeout, any integer value which is equal to 0 or higher
  • call_limit - Call Limit, any integer value which is equal to 0 or higher
  • balance_limit - Balance limit, any decimal value (value separated by dot ".")
  • tariff_id - Tariff to use, can be any Provider Tariff (tariffs.purpose == 'provider')
  • server_ids - Asterisk Servers, must be in following format "1,3,4"
  • login - Authentication Login/Username ("anonymous" and "unknown" are not allowed)
  • password - Authentication Password
  • register - Authentication Register, 0 - Not register, 1 - Register
  • if Network related type is Dynamic, Register is automatically set to 0
  • cid_name - Provider CallerID Name
  • cid_number - Provider CallerID Number
  • network_type - Network related type, accepted values [hostname ip dynamic]
  • server_ip - Network related Hostname
  • if Network related type is Dynamic, Hostname is automatically set to 'dynamic'
  • ipaddr - Network related Server IP
  • if Network related type is Dynamic, Server IP is automatically set to blank
  • port - Network related Port, any integer value which is higher than 0
  • if Network related type is Dynamic, Port is automatically set to 0
  • fromdomain - SIP Specific Fromdomain



Request

If API Secret Key = secret

You send:

HTML POST: http://<SERVER IP>/billing/api/provider_update?u=admin&provider_id=7&name=Test3221&hash=e5e9fa1ba31ecd1ae84f75caaa474f3a663f05f4



Returns

Success

<?xml version="1.0" encoding="UTF-8"?>
<page>
 <status>
   <success>Provider updated</success>
 </status>
</page>


See also