着信コールを受ける
このコード・スニペットでは、着信コールを受信する方法を示している。
例
Prerequisites
Run your code
Save this file to your machine and run it:
Prerequisites
Add the following to build.gradle:
implementation 'com.vonage:server-sdk-kotlin:2.1.1'
implementation 'io.ktor:ktor-server-netty'
implementation 'io.ktor:ktor-serialization-jackson'Run your code
We can use the アプリケーション plugin for Gradle to simplify the running of our application. Update your build.gradle with the following:
apply plugin: 'application'
mainClassName = project.hasProperty('main') ? project.getProperty('main') : ''Run the following gradle command to execute your application, replacing com.vonage.quickstart.kt.voice with the package containing ReceiveInboundCall:
Prerequisites
Add the following to build.gradle:
implementation 'com.vonage:server-sdk:9.3.1'
implementation 'com.sparkjava:spark-core:2.9.4'Run your code
We can use the アプリケーション plugin for Gradle to simplify the running of our application. Update your build.gradle with the following:
apply plugin: 'application'
mainClassName = project.hasProperty('main') ? project.getProperty('main') : ''Run the following gradle command to execute your application, replacing com.vonage.quickstart.voice with the package containing InboundCall:
Prerequisites
Prerequisites
Run your code
Save this file to your machine and run it:
Prerequisites
Run your code
Save this file to your machine and run it:
Prerequisites
Run your code
Save this file to your machine and run it:
試してみる
Vonage番号に電話をかけると、音声合成メッセージが流れます。
さらに読む
- インタラクティブ・ボイス・レスポンス(IVR) - ユーザーがキーパッドで情報を入力し、音声応答を聞くための自動電話システムを構築する。
- Googleダイアログフローによる音声ボット - このガイドでは、Vonage Voice APIを使用したDialogflowボットのサンプルコードを使って、Dialogflowボットと対話する方法を説明します。
- マスクド・コーリング - ユーザー同士の通話を可能にし、実番号を非公開にする。
- 電話会議 - このガイドでは、Vonageが通話に関連付ける2つの概念、レグと会話について説明します。
- コールトラッキング - キャンペーンごとに異なる番号を使用し、着信を追跡することで、どのキャンペーンがうまくいっているかを把握できます。このガイドでは、着信を処理し、別の番号に接続し、Vonageの各番号に電話をかけた電話番号を追跡する方法を説明します。