All Products
Search
Document Center

Intelligent Media Services:Pass call startup parameters

Last Updated:Jul 04, 2025

This topic describes how to start an agent call by passing call parameters.

Before you begin

  • The following examples demonstrate how to start a call using the API without the UI.

  • You must integrate AICallKit SDK in advance. For more information, see Android, iOS, and Web.

Feature description

When starting a call, you can pass multiple parameters to control the agent's status and response results. The following table lists the parameters that you can pass.

Parameter list

Android

ARTCAICallAgentConfig

Parameter

Type

Description

agentGreeting

String

The greeting, which is the opening sentence presented by the agent immediately after a user joins the call. It can be up to 100 characters in length. If it is left empty, the agent's configuration is used.

wakeUpQuery

String

The wake-up word. This is a user-initiated command given before a call begins, designed to ensure the agent can respond as soon as the call starts.

agentMaxIdleTime

int

The maximum idle time that the agent can remain before it exits. Unit: seconds. Default value: 600.

userOnlineTimeout

int

The timeout period before a user joins the call. If the user does not join within this period, the agent exits the call. Unit: seconds. Default value: 60.

userOfflineTimeout

int

The timeout period after a user leaves the call. If the user does not return within this period, the agent exits the call. Unit: seconds. Default value: 5.

enablePushToTalk

boolean

Specifies whether to enable push-to-talk mode.

agentGracefulShutdown

boolean

Specifies whether to enable graceful shutdown. It means that the agent will complete broadcasting the current sentence before it stops.

volume

int

The volume at which the agent speaks.

  • Valid values: 0 to 400

  • Default value: 100

workflowOverrideParams

String

The workflow override parameter.

enableIntelligentSegment

boolean

Specifies whether to enable intelligent sentence segmentation.

asrConfig

ARTCAICallAgentAsrConfig

The ASR configuration.

ttsConfig

ARTCAICallAgentTtsConfig

The TTS configuration.

llmConfig

ARTCAICallAgentLlmConfig

The LLM configuration.

avatarConfig

ARTCAICallAgentAvatarConfig

The avatar agent configuration.

interruptConfig

ARTCAICallAgentInterruptConfig

The interruption configuration.

voiceprintConfig

ARTCAICallAgentVoiceprintConfig

The voiceprint configuration.

turnDetectionConfig

ARTCAICallAgentTurnDetectionConfig

The turn detection configuration.

experimentalConfig

JSONObject

The experimental configuration.

iOS

ARTCAICallAgentConfig

Parameter

Type

Description

agentGreeting

String?

The greeting, which is the opening sentence presented by the agent immediately after a user joins the call. If it is left empty, the agent's configuration is used.

wakeUpQuery

String?

The wake-up word. This is a user-initiated command given before a call begins, designed to ensure the agent can respond as soon as the call starts.

agentMaxIdleTime

Int32

The maximum idle time that the agent can remain before it exits. Unit: seconds. Default value: 600.

userOnlineTimeout

Int32

The timeout period before a user joins the call. If the user does not join within this period, the agent exits the call. Unit: seconds. Default value: 60.

userOfflineTimeout

Int32

The timeout period after a user leaves the call. If the user does not return within this period, the agent exits the call. Unit: seconds. Default value: 5.

enablePushToTalk

Bool

Specifies whether to enable push-to-talk mode.

agentGracefulShutdown

Bool

Specifies whether to enable graceful shutdown.

volume

Int32

The volume at which the agent speaks.

  • Valid values: 0 to 400

  • Default value: 100

workflowOverrideParams

[String: Any]?

The workflow override parameter.

enableIntelligentSegment

Bool

Specifies whether to enable intelligent sentence segmentation.

asrConfig

ARTCAICallAgentAsrConfig

The ASR configuration.

ttsConfig

ARTCAICallAgentTtsConfig

The TTS configuration.

llmConfig

ARTCAICallAgentLlmConfig

The LLM configuration.

avatarConfig

ARTCAICallAgentAvatarConfig

The avatar agent configuration.

interruptConfig

ARTCAICallAgentInterruptConfig

The interruption configuration.

voiceprintConfig

ARTCAICallAgentVoiceprintConfig

The voiceprint configuration.

turnDetectionConfig

ARTCAICallAgentTurnDetectionConfig

The turn detection configuration.

experimentalConfig

[String: Any]?

The experimental configuration.

Web

AICallAgentConfig

Parameter

Type

Description

agentGreeting

string?

