MOR API conflines update
Description
MOR API changes settings for API, Default User or Default Device.
Usage
- Call: /api/conflines_update
- Methods: POST, GET(if allowed, not recomended)
Parameters
Parameters which are included into hash:
- secret_key - API secret key. Required.
Parameters which are not included into hash:
- u - username for authentication. Required.
- allow_api - disable api (send 0 to disable). NOTE: you can enable API only in GUI.
- api_secret_key - change API secret key.
- default_user_password_length - positive number between 6 and 30 digits.
- default_user_credit - send -1 for unlimited, 0 and bigger for amount.
- default_user_balance - send any number to change Default User Balance.
- default_user_postpaid - send 0 for prepaid, 1 - postpaid.
- default_user_allow_loss_calls - send 0 for disabled, 1 - enabled.
- default_user_call_limit - send any positive number.
- default_user_time_zone - case sensitive name of the time zone. Send only name, for example: Atlantic Time (Canada).
- default_user_currency - 3 letters code of the currency
- default_user_quickforwards_rule_id - id of the quickforward DID rule.
- default_user_recording_enabled - send 0 for disabled, 1 - enabled.
- default_user_recording_forced_enabled - send 0 for disabled, 1 - enabled.
- default_device_call_limit - send positive number
- default_device_canreinvite - one of these values: yes, no, nonat, update, update,nonat.
- default_device_nat - one of these values: yes, no, force_rport, comedia.
- default_device_qualify - send no or value equal 1000 or more.
- default_device_grace_time - send positive number.
- default_device_audio_codecs - send the name of codecs you want to have enabled. The ones not mentioned, will be turned off. Available values: alaw, ulaw, g723, g726, g729, gsm, ilbc, lpc10, speex, sdpcm, slin.
- default_device_video_codecs - send the name of codecs you want to have enabled. The ones not mentioned, will be turned off. Available values: h261, h263, h263p, h264.
- hash - SHA1 hash constructed using parameters which are listed above. Note that parameters are shown in the same order as they have to be when generating the hash. Last parameter in a row is API_Secret_Key ( More described in Constructing hash). Required.
NOTE: reseller is not required to enable API. This method uses admin's API settings.
Request
HTML POST: http://<SERVER_IP>/billing/api/conflines_update?u=admin&api_secret_key=987654321&default_device_video_codecs=h263&default_device_audio_codecs=ilbc,speex&default_device_grace_time=111&default_device_qualify=2356
&default_device_nat=force_rport&default_device_canreinvite=update,nonat&default_device_call_limit=9985&default_user_recording_forced_enabled=0&default_user_recording_enabled=0&default_user_currency=EUR
&default_user_time_zone=Mountain Time (US %26 Canada)&default_user_call_limit=72&default_user_allow_loss_calls=0&default_user_postpaid=1&default_user_balance=102.65948&default_user_credit=-1&default_user_password_length=23&default_user_quickforwards_rule_id=0&hash=7c4a8d09ca3762af61e59520943dc26494f8941b
Returns
Success
<page> <status> <success>Conflines successfully updated</success> </status> </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> - access not allowed.
- <error>Device was not found</error> - Device id incorrect or does not exist.
- <error>default_user_password_length must be between 6 and 30</error>
- <error>default_user_credit must be positive number or -1 for infinity</error>
- <error>default_user_balance must be number</error>
- <error>default_user_postpaid must be 0 or 1</error>
- <error>default_user_allow_loss_calls must be 0 or 1</error>
- <error>default_user_credit must be positive integer</error>
- <error>default_user_time_zone name was not correct</error>
- <error>default_user_currency name was not correct</error>
- <error>default_user_currency name was not correct</error>
- <error>default_user_quickforwards_rule_id was not found</error>
- <error>default_user_recording_enabled must be 0 or 1</error>
- <error>default_user_recording_forced_enabled must be 0 or 1</error>
- <error>default_device_call_limit must be positive integer</error>
- <error>default_device_canreinvite can only be one of the following: 'yes', 'no', 'nonat', 'update', 'update,nonat'</error>
- <error>default_device_nat can only be one of the following: 'yes', 'no', 'force_rport', 'comedia'</error>
- <error>default_device_qualify can only be 'no' or >= 1000 integer</error>
- <error>default_device_grace_time must be positive integer</error>
- <error>allow_api must be 0 or 1</error>
- <error>api_secret_key length must be higher than 5</error>