Connect To Conference
Connects an existing inbound or outbound (primary) call to a conference as a conference participant via an outbound (secondary) call. It allows you to tailor how the participant influences the conference and how it interacts with other participants in the conference.
language wrappers and examples
Note that web apps that use the connect to conference
action require Extra Channels to be set to one or more in the service configuration.
The connect to conference properties are:
Property | Required/Optional | Default | Description |
---|---|---|---|
name | required | The name of the conference to call. | |
hold media | optional | - | A play action. Media to play repeatedly to the primary call until the secondary call is connected. null signifies playing ringing to the call. |
seconds answer timeout | optional | 30 | An integer. The time to wait for the secondary call to be answered. |
conference participant | optional | - | A conference participant object that determines how the participant interacts with the conference. |
secondary call | optional | - | A secondary call object that specifies pages and properties that are related to the lifetime of the secondary call. |
next page | optional | - | A web page request object that defines the web page to be requested once the connect to conference action has finished. If null or no page is specified or the conference fails to connect, then the subsequent action in the action array will be executed. |
Returns
The result of a successfulconnect to conference
action will be returned via the subsequent http request to the next page
in action result
as follows:Property | Availability | Description |
---|---|---|
seconds connected duration | always | A floating point value to one decimal place. The duration for which the call was connected to the conference. |
Remarks
Theconnect to conference
action makes a single outbound (secondary) call to a specified conference. If it is answered it is typically immediately connected to the primary call.Setting the
secondary call first page
allows the application to interact with the conference before it is connected. See the connect action for more details.See also:
Examples:
"connect_to_conference" :
{
"name" : "BobsChatRoom"
}
"connect_to_conference" :
{
"name" : "BobsChatRoom",
"hold_media" : {"play" : { "play_list" : [ { "file_to_play" : "cool_jazz.wav" } ] } },
"seconds_answer_timeout" : 40,
"secondary_call" :
{
"call_recording" : true,
"minutes_max_call_duration" : 45
},
"conference_participant" :
{
"talker" : true,
"start_on_entry" : true,
"destroy_on_exit" : true,
"beep_on_entry" : true,
"mute_digit" : "#",
"unmute_digit" : "*",
"exit_digit" : "9",
"while_stopped_media" : { "play" : { "play_list" : [ { "file_to_play" : "cool_jazz.wav" } ] } },
"name" : { "play" : { "play_list" : [ { "text_to_say" : "Bob" } ] } },
"has_joined_message" : { "play" : { "play_list" : [ { "text_to_say" : "has joined the conference." } ] } },
"has_left_message" : { "play" : { "play_list" : [ { "text_to_say" : "has left the conference." } ] } }
},
"next_page" :
{
"url" : "conferenceNextPage"
}
}
"action_result" :
{
"action" : "connect_to_conference",
"result" :
{
"seconds_connected_duration" : "131.1"
}
}
"connect_to_conference" :
{
"name" : "BobsChatRoom",
"hold_media" : {"play" : { "play_list" : [ { "file_to_play" : "cool_jazz.wav" } ] } },
"secondary_call" :
{
"call_recording" : true,
"first_page" : "conferenceFirstPage",
"final_page" : "conferenceFinalPage",
"error_page" : "conferenceErrorPage"
}
}
ConnectToConference Class
Namespace: Aculab.Cloud.RestAPIWrapper
Assembly: Aculab.Cloud.RestAPIWrapper.dll
An action to connect an existing inbound or outbound (primary) call to a conference as a conference
participant via an outbound (secondary) call.
public class ConnectToConference : TelephonyAction
{
// Constructors
public ConnectToConference(string name);
// Members
public Play HoldMedia;
public int SecondsAnswerTimeout;
public ConferenceParticipant Participant;
public SecondaryCall SecondaryCall;
public WebPageRequest NextPage;
}
Examples:
List<TelephonyAction> actions = new List<TelephonyAction>();
var connectToConferenceAction = new ConnectToConference("BobsChatRoom");
List<TelephonyAction> actions = new List<TelephonyAction>();
var connectToConferenceAction = new ConnectToConference("BobsChatRoom");
connectToConferenceAction.HoldMedia = Play.PlayFile("cool_jazz.wav");
connectToConferenceAction.SecondsAnswerTimeout = 40;
connectToConferenceAction.SecondaryCall = new SecondaryCall(null, 45, true);
connectToConferenceAction.NextPage = new WebPageRequest("ConferenceNextPage.aspx");
var participant = new ConferenceParticipant();
participant.Talker = true;
participant.StartOnEntry = true;
participant.DestroyOnExit = true;
participant.BeepOnEntry = true;
participant.MuteDigit = '#';
participant.UnmuteDigit = '*';
participant.ExitDigit = '9';
participant.WhileStoppedMedia = Play.PlayFile("cool_jazz.wav");
participant.Name = Play.SayText("Bob");
participant.HasJoinedMessage = Play.SayText("has joined the conference.");
participant.HasLeftMessage = Play.SayText("has left the conference.");
connectToConferenceAction.Participant = participant;
actions.Add(connectToConferenceAction);
// Unpack the request
var telephonyRequest = new TelephonyRequest(Request);
var connectToConferenceResult = (ConnectToConferenceResult)telephonyRequest.InstanceInfo.ActionResult;
double connectedDuration = connectToConferenceResult.SecondsConnectedDuration;
List<TelephonyAction> actions = new List<TelephonyAction>();
var connectToConferenceAction = new ConnectToConference("BobsChatRoom");
connectToConferenceAction.HoldMedia = Play.PlayFile("cool_jazz.wav");
var secondaryCall = new SecondaryCall(new WebPageRequest("ConferenceFirstPage.aspx"));
secondaryCall.FinalPage = new WebPageRequest("ConferenceFinalPage.aspx");
secondaryCall.ErrorPage = new WebPageRequest("ConferenceErrorPage.aspx");
connectToConferenceAction.SecondaryCall = secondaryCall;
actions.Add(connectToConferenceAction);
public class ConnectToConference : TelephonyAction
{
// Constructors
public ConnectToConference(string name);
// Members
public Play HoldMedia;
public int SecondsAnswerTimeout;
public ConferenceParticipant Participant;
public SecondaryCall SecondaryCall;
public WebPageRequest NextPage;
}
Examples:
List<TelephonyAction> actions = new List<TelephonyAction>();
var connectToConferenceAction = new ConnectToConference("BobsChatRoom");
List<TelephonyAction> actions = new List<TelephonyAction>();
var connectToConferenceAction = new ConnectToConference("BobsChatRoom");
connectToConferenceAction.HoldMedia = Play.PlayFile("cool_jazz.wav");
connectToConferenceAction.SecondsAnswerTimeout = 40;
connectToConferenceAction.SecondaryCall = new SecondaryCall(null, 45, true);
connectToConferenceAction.NextPage = new WebPageRequest("ConferenceNextPage.aspx");
var participant = new ConferenceParticipant();
participant.Talker = true;
participant.StartOnEntry = true;
participant.DestroyOnExit = true;
participant.BeepOnEntry = true;
participant.MuteDigit = '#';
participant.UnmuteDigit = '*';
participant.ExitDigit = '9';
participant.WhileStoppedMedia = Play.PlayFile("cool_jazz.wav");
participant.Name = Play.SayText("Bob");
participant.HasJoinedMessage = Play.SayText("has joined the conference.");
participant.HasLeftMessage = Play.SayText("has left the conference.");
connectToConferenceAction.Participant = participant;
actions.Add(connectToConferenceAction);
// Unpack the request
var telephonyRequest = new TelephonyRequest(Request);
var connectToConferenceResult = (ConnectToConferenceResult)telephonyRequest.InstanceInfo.ActionResult;
double connectedDuration = connectToConferenceResult.SecondsConnectedDuration;
List<TelephonyAction> actions = new List<TelephonyAction>();
var connectToConferenceAction = new ConnectToConference("BobsChatRoom");
connectToConferenceAction.HoldMedia = Play.PlayFile("cool_jazz.wav");
var secondaryCall = new SecondaryCall(new WebPageRequest("ConferenceFirstPage.aspx"));
secondaryCall.FinalPage = new WebPageRequest("ConferenceFinalPage.aspx");
secondaryCall.ErrorPage = new WebPageRequest("ConferenceErrorPage.aspx");
connectToConferenceAction.SecondaryCall = secondaryCall;
actions.Add(connectToConferenceAction);
public class ConnectToConference : TelephonyAction
{
// Constructors
public ConnectToConference(string name);
// Members
public Play HoldMedia;
public int SecondsAnswerTimeout;
public ConferenceParticipant Participant;
public SecondaryCall SecondaryCall;
public WebPageRequest NextPage;
}
Examples:
List<TelephonyAction> actions = new List<TelephonyAction>();
var connectToConferenceAction = new ConnectToConference("BobsChatRoom");
List<TelephonyAction> actions = new List<TelephonyAction>();
var connectToConferenceAction = new ConnectToConference("BobsChatRoom");
connectToConferenceAction.HoldMedia = Play.PlayFile("cool_jazz.wav");
connectToConferenceAction.SecondsAnswerTimeout = 40;
connectToConferenceAction.SecondaryCall = new SecondaryCall(null, 45, true);
connectToConferenceAction.NextPage = new WebPageRequest("ConferenceNextPage.aspx");
var participant = new ConferenceParticipant();
participant.Talker = true;
participant.StartOnEntry = true;
participant.DestroyOnExit = true;
participant.BeepOnEntry = true;
participant.MuteDigit = '#';
participant.UnmuteDigit = '*';
participant.ExitDigit = '9';
participant.WhileStoppedMedia = Play.PlayFile("cool_jazz.wav");
participant.Name = Play.SayText("Bob");
participant.HasJoinedMessage = Play.SayText("has joined the conference.");
participant.HasLeftMessage = Play.SayText("has left the conference.");
connectToConferenceAction.Participant = participant;
actions.Add(connectToConferenceAction);
// Unpack the request
var telephonyRequest = await TelephonyRequest.UnpackRequestAsync(Request);
var connectToConferenceResult = (ConnectToConferenceResult)telephonyRequest.InstanceInfo.ActionResult;
double connectedDuration = connectToConferenceResult.SecondsConnectedDuration;
List<TelephonyAction> actions = new List<TelephonyAction>();
var connectToConferenceAction = new ConnectToConference("BobsChatRoom");
connectToConferenceAction.HoldMedia = Play.PlayFile("cool_jazz.wav");
var secondaryCall = new SecondaryCall(new WebPageRequest("ConferenceFirstPage.aspx"));
secondaryCall.FinalPage = new WebPageRequest("ConferenceFinalPage.aspx");
secondaryCall.ErrorPage = new WebPageRequest("ConferenceErrorPage.aspx");
connectToConferenceAction.SecondaryCall = secondaryCall;
actions.Add(connectToConferenceAction);
ConnectToConference Class
Namespace: Aculab.Cloud.RestAPIWrapper
Assembly: Aculab.Cloud.RestAPIWrapper.dll
An action to connect an existing inbound or outbound (primary) call to a conference as a conference
participant via an outbound (secondary) call.
Public Class ConnectToConference
Inherits TelephonyAction
' Constructors
Public Sub New (name As String)
' Members
Public Property HoldMedia As Play
Public Property SecondsAnswerTimeout As Integer
Public Property Participant As Conferenceparticipant
Public Property SecondaryCall As Secondarycall
Public Property NextPage As Webpagerequest
End Class
Examples:
Dim actions = New List(Of TelephonyAction)
Dim connectToConferenceAction = New ConnectToConference("BobsChatRoom")
Dim actions = New List(Of TelephonyAction)
Dim connectToConferenceAction = New ConnectToConference("BobsChatRoom")
connectToConferenceAction.HoldMedia = Play.PlayFile("cool_jazz.wav")
connectToConferenceAction.SecondsAnswerTimeout = 40
connectToConferenceAction.SecondaryCall = New SecondaryCall(Nothing, 45, True)
connectToConferenceAction.NextPage = New WebPageRequest("ConferenceNextPage.aspx")
Dim participant = New ConferenceParticipant()
participant.Talker = True
participant.StartOnEntry = True
participant.DestroyOnExit = True
participant.BeepOnEntry = True
participant.UnmuteDigit = "*"
participant.ExitDigit = "9"
participant.WhileStoppedMedia = Play.PlayFile("cool_jazz.wav")
participant.Name = Play.SayText("Bob")
participant.HasJoinedMessage = Play.SayText("has joined the conference.")
participant.HasLeftMessage = Play.SayText("has left the conference.")
connectToConferenceAction.Participant = participant
actions.Add(connectToConferenceAction)
' Unpack the request
Dim telephonyRequest = New TelephonyRequest(Request)
Dim connectToConferenceResult As ConnectToConferenceResult = telephonyRequest.InstanceInfo.ActionResult
Dim connectedDuration = connectToConferenceResult.SecondsConnectedDuration
Dim actions = New List(Of TelephonyAction)
Dim connectToConferenceAction = New ConnectToConference("BobsChatRoom")
connectToConferenceAction.HoldMedia = Play.PlayFile("cool_jazz.wav")
Dim secondaryCall = New SecondaryCall(New WebPageRequest("ConferenceFirstPage.aspx"))
secondaryCall.FinalPage = New WebPageRequest("ConferenceFinalPage.aspx")
secondaryCall.ErrorPage = New WebPageRequest("ConferenceErrorPage.aspx")
connectToConferenceAction.SecondaryCall = secondaryCall
actions.Add(connectToConferenceAction)
Public Class ConnectToConference
Inherits TelephonyAction
' Constructors
Public Sub New (name As String)
' Members
Public Property HoldMedia As Play
Public Property SecondsAnswerTimeout As Integer
Public Property Participant As Conferenceparticipant
Public Property SecondaryCall As Secondarycall
Public Property NextPage As Webpagerequest
End Class
Examples:
Dim actions = New List(Of TelephonyAction)
Dim connectToConferenceAction = New ConnectToConference("BobsChatRoom")
Dim actions = New List(Of TelephonyAction)
Dim connectToConferenceAction = New ConnectToConference("BobsChatRoom")
connectToConferenceAction.HoldMedia = Play.PlayFile("cool_jazz.wav")
connectToConferenceAction.SecondsAnswerTimeout = 40
connectToConferenceAction.SecondaryCall = New SecondaryCall(Nothing, 45, True)
connectToConferenceAction.NextPage = New WebPageRequest("ConferenceNextPage.aspx")
Dim participant = New ConferenceParticipant()
participant.Talker = True
participant.StartOnEntry = True
participant.DestroyOnExit = True
participant.BeepOnEntry = True
participant.UnmuteDigit = "*"
participant.ExitDigit = "9"
participant.WhileStoppedMedia = Play.PlayFile("cool_jazz.wav")
participant.Name = Play.SayText("Bob")
participant.HasJoinedMessage = Play.SayText("has joined the conference.")
participant.HasLeftMessage = Play.SayText("has left the conference.")
connectToConferenceAction.Participant = participant
actions.Add(connectToConferenceAction)
' Unpack the request
Dim telephonyRequest = New TelephonyRequest(Request)
Dim connectToConferenceResult As ConnectToConferenceResult = telephonyRequest.InstanceInfo.ActionResult
Dim connectedDuration = connectToConferenceResult.SecondsConnectedDuration
Dim actions = New List(Of TelephonyAction)
Dim connectToConferenceAction = New ConnectToConference("BobsChatRoom")
connectToConferenceAction.HoldMedia = Play.PlayFile("cool_jazz.wav")
Dim secondaryCall = New SecondaryCall(New WebPageRequest("ConferenceFirstPage.aspx"))
secondaryCall.FinalPage = New WebPageRequest("ConferenceFinalPage.aspx")
secondaryCall.ErrorPage = New WebPageRequest("ConferenceErrorPage.aspx")
connectToConferenceAction.SecondaryCall = secondaryCall
actions.Add(connectToConferenceAction)
class ConnectToConference extends TelephonyAction
Represents a connect to conference action.
Class synopsis:
// Constructors:
public ConnectToConference(String name)
// Members:
public void setHoldMedia(Play holdMedia)
public void setSecondsAnswerTimeout(int secondsTimeout)
public void setParticipant(ConferenceParticipant conferenceParticipant)
public void setSecondaryCall(SecondaryCall secondaryCall)
public void setNextPage(WebPageRequest nextPage)
class ConnectToConferenceResult extends ActionResult
Represents the result of a connect to conference action.
Class synopsis:
// Members:
public double getSecondsConnectedDuration()
Examples:
List<TelephonyAction> actions = new ArrayList<TelephonyAction>();
ConnectToConference connectToConferenceAction = new ConnectToConference("BobsChatRoom");
actions.add(connectToConferenceAction);
List<TelephonyAction> actions = new ArrayList<TelephonyAction>();
ConferenceParticipant participant = new ConferenceParticipant();
participant.setTalker(true);
participant.setStartOnEntry(true);
participant.setDestroyOnExit(true);
participant.setBeepOnEntry(true);
participant.setMuteDigit('#');
participant.setUnmuteDigit('*');
participant.setExitDigit('9');
participant.setWhileStoppedMedia(Play.playFile("cool_jazz.wav"));
participant.setName(Play.sayText("Bob"));
participant.setHasJoinedMessage(Play.sayText("has joined the conference."));
participant.setHasLeftMessage(Play.sayText("has left the conference."));
ConnectToConference connectToConferenceAction = new ConnectToConference("BobsChatRoom");
connectToConferenceAction.setHoldMedia(Play.playFile("cool_jazz.wav"));
connectToConferenceAction.setSecondsAnswerTimeout(40);
connectToConferenceAction.setSecondaryCall(new SecondaryCall(null, 45, true));
connectToConferenceAction.setParticipant(participant);
connectToConferenceAction.setNextPage(new WebPageRequest("conferenceNextPage"));
actions.add(connectToConferenceAction);
ConnectToConferenceResult connectToConferenceResult = (ConnectToConferenceResult)ourRequest.getInstanceInfo().getActionResult();
double connectedDuration = connectToConferenceResult.getSecondsConnectedDuration();
List<TelephonyAction> actions = new ArrayList<TelephonyAction>();
SecondaryCall secondaryCall = new SecondaryCall(new WebPageRequest("conferenceFirstPage"));
secondaryCall.setFinalPage(new WebPageRequest("conferenceFinalPage"));
secondaryCall.setErrorPage(new WebPageRequest("conferenceErrorPage"));
secondaryCall.setCallRecording(true);
ConnectToConference connectToConferenceAction = new ConnectToConference("BobsChatRoom");
connectToConferenceAction.setHoldMedia(Play.playFile("cool_jazz.wav"));
connectToConferenceAction.setSecondaryCall(secondaryCall);
actions.add(connectToConferenceAction);
class ConnectToConference
Represents a connect to conference action.
Class synopsis:
# ConnectToConference object:
ConnectToConference(name)
# Instance methods:
ConnectToConference.set_hold_media(play_action)
ConnectToConference.set_seconds_answer_timeout(seconds_answer_timeout)
ConnectToConference.set_conference_participant(participant)
ConnectToConference.set_secondary_call(secondary_call)
ConnectToConference.set_next_page(next_page)
Connect To Conference Result
The Connect To Conference Result is represented by a dictionary. It is found within the action result
for the next page
.
Obtaining the Connect To Conference Result dictionary:
my_request = TelephonyRequest(request)
action_result = my_request.get_action_result()
if action_result.get("action") == "connect_to_conference":
connect_to_conf_result = action_result.get("result")
Examples:
# Create a list of actions that will be passed to the TelephonyResponse constructor
list_of_actions = []
my_conference = ConnectToConference('BobsChatRoom')
list_of_actions.append(my_conference)
# Create a list of actions that will be passed to the TelephonyResponse constructor
list_of_actions = []
my_conference = ConnectToConference('BobsChatRoom')
my_conference.set_hold_media(Play(file_to_play='cool_jazz.wav'))
my_conference.set_seconds_answer_timeout(seconds_answer_timeout=40)
my_conference.set_secondary_call(SecondaryCall(minutes_max_call_duration=45,
call_recording=True))
my_conference.set_conference_participant(ConferenceParticipant(talker=True,
start_on_entry=True,
destroy_on_exit=True,
beep_on_entry=True,
mute_digit='#',
unmute_digit='*',
exit_digit='9',
while_stopped_media=Play(file_to_play='cool_jazz.wav'),
name=Play(text_to_say='Bob'),
has_joined_message=Play(text_to_say='has joined the conference.'),
has_left_message=Play(text_to_say='has left the conference.')))
my_conference.set_next_page(WebPage(url='conferenceNextPage'))
list_of_actions.append(my_conference)
my_request = TelephonyRequest(request)
action_result = my_request.get_action_result()
if action_result.get("action") == "connect_to_conference":
connect_to_conf_result = action_result.get("result")
duration = connect_to_conf_result.get("seconds_connected_duration")
# Your code here...
# Create a list of actions that will be passed to the TelephonyResponse constructor
list_of_actions = []
my_conference = ConnectToConference('BobsChatRoom')
my_conference.set_hold_media(Play(file_to_play='cool_jazz.wav'))
my_conference.set_seconds_answer_timeout(seconds_answer_timeout=30)
my_conference.set_secondary_call(SecondaryCall(first_page=WebPage(url='conferenceFirstPage'),
final_page=WebPage(url='conferenceFinalPage'),
error_page=WebPage(url='conferenceErrorPage'),
minutes_max_call_duration=240,
call_recording=True))
list_of_actions.append(my_conference)
The ConnectToConference class
Introduction
Represents a connect to conference action.
Class synopsis
class ConnectToConference extends ConnectBase {
/* methods */
public __construct(string $name, ConferenceParticipantConfiguration $configuration = null)
public self setParticipantConfiguration(ConferenceParticipantConfiguration $configuration = null)
/* inherited methods */
public self setHoldMedia(Play $play = null)
public self setSecondsAnswerTimeout(int $secs)
public self setSecondaryCallConfiguration(SecondaryCallConfiguration $secondary_call_configuration)
public self setNextPage(string|WebPageRequest $next_page, string $method = null)
}
The ConnectToConferenceResult class
Introduction
Represents the result of a connect to conference action.
Class synopsis
class ConnectToConferenceResult extends ActionResult {
/* methods */
public float getSecondsConnectedDuration()
/* inherited methods */
public string getAction()
public boolean getInterrupted()
}
Examples:
$ctc = new Aculab\TelephonyRestAPI\ConnectToConference("BobsChatRoom");
$response->addAction($ctc);
$participant_config = new Aculab\TelephonyRestAPI\ConferenceParticipantConfiguration();
$participant_config->setTalker(true)
->setStartOnEntry(true)
->setDestroyOnExit(true)
->setBeepOnEntry(true)
->setMuteDigit('#')
->setUnmuteDigit('*')
->setExitDigit('9')
->setWhileStoppedMedia(Aculab\TelephonyRestAPI\Play::playFile('cool_jazz.wav'))
->setName(Aculab\TelephonyRestAPI\Play::sayText('Bob'))
->setHasJoinedMessage(Aculab\TelephonyRestAPI\Play::sayText('has joined the conference'))
->setHasLeftMessage(Aculab\TelephonyRestAPI\Play::sayText('has left the conference'));
$ctc = new Aculab\TelephonyRestAPI\ConnectToConference("BobsChatRoom", $participant_config);
$ctc->setHoldMedia(Aculab\TelephonyRestAPI\Play::playFile('cool_jazz.wav'))
->setSecondsAnswerTimeout(40)
->setNextPage('conferenceNextPage');
$call_config = new Aculab\TelephonyRestAPI\SecondaryCallConfiguration();
$call_config->setMinutesMaxCallDuration(45)
->setCallRecording(true);
$ctc->setSecondaryCallConfiguration($call_config);
$response->addAction($ctc);
$info = InstanceInfo::getInstanceInfo();
$connectToConferenceResult = $info->getActionResult();
$durationConnected = $connectToConferenceResult->getSecondsConnectedDuration();
$ctc = new Aculab\TelephonyRestAPI\ConnectToConference("BobsChatRoom");
$ctc->setHoldMedia(Aculab\TelephonyRestAPI\Play::playFile('cool_jazz.wav'));
$call_config = new Aculab\TelephonyRestAPI\SecondaryCallConfiguration();
$call_config->setCallRecording(true)
->setFirstPage('conferenceFirstPage')
->setErrorPage('conferenceErrorPage')
->setFinalPage('conferenceFinalPage');
$ctc->setSecondaryCallConfiguration($call_config);
$response->addAction($ctc);