The greeting, which is the opening sentence presented by the agent immediately after a user joins the call. It can be up to 100 characters in length. If it is left empty, the agent's configuration is used.

wakeUpQuery

string?

The wake-up word. This is a user-initiated command given before a call begins, designed to ensure the agent can respond as soon as the call starts.

agentMaxIdleTime

number

The maximum idle time that the agent can remain before it exits. Unit: seconds. Default value: 600.

userOnlineTimeout

number

The timeout period before a user joins the call. If the user does not join within this period, the agent exits the call. Unit: seconds. Default value: 60.

userOfflineTimeout

number

The timeout period after a user leaves the call. If the user does not return within this period, the agent exits the call. Unit: seconds. Default value: 5.

enablePushToTalk

boolean

Specifies whether to enable push-to-talk mode.

agentGracefulShutdown

boolean

Specifies whether to enable graceful shutdown, allowing the agent to complete broadcasting the current sentence before stopping.

volume

number

The volume at which the agent speaks.

  • Valid values: 0 to 400

  • Default value: 100

workflowOverrideParams

JSONObject

The workflow override parameter.

enableIntelligentSegment

boolean

Specifies whether to enable intelligent sentence segmentation.

asrConfig

AICallAgentAsrConfig

The ASR configuration.

ttsConfig

AICallAgentTtsConfig

The TTS configuration.

llmConfig

AICallAgentLlmConfig

The LLM configuration.

avatarConfig

AICallAgentAvatarConfig

The avatar agent configuration.

interruptConfig

AICallAgentInterruptConfig

The interruption configuration.

voiceprintConfig

AICallAgentVoiceprintConfig

The voiceprint configuration.

turnDetectionConfig

AICallAgentTurnDetectionConfig

The turn detection configuration.

experimentalConfig

JSONObject

The experimental configuration.

Implementation

Android

Create an ARTCAICallConfig object and set its parameters. For more information, see ARTCAICallAgentConfig.

ARTCAICallEngine.ARTCAICallConfig artcaiCallConfig = new ARTCAICallEngine.ARTCAICallConfig();
artcaiCallConfig.agentId = "XXX";            // Specify the agent ID, required.
artcaiCallConfig.region = "cn-shanghai";// Specify the agent region, required.
artcaiCallConfig.agentType = VoiceAgent;// Specify the agent type: voice, avatar, vision, or video.
artcaiCallConfig.agentConfig.agentGreeting = "Hello, I am Xiao Yun from ApsaraVideo";//// Set the greeting.
artcaiCallConfig.agentConfig.agentMaxIdleTime = 600;// Set the idle waiting time.
artcaiCallConfig.agentConfig.asrConfig.vadLevel = 3;// Set the AIVad sensitivity parameter to minimize human voice interference.
engine.init(artcaiCallConfig);
engine.call(token);

iOS

Create an ARTCAICallConfig object and set its parameters. For more information, see ARTCAICallAgentConfig.

let callConfig = ...   // Create and initialize ARTCAICallConfig by referring to the documentation.

let agentConfig = ARTCAICallAgentConfig()         // Create an ARTCAICallAgentConfig object.
agentConfig.agentGreeting = "Hello, I am Xiao Yun from ApsaraVideo"  // Set the greeting.
agentConfig.agentMaxIdleTime = 600                // Set the idle waiting time.
agentConfig.asrConfig.asrMaxSilence = 400         // Set the maximum silence time for ASR.
agentConfig.asrConfig.vadLevel = 3                // Set the AIVad sensitivity parameter to minimize human voice interference.
...                                                  // Set parameters according to business needs.
callConfig.agentConfig = agentConfig
self.engine.call(config: callConfig)                 // Initiate a call.

Web

Create an AICallConfig object and set its parameters. For more information, see AICallAgentConfig.

const callConfig = {};                               // Create and initialize AICallConfig by referring to the documentation.
const agentConfig = new AICallAgentConfig();         // Create an AICallAgentConfig object.
agentConfig.agentGreeting = "Hello, I am Xiao Yun from ApsaraVideo";  // Set the greeting.
agentConfig.agentMaxIdleTime = 600;                  // Set the idle waiting time.
agentConfig.asrConfig.asrMaxSilence = 400;                     // Set the maximum silence time for ASR.
agentConfig.asrConfig.vadLevel = 3;                            // Set the AIVad sensitivity parameter to minimize human voice interference.
// ...                                                  // Set parameters according to business needs.
callConfig.agentConfig = agentConfig;
engine1.callWithConfig(callConfig);                   // Initiate a call.