Update Codec Setting
Update the codec configuration for a tenant.
Request URL
PUT {base_url}/uc-cconfig/api/v1/sip-setting/codec
Request parameters
- Headers
-
Parameter Required Type Description Authorization Yes String The access token used for authentication. Format: Bearer
{access_token}.x-tenant-code Yes String The tenant name. Note: You can obtain tenant name using the Query Tenants interface.
- Body parameters
-
Parameter Required Type Description codecConfig No Object<Codec_Configuration> The codec configuration.
- Codec_Configuration
-
Parameter Required Type Description audioCodecs No Object<Codec_List> The codecs used for audio calls. audioCodecsWifi No Object<Codec_List> The codecs used for audio calls over Wi-Fi via NovoOne Mobile Client. audioCodecsCellular No Object<Codec_List> The codecs used for audio calls over cellular network via NovoOne Mobile Client.
- Codec_List
-
Parameter Required Type Description codecs Yes Array<String> The codecs to enable for the corresponding call type. Note: You can obtain the available codecs using the Get Codec Options interface.
Response parameters
| Parameter | Type | Description |
|---|---|---|
| requestId | String | The unique ID of the request, which can be used to quickly locate the request. |
| code | String | The HTTP status code of the request.
|
| message | String | The status message of the request. |
| detailMessage | String | The detailed error information. When the request is successful, this parameter returns empty. |
| result | Object<Codec_Configuration> | The codec configuration for the tenant. |
- Codec_Configuration
-
Parameter Type Description codecConfig Object<Codec_Detail> The codec configuration.
- Codec_Detail
-
Parameter Type Description audioCodecs Object<Codec_List> The codecs used for audio calls. audioCodecsWifi Object<Codec_List> The codecs used for audio calls over Wi-Fi via NovoOne Mobile Client. audioCodecsCellular Object<Codec_List> The codecs used for audio calls over cellular network via NovoOne Mobile Client.
- Codec_List
-
Parameter Type Description codecs Array<String> The codecs enabled for the corresponding call type.
Example
Request example
PUT /uc-cconfig/api/v1/sip-setting/codec HTTP/1.1
Host: api.cn.novoone.com
Authorization: Bearer eyJraWQiOiJjbi0wLWtleS0xIiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiJkaXN0cmlidXRvcmV4YW1wbGVAb3V0bG9vay5jb20iLCJncmFudF90eXBlIjoib3BlbmFwaSIsImNsaWVudF9leHQiOnsiZGVzY3JpcHRpb24iOiLnrKzkuInmlrnlkIjkvZzkvJnkvLTlupTnlKgiLCJwYXJ0bmVyIjoi56S65L6L5ZCI5L2c5LyZ5Ly0In0sImNsaWVudF90eXBlIjoib3BlbmFwaSIsImV4cCI6MTc5MDY2NjQ5MSwiaWF0IjoxNzkwNjQ0ODkxLCJqdGkiOiI3NDM2MWEwZC1kNzJmLTRlZjctYjQ2Zi1mODEwYjRmNWQ0NWIiLCJjbGllbnRfaWQiOiJub3ZvLW9wZW4tcGxhdGZvcm0iLCJ1c2VyX2V4dCI6eyJyb2xlSWRzIjpbM10sInN0eXBlIjoiQURNSU4iLCJ0ZW5hbnRDb2RlIjpudWxsLCJ0eXBlIjoiUF9BQ0NPVU5UIiwidXNlcklkIjozMDc2OTEzNjQ0OTE1OTk4NzIwLCJlbWFpbCI6ImRpc3RyaWJ1dG9yZXhhbXBsZUBvdXRsb29rLmNvbSIsInVzZXJuYW1lIjoiZGlzdHJpYnV0b3JleGFtcGxlQG91dGxvb2suY29tIiwidWNJZCI6MzA3NjkxMzY0NDg5MDgzMjg5Nn19.zyCrspAIuTTEggTUAc3cLDqZYlWrbPKq4sNau5m2YW3mGqemuufeRMzvneF-aDpLKxN8BzXL5zxeR0XPySoLqmz5WSBAjxWyev3mCLew8cMKArusR9rTRyMKRl-h_DfYj0fAWjOr498KZPKUYMLr0iXnJYzg45Lqwz2zntMLSCpDQhbHnrGDXIVGasY1pOI0cmm8PEpCYD0GsyOxccpyKFZ0pFMfmjYP2e9fnB3deEGPg01tfDTnMYP0AgfoyzMb-D1ULzhuS3YFjvkjpQoaQy0nLLTlW0aQXSG5gIkDTDrcAx07jsgNOOVxFllp2XgGoGPnhgvvvpzIWK82M1norQ
Content-Type: application/json
{
"codecConfig": {
"audioCodecs": {
"codecs": [
"OPUS",
"PCMU",
"PCMA",
"G722",
"G729"
]
}
}
}
Response example
HTTP/1.1 200 OK { "requestId": "124d91465af4f35092a87aa0b7dc0913", "code": "200", "message": "SUCCESS", "detailMessage": "", "result": { "codecConfig": { "audioCodecs": { "codecs": [ "OPUS", "PCMU", "PCMA", "G722", "G729" ] }, "audioCodecsWifi": { "codecs": [ "OPUS", "PCMU", "PCMA", "G722", "G729" ] }, "audioCodecsCellular": { "codecs": [ "OPUS", "PCMU", "PCMA", "G722", "G729" ] } } } }