Connect callers to a conference
This code snippet shows how to join multiple calls into a conversation.
Multiple inbound calls can be joined into a conversation (conference call) by connecting the call into the same named conference.
Conference names are scoped at the Vonage Application
level. For example, VonageApp1 and VonageApp2 could both have a
conference called vonage-conference and there would be no problem.
Example
Replace the following variables in the example code:
| Key | Description |
|---|---|
VOICE_CONFERENCE_NAME | The named identifier for your conference. |
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'Write the code
Add the following to the main method of the ConnectCallersToConference file:
Run your code
We can use the application 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 ConnectCallersToConference:
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 application 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 ConferenceCall:
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:
Try it out
Start your server and make multiple inbound calls to the Vonage Number assigned to this Vonage Application. The inbound calls will be connected into the same conversation (conference).
Further Reading
- Conference Calling - This guide explains the two concepts Vonage associates with a call, a leg and a conversation.