All Products
Search
Document Center

:QueryVoiceIntercom

Last Updated:Oct 25, 2023

Queries the voice intercom URL of an IP camera.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code for different SDKs.

Request parameters

Parameter

Type

Required

Example

Description

Action

String

Yes

QueryVoiceIntercom

The operation that you want to perform. Set the value to QueryVoiceIntercom.

Scheme

String

No

rtmp

The protocol that you want to use to establish a voice intercom session. Valid values:

  • ws: a WebSocket-based protocol. If you want to establish a voice intercom session between a web client and an IP camera, you can call the QueryVoiceIntercom operation to obtain a voice intercom URL for the web client.

  • rtmp (default): Real-Time Messaging Protocol (RTMP). If you want to establish a voice intercom session between an Android or iOS client and an IP camera, you can call the QueryVoiceIntercom operation to obtain a voice intercom URL for the Android or iOS client. For more information about how to establish a voice intercom session between an Android or iOS client and an IP camera, see Voice intercom for Android clients and Voice intercom for iOS clients.

IotInstanceId

String

No

iot-cn-n6w1y*****

The ID of the instance. You can view the ID of the instance on the Overview tab in the IoT Platform console.

Important
  • If your instance has an ID, you must specify the ID for this parameter. Otherwise, the call fails.

  • If no Overview tab or ID is generated for your instance, you do not need to configure this parameter.

For more information, see Overview.

ProductKey

String

No

a1BwAGV****

The ProductKey of the product to which the IP camera belongs.

To view information about all products of the current account, go to the Products page in the IoT Platform console or call the QueryProductList operation.

Important

If you specify a value for this parameter, you must configure the DeviceName parameter.

DeviceName

String

No

camera1

The DeviceName of the IP camera.

To view the DeviceName, go to the Devices page in the IoT Platform console.

Important

If you specify a value for this parameter, you must configure the ProductKey parameter.

IotId

String

No

C47T6xwp6ms4bNlkHRWCg4****

The ID of the IP camera. The ID is a unique identifier that is issued by IoT Platform to the IP camera. You can call the QueryDeviceDetail operation to obtain the ID.

Important

The IotId parameter specifies a globally unique identifier (GUID) for the device. The value of the IotId parameter is equivalent to a combination of the values of the ProductKey and DeviceName parameters. If you specify a value for the IotId parameter, you do not need to specify values for the ProductKey and DeviceName parameters. If you specify values for the IotId, ProductKey, and DeviceName, IotId parameters, the value of the IotId parameter takes precedence.

In addition to the preceding operation-specific request parameters, you must configure common request parameters when you call this operation. For more information about common request parameters, see Common parameters.

Response parameters

Parameter

Type

Example

Description

Code

String

200

The status code.

  • 200: The request was successful.

  • Other codes: The request failed. For more information about error codes, see the "Error codes" section of this topic.

Data

Struct

The information about the voice intercom URL of the IP camera.

CryptoKey

Struct

The decryption parameters.

Iv

String

MDEyMzQ1Njc4********0+Pw==

The initialization vector (IV) for decryption.

Key

String

bPvz6tnfonP1E+********v2Q==

The decryption key.

Url

String

rtmp://***.***.***.***:8000/talk?token=********

The voice intercom URL of the IP camera.

ErrorMessage

String

tenant auth error

The error message returned if the call fails.

RequestId

String

06DC77A0-4622-42DB-9EE0-25FIOHS82JK1

The ID of the request.

Success

Boolean

true

Indicates whether the call was successful.

  • true: The call was successful.

  • false: The call failed.

Examples

Sample requests

http(s)://linkvisual.cn-shanghai.aliyuncs.com/?Action=QueryVoiceIntercom
&IotId=C47T6xwp6ms4bNlkHRWCg4****
&IotInstanceId=iot-cn-n6w1y*****
&<Common request parameters>

Sample success responses

XML format

<QueryVoiceIntercomResponse>
  <RequestId>06DC77A0-4622-42DB-9EE0-25FIOHS82JK1</RequestId>
  <Data>
        <Url>rtmp://***.***.***.***:8000/talk?token=********</Url>
        <CryptoKey>
              <Iv>MDEyMzQ1Njc4****0+Pw==</Iv>
              <Key>bPvz6tnfonP1E+****2Q==</Key>
        </CryptoKey>
  </Data>
  <Code>200</Code>
  <Success>true</Success>
</QueryVoiceIntercomResponse>

JSON format

{
    "RequestId": "06DC77A0-4622-42DB-9EE0-25FIOHS82JK1",
    "Data": {
        "Url": "rtmp://***.***.***.***:8000/talk?token=********",
        "CryptoKey": {
            "Iv": "MDEyMzQ1Njc4****0+Pw==",
            "Key": "bPvz6tnfonP1E+****2Q=="
        }
    },
    "Code": "200",
    "Success": true
}

Error codes

For a list of error codes, see Service error codes.