tencent cloud

Cloud Contact Center

Announcement
What's New
Cloud Contact Center Terminology Update
What is Tencent Cloud Contact Center
Overview
Feature List
Terms Introduction
Handling Firewall Restrictions
AI Voicebot
Billing Guide
Voice Call Billing Overview
Desk Billing Overview
View Billing
Refund Policy
New User Guide
Voice Guide
Desk Guide
Use Case
Inbound: Customer Experience
Outbound: Telemarketing
Auto Dialer: Voice Notification
Integration Use Case (SDK)
Administrator Guide
Voice Guide
Desk Guide
Member Guide
Voice Guide
Desk Guide
AI Voice Agent Guide
Introducing AI Voice Agent
AI Voice Agent Practical Tutorial
Set Up Your AI Voice Agent
Activate AI Voice Agent Call
AI Voice Agent Call Logs
Developer Guide
SDK Development Guide
Data Push
Voice API Reference
History
Introduction
API Category
Making API Requests
Agent APIs
Skill Group APIs
Number APIs
Dual Call APIs
Predictive Outbound Call APIs
SIP Phone APIs
Call Service Record APIs
Billing APIs
Other APIs
Outbound Call APIs
Speech Intelligent Agent APIs
Data Types
Error Codes
Desk API Reference
API Reference
Callback Configuration
FAQs
Data Deletion Guide
Legal
Privacy Policy
Data Processing And Security Agreement
Service Level Agreements
TENCENT CLOUD CONTACT CENTRE TERMS OF USE
Glossary
Contact Us

Web

PDF
フォーカスモード
フォントサイズ
最終更新日: 2024-04-01 18:09:01

Step 1: Initialize the SDK

Please refer to Initializing SDK.
Note
The following steps should be performed after the 'tccc.events.ready' event is successful.

Step 2: Implement Clicking Button to Trigger SDK Outbound Call

Vue
React
Native JS
<template>
<button @click="sdkCall">One-click outbound call</button>
</template>
<script>
export default {
data() {
phoneNumber: '19999999999' // Replace it with a real outbound number
},
methods: {
sdkCall() {
window.tccc.Call.startOutboundCall({
phoneNumber: this.phoneNumber,
}).then((res) => {
this.sessionId = res.data.sessionId;
}).catch((err) => {
const error = err.errorMsg;
})
}
}
}
</script>
import { useState } from 'react';
export function CallButton() {
const [phoneNumber, setPhoneNumber] = useState('19999999999') // Replace it with a real outbound number

function sdkCall(phoneNumber) {
window.tccc.Call.startOutboundCall({
phoneNumber,
}).then((res) => {
this.sessionId = res.data.sessionId;
}).catch((err) => {
const error = err.errorMsg;
})
}

return (
<button onClick={sdkCall}>One-click outbound call</button>
)
}
<button id="call">One-click outbound call</button>
<script>
function sdkCall(phoneNumber) {
window.tccc.Call.startOutboundCall({
phoneNumber, // Outbound number
phoneDesc: 'Tencent' // Remarks, which will replace the display of the number on the call bar
}).then((res) => {
// Outbound call succeeded. Obtain the outbound ID, which can be used to query related call recordings and service records
const sessionId = res.data.sessionId
}).catch((err) => {
// Outbound call failed. Obtain the failure reason for prompt
console.error(err.errMsg)
})
}
// Listen to the click event of the button and trigger the outbound call method
document.getElementById('call').addEventListsner('click', () => {
// Replace it with a real outbound number
sdkCall('19999999999');
})
</script>
After the outbound call is successfully triggered, wait for the other party to answer and trigger related events in turn.

Outbound Call Event Process









ヘルプとサポート

この記事はお役に立ちましたか?

フィードバック