M4 API cp update
From Kolmisoft Wiki
Revision as of 12:40, 7 November 2022 by Dmitrij (talk | contribs) (Created page with "=Description= M4 API Device (Connection Point) update <br><br> =Usage= * Call: '''/api/cp_update''' * Methods: POST, GET(if allowed, not recommended) <br><br> ===Parameters=== * u - username for authentication. '''Required'''. * cp_id – connection point id. '''Required'''. General: * description * switch_model Timeouts: * progress_timeout * timeout - ringing timeout value * max_timeout Authentication(kolkas tik Simple): * host - ip address * tech_prefix * port...")
Description
M4 API Device (Connection Point) update
Usage
- Call: /api/cp_update
- Methods: POST, GET(if allowed, not recommended)
Parameters
- u - username for authentication. Required.
- cp_id – connection point id. Required.
General:
- description
- switch_model
Timeouts:
- progress_timeout
- timeout - ringing timeout value
- max_timeout
Authentication(kolkas tik Simple):
- host - ip address
- tech_prefix
- port
- any_port - Possible values are "no" and "port"
Origination Point:
- op - act as origination point - 0,1
- op_active - 0,1
- op_capacity - Capacity(Call limit)
- op_routing_algorithm - lcr, weight, percent, by_dialpeer, quality
- quality_routing_id - option is usable when quality is chosen as op_routing_algorithm
- op_routing_group_id - routing group
Termination Point:
- tp - act as termination point - 0,1
- tp_active - 0,1
- tp_dst_transformation - Destination transformation
- tp_source_transformation - Source transformation
- tp_capacity - Capacity(Call limit)
CallerID:
- cid_name
- cid_number
- callerid_number_pool_id
- callerid_number_pool_type - random, pseudorandom
- callerid_number_pool_deviation
Advanced Settings:
- grace_time
- cps_call_limit
- cps_period
Request
We have API Secret Key = 456789, cp_id = 11
We send:
HTML POST: http://<SERVER_IP>/billing/api/cp_update?u=admin&cp_id=11&description=test3&port=5062&hash=65fd575c441513bd114b84c7dbdb01e0f2716d27
* Note that username is not included in hash
Returns
Success
<?xml version="1.0" encoding="UTF-8"?> <page>
<status> <status>Connection Point's settings updated</status> </status>
</page>