right  Talk To Us!

connect to conference Action

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.


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:

PropertyRequired/OptionalDefaultDescription
name required - The name of the conference to call.
hold media optional null 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 null A conference participant object that determines how the participant interacts with the conference.
secondary call optional null A secondary call object that specifies pages and properties that are related to the lifetime of the secondary call.
next page optional null A web page request object that defines the web page to be requested once the connect to conference has finished. If null or no page is specified then the subsequent action in the action array will be executed.

conference participant controls how a participant interacts with a conference. It has the properties:

PropertyRequired/OptionalDefaultDescription
talker optional true true or false. Whether this participant can talk to the conference.
start on entry optional true true or false. Whether the conference should start when this participant enters.
destroy on exit optional false true or false. Whether the conference should be destroyed when this participant exits.
beep on entry optional true true or false. Whether a beep should be played to the conference when this participant enters.
exit digit optional null A string containing a single digit that results in the participant leaving the conference. null or an empty string signifies no exit digit. Valid digits are 0123456789ABCD#*.
mute digit optional null A string containing a single digit that will mute the participant's audio input if pressed. If no unmute digit is specified, this will toggle mute on and off. null or an empty string signifies no mute digit. Valid digits are 0123456789ABCD#*.
unmute digit optional mute digit A string containing a single digit that will unmute the participant's audio input if pressed. null or an empty string results in the mute digit toggling mute on and off. Valid digits are 0123456789ABCD#*.
while stopped media optional null A play action to play in an endless loop while the conference is stopped.
name optional null A play action to play the participant's name.
has joined message optional null A play action to play when the participant has joined.
has left message optional null A play action to play when the participant has left.

secondary call determines the pages and properties relating to the outbound (secondary) call:

PropertyRequired/OptionalDefaultDescription
call recording optional false true or false. Whether to record the whole of the secondary call.
call recording encryption optional false true or false. Whether to encrypt the whole call recording.
minutes max call duration optional 240 An integer. The maximum duration of the secondary call in minutes. The secondary call is hung up if this is exceeded.
first page optional null The page to request when the secondary call has been answered. This gives the application an opportunity to interact with the secondary call before it is then connected to the primary call.
final page optional null The page that is requested when either the primary or secondary call is hung up (i.e. the connection has been broken).
error page optional null The page to request when there is an error during the connect action.

web page request defines how a specific web page is requested:

PropertyRequired/OptionalDefaultDescription
url required - The address of the web page to request.
method optional POST One of "GET" or "POST". The HTTP request method to use when requesting the url.

Returns

The result of a successful connect to conference action will be returned via the subsequent http request to the next page in action result as follows:

PropertyDescription
seconds connected duration A floating point value to one decimal place. The duration for which the call was connected to the conference.

Remarks

The connect 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.
  • Examples:

    • Call up conference BobsChatRoom using the default settings:

          "connect_to_conference" :
          {
              "name" : "BobsChatRoom"
          }
      
    • Call up conference BobsChatRoom and connect to it specifying some features of the participant. Request conferenceNextPage after leaving the conference:

          "connect_to_conference" :
          {
              "name" : "BobsChatRoom",
              "hold_media" : {"play" : { "play_list" : [ { "file_to_play" : "cool_jazz.wav" } ] } },
              "seconds_answer_timeout" : 30,
              "secondary_call" :
              {
                  "call_recording" : true,
                  "minutes_max_call_duration" : 240
              },
              "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"
              }
          }
      

      Once the connect to conference action has finished the duration for which the call was connected to the conference is specified in the request for the next page:

      "action_result" :
      {
          "action" : "connect_to_conference",
          "result" :
          {
              "seconds_connected_duration" : "131.1"
          }
      }
      
    • Call up conference BobsChatRoom, requesting conferenceFirstPage when the call to the conference is answered. Connect to the conference once all conferenceFirstPage's actions have run. Carry on with the next action once the connect to conference has finished:

          "connect_to_conference" :
          {
              "name" : "BobsChatRoom",
              "hold_media" : {"play" : { "play_list" : [ { "file_to_play" : "cool_jazz.wav" } ] } },
              "seconds_answer_timeout" : 30,
              "secondary_call" :
              {
                  "call_recording" : true,
                  "minutes_max_call_duration" : 240,
                  "first_page" : "conferenceFirstPage",
                  "final_page" : "conferenceFinalPage",
                  "error_page" : "conferenceErrorPage"
              }
          }
      
  • API Reference:

    class ConnectToConference : TelephonyAction

    Represents a connect to conference action.

    Constructors:

    ConnectToConference(String name);
    

    Members:

    Play HoldMedia;
    int SecondsAnswerTimeout;
    ConferenceParticipant Participant;
    SecondaryCall SecondaryCall;
    WebPageRequest NextPage;
    
    class ConferenceParticipant

    Represents a participant within a conference.

    Constructors:

    ConferenceParticipant();
    

    Members:

    bool Talker;
    bool StartOnEntry;
    bool DestroyOnExit;
    bool BeepOnEntry;
    char ExitDigit;
    char MuteDigit;
    char UnmuteDigit;
    Play WhileStoppedMedia;
    Play Name;
    Play HasJoinedMessage;
    Play HasLeftMessage;
    
    class SecondaryCall

    Represents the pages and properties relating to the outbound (secondary) call.

    Constructors:

    SecondaryCall();
    SecondaryCall(WebPageRequest firstPage);
    SecondaryCall(WebPageRequest firstPage, int minutesMaxDuration, bool callRecording);
    

    Members:

    bool CallRecording;
    bool CallRecordingEncryption;
    int MinutesMaxCallDuration;
    WebPageRequest FirstPage;
    WebPageRequest FinalPage;
    WebPageRequest ErrorPage;
    
    class ConnectToConferenceResult : ActionResult

    Represents the result of a connect to conference action.

    Members:

    double SecondsConnectedDuration;
    

    Examples:

    • Call up conference BobsChatRoom using the default settings:

      ConnectToConference connectToConferenceAction = new ConnectToConference("BobsChatRoom");
      actions.Add(connectToConferenceAction);
      
    • Call up conference BobsChatRoom and connect to it specifying some features of the participant. Request conferenceNextPage after leaving the conference:

      Connect connectToConferenceAction = new ConnectToConference("BobsChatRoom");
      
      connectToConferenceAction.HoldMedia = Play.PlayFile("cool_jazz.wav");
      connectToConferenceAction.SecondsAnswerTimeout = 30;
      connectToConferenceAction.SecondaryCall = new SecondaryCall(null, 240, true);
      
      connectToConferenceAction.Participant = new ConferenceParticipant();
      connectToConferenceAction.Participant.Talker = true;
      connectToConferenceAction.Participant.StartOnEntry = true;
      connectToConferenceAction.Participant.DestroyOnExit = true;
      connectToConferenceAction.Participant.BeepOnEntry = true;
      connectToConferenceAction.Participant.ExitDigit = '9';
      connectToConferenceAction.Participant.MuteDigit = '#';
      connectToConferenceAction.Participant.UnmuteDigit = '*';
      connectToConferenceAction.Participant.WhileStoppedMedia = Play.PlayFile("cool_jazz.wav");
      connectToConferenceAction.Participant.Name = Play.SayText("Bob");
      connectToConferenceAction.Participant.HasJoinedMessage = Play.SayText("has joined the conference.");
      connectToConferenceAction.Participant.HasLeftMessage = Play.SayText("has left the conference.");
      
      connectToConferenceAction.NextPage = new WebPageRequest("ConferenceNextPage.aspx");
      
      actions.Add(connectToConferenceAction);
      

      The connect to conference result is obtained from the request for the next page:

      ConnectToConferenceResult connectToConferenceResult = (ConnectToConferenceResult)ourRequest.InstanceInfo.ActionResult;
      double connectedDuration = connectToConferenceResult.SecondsConnectedDuration;
      ...
      
    • Call up conference BobsChatRoom, requesting conferenceFirstPage when the call to the conference is answered. Connect to the conference once all conferenceFirstPage's actions have run. Carry on with the next action once the connect to conference has finished:

      Connect connectToConferenceAction = new ConnectToConference("BobsChatRoom");
      
      connectToConferenceAction.HoldMedia = Play.PlayFile("cool_jazz.wav");
      connectToConferenceAction.SecondsAnswerTimeout = 30;
      connectToConferenceAction.SecondaryCall = new SecondaryCall(new WebPageRequest("conferenceFirstPage.aspx"), 240, true);
      connectToConferenceAction.SecondaryCall.FinalPage = new WebPageRequest("ConferenceFinalPage.aspx");
      connectToConferenceAction.SecondaryCall.ErrorPage = new WebPageRequest("ConferenceErrorPage.aspx");
      
      actions.Add(connectToConferenceAction);
      
  • API Reference:

    Class ConnectToConference Inherits TelephonyAction

    Represents a connect to conference action.

    Constructors:

    New(name As String)
    

    Members:

    HoldMedia As Play
    SecondsAnswerTimeout As Integer
    Participant As RestAPIWrapper.ConferenceParticipant
    SecondaryCall As RestAPIWrapper.SecondaryCall
    NextPage As RestAPIWrapper.WebPageRequest
    
    Class ConferenceParticipant

    Represents a participant within a conference.

    Constructors:

    New()
    

    Members:

    Talker As Boolean
    StartOnEntry As Boolean
    DestroyOnExit As Boolean
    BeepOnEntry As Boolean
    ExitDigit As Char
    MuteDigit As Char
    UnmuteDigit As Char
    WhileStoppedMedia As RestAPIWrapper.Play
    Name As RestAPIWrapper.Play
    HasJoinedMessage As RestAPIWrapper.Play
    HasLeftMessage As RestAPIWrapper.Play
    
    Class SecondaryCall

    Represents the pages and properties relating to the outbound (secondary) call.

    Constructors:

    New()
    New(firstPage As RestAPIWrapper.WebPageRequest)
    New(firstPage As RestAPIWrapper.WebPageRequest, minutesMaxDuration As Integer, callRecording As Boolean)
    

    Members:

    CallRecording As Boolean
    CallRecordingEncryption As Boolean
    MinutesMaxCallDuration As Integer
    FirstPage As RestAPIWrapper.WebPageRequest
    FinalPage As RestAPIWrapper.WebPageRequest
    ErrorPage As RestAPIWrapper.WebPageRequest
    
    Class ConnectToConferenceResult Inherits RestAPIWrapper.ActionResult

    Represents the result of a connect to conference action.

    Members:

    SecondsConnectedDuration As Double
    

    Examples:

    • Call up conference BobsChatRoom using the default settings:

      Dim connectToConferenceAction As ConnectToConference = New ConnectToConference("BobsChatRoom")
      actions.Add(connectToConferenceAction)
      
    • Call up conference BobsChatRoom and connect to it specifying some features of the participant. Request conferenceNextPage after leaving the conference:

      Dim connectToConferenceAction As Connect = New ConnectToConference("BobsChatRoom")
      
      connectToConferenceAction.HoldMedia = Play.PlayFile("cool_jazz.wav")
      connectToConferenceAction.SecondsAnswerTimeout = 30
      connectToConferenceAction.SecondaryCall = New SecondaryCall(Nothing, 240, True)
      
      connectToConferenceAction.Participant = New ConferenceParticipant()
      connectToConferenceAction.Participant.Talker = True
      connectToConferenceAction.Participant.StartOnEntry = True
      connectToConferenceAction.Participant.DestroyOnExit = True
      connectToConferenceAction.Participant.BeepOnEntry = True
      connectToConferenceAction.Participant.ExitDigit = "9"
      connectToConferenceAction.Participant.MuteDigit = "#"
      connectToConferenceAction.Participant.UnmuteDigit = "*"
      connectToConferenceAction.Participant.WhileStoppedMedia = Play.PlayFile("cool_jazz.wav")
      connectToConferenceAction.Participant.Name = Play.SayText("Bob")
      connectToConferenceAction.Participant.HasJoinedMessage = Play.SayText("has joined the conference.")
      connectToConferenceAction.Participant.HasLeftMessage = Play.SayText("has left the conference.")
      
      connectToConferenceAction.NextPage = New WebPageRequest("ConferenceNextPage.aspx")
      
      actions.Add(connectToConferenceAction)
      

      The connect to conference result is obtained from the request for the next page:

      Dim connectToConferenceResult As ConnectToConferenceResult = ourRequest.InstanceInfo.ActionResult
      Dim connectedDuration As Double = connectToConferenceResult.SecondsConnectedDuration
      ...
      
    • Call up conference BobsChatRoom, requesting conferenceFirstPage when the call to the conference is answered. Connect to the conference once all conferenceFirstPage's actions have run. Carry on with the next action once the connect to conference has finished:

      Dim connectToConferenceAction As Connect = New ConnectToConference("BobsChatRoom")
      
      connectToConferenceAction.HoldMedia = Play.PlayFile("cool_jazz.wav")
      connectToConferenceAction.SecondsAnswerTimeout = 30
      connectToConferenceAction.SecondaryCall = New SecondaryCall(New WebPageRequest("conferenceFirstPage.aspx"), 240, True)
      connectToConferenceAction.SecondaryCall.FinalPage = New WebPageRequest("ConferenceFinalPage.aspx")
      connectToConferenceAction.SecondaryCall.ErrorPage = New WebPageRequest("ConferenceErrorPage.aspx")
      
      actions.Add(connectToConferenceAction)
      
  • API Reference:

    class ConnectToConference extends TelephonyAction

    Represents a connect to conference action.

    Constructors:

    ConnectToConference(String name);
    

    Members:

    setHoldMedia(Play media);
    setSecondsAnswerTimeout(int secondsAnswerTimeout);
    setParticipant(ConferenceParticipant participant);
    setSecondaryCall(SecondaryCall secondaryCall);
    setNextPage(WebPageRequest nextPage);
    
    class ConferenceParticipant

    Represents a participant within a conference.

    Constructors:

    ConferenceParticipant();
    

    Members:

    setTalker(bool talker);
    setStartOnEntry(boolean startOnEntry);
    setDestroyOnExit(boolean destroyOnExit);
    setBeepOnEntry(boolean beepOnEntry);
    setExitDigit(char exitDigit);
    setMuteDigit(char muteDigit);
    setUnmuteDigit(char unmuteDigit);
    setWhileStoppedMedia(Play whileStoppedMedia);
    setName(Play name);
    setHasJoinedMessage(Play hasJoinedMessage);
    setHasLeftMessage(Play hasLeftMessage);
    
    class SecondaryCall

    Represents the pages and properties relating to the outbound (secondary) call.

    Constructors:

    SecondaryCall();
    SecondaryCall(WebPageRequest firstPage);
    SecondaryCall(WebPageRequest firstPage, int minutesMaxDuration, boolean callRecording);
    

    Members:

    setCallRecording(boolean enable);
    setCallRecordingEncryption(boolean enable);
    setMinutesMaxCallDuration(int minutes);
    setFirstPage(WebPageRequest firstPage);
    setFinalPage(WebPageRequest finalPage);
    setErrorPage(WebPageRequest errorPage);
    
    class ConnectToConferenceResult extends ActionResult

    Represents the result of a connect to conference action.

    Members:

    double getSecondsConnectedDuration();
    

    Examples:

    • Call up conference BobsChatRoom using the default settings:

      ConnectToConference connectToConferenceAction = new ConnectToConference("BobsChatRoom");
      actions.add(connectToConferenceAction);
      
    • Call up conference BobsChatRoom and connect to it specifying some features of the participant. Request conferenceNextPage after leaving the conference:

      Connect connectToConferenceAction = new ConnectToConference("BobsChatRoom");
      
      connectToConferenceAction.setHoldMedia(Play.PlayFile("cool_jazz.wav"));
      connectToConferenceAction.setSecondsAnswerTimeout(30);
      connectToConferenceAction.setSecondaryCall(new SecondaryCall(null, 240, true));
      
      ConferenceParticipant = new ConferenceParticipant();
      Participant.setTalker(true);
      Participant.setStartOnEntry(true);
      Participant.setDestroyOnExit(true);
      Participant.setBeepOnEntry(true);
      Participant.setExitDigit('9');
      Participant.setMuteDigit('#');
      Participant.setUnmuteDigit('*');
      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."));
      connectToConferenceAction.setParticipant(participant);
      
      connectToConferenceAction.setNextPage(new WebPageRequest("conferenceNextPage"));
      
      actions.add(connectToConferenceAction);
      

      The connect to conference result is obtained from the request for the next page:

      ConnectToConferenceResult connectToConferenceResult = (ConnectToConferenceResult)ourRequest.getInstanceInfo().getActionResult();
      double connectedDuration = connectToConferenceResult.getSecondsConnectedDuration();
      ...
      
    • Call up conference BobsChatRoom, requesting conferenceFirstPage when the call to the conference is answered. Connect to the conference once all conferenceFirstPage's actions have run. Carry on with the next action once the connect to conference has finished:

      Connect connectToConferenceAction = new ConnectToConference("BobsChatRoom");
      
      connectToConferenceAction.setHoldMedia(Play.PlayFile("cool_jazz.wav"));
      connectToConferenceAction.setSecondsAnswerTimeout(30);
      SecondaryCall secondaryCall = new SecondaryCall(new WebPageRequest("conferenceFirstPage"), 240, true);
      secondaryCall.setFinalPage(new WebPageRequest("conferenceFinalPage"));
      secondaryCall.setErrorPage(new WebPageRequest("conferenceErrorPage"));
      connectToConferenceAction.setSecondaryCall(secondaryCall);
      
      actions.add(connectToConferenceAction);
      
  • API Reference:

    class ConnectToConference

    Represents a connect to conference action.

    Constructors:

    ConnectToConference(name)
    

    Members:

    def set_next_page(next_page) # A WebPage object, see Redirect() for details
    def set_hold_media(play_action) # Takes a Play object, see Play() for details
    def set_seconds_answer_timeout(seconds_answer_timeout)
    def set_participant(participant) # A ConferenceParticipant object
    def set_secondary_call(secondary_call) # A SecondaryCall object
    
    class ConferenceParticipant

    ConferenceParticipant options. Used by Conference.

    Constructors:

    ConferenceParticipant(talker=None, 
                          start_on_entry=None, 
                          destroy_on_exit=None, 
                          beep_on_entry=None, 
                          mute_digit=None, 
                          unmute_digit=None, 
                          exit_digit=None,
                          while_stopped_media=None, # A Play object, see Play() for details
                          name=None, # A Play object, see Play() for details
                          has_joined_message=None, # A Play object, see Play() for details
                          has_left_message=None # A Play object, see Play() for details
                         ) 
    
    class SecondaryCall

    Secondary call options. Used by Conference.

    Constructors:

    SecondaryCall(first_page=None, 
                  final_page=None, 
                  error_page=None, 
                  minutes_max_call_duration=None, 
                  call_recording=None,
                  call_recording_encryption=None)
    

    Examples:

    • Call up conference BobsChatRoom using the default settings:

      from aculab.telephony_rest_api import *
      
      my_actions = Actions(token='Usage example 1: Conference.')
      my_conference = ConnectToConference('BobsChatRoom')
      my_actions.add(my_conference)
      
      response_body = my_actions.get_json()
      
    • Call up conference BobsChatRoom and connect to it specifying some features of the participant. Access conference_next once the conference has finished:

      from aculab.telephony_rest_api import *
      
      my_actions = Actions(token='Usage example 2: Conference.')
      
      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(minutes_max_call_duration=240, 
                                                     call_recording=True))
      my_conference.set_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='conference_next'))
      my_actions.add(my_conference)
      
      response_body = my_actions.get_json()
      
    • Call up conference BobsChatRoom, requesting conference_first_page when the call to the conference is answered. Connect to the conference once all conference_first_page's actions have run. Carry on with the next action once the connect to conference has finished:

      from aculab.telephony_rest_api import *
      
      my_actions = Actions(token='Usage example 3: Conference.')
      
      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='conference_first_page'),
                                                     final_page=WebPage(url='conference_final_page'),
                                                     error_page=WebPage(url='conference_error_page'),
                                                     minutes_max_call_duration=240, 
                                                     call_recording=True))
      my_actions.add(my_conference)
      
      response_body = my_actions.get_json()
      
  • API Reference:

    The ConnectToConference class

    Introduction

    Represents an connect to conference action.

    Class synopsis

    class ConnectToConference extends ActionBase {
    
        /* methods */
        public __construct(string $name, ConferenceParticipantConfiguration $Participant_config = null)
        public void setParticipantConfiguration(ConferenceParticipantConfiguration $Participant_config)
        public void setHoldMedia(Play $play)
        public void setSecondsAnswerTimeout(int $seconds)
        public void setSecondaryCallConfiguration(SecondaryCallConfiguration $call_config)
        public void setNextPage(string $next_page, string $method = null)
    }
    
    The ConferenceParticipantConfiguration class

    Introduction

    Represents the conference participant configuration.

    Class synopsis

    class ConferenceParticipantConfiguration {
    
        /* methods */
        public __construct()
        public void setTalker(boolean $talker)
        public void setStartOnEntry(boolean $start)
        public void setDestroyOnExit(boolean $stop)
        public void setBeepOnEntry(boolean $beep)
        public void setExitDigit(string $digit)
        public void setMuteDigit(string $digit)
        public void setUnmuteDigit(string $digit)
        public void setWhileStoppedMedia(Play $play)
        public void setHasJoinedMessage(Play $play)
        public void setHasLeftMessage(Play $play)
        public void setName(Play $play)
    }
    
    The SecondaryCallConfiguration class

    Introduction

    Represents the secondary call configuration for a connect action.

    Class synopsis

    class SecondaryCallConfiguration {
    
        /* methods */
        public __construct()
        public void setCallRecording(boolean $record)
        public void setCallRecordingEncryption(boolean $encrypt)
        public void setMinutesMaxCallDuration(int $minutes)
        public void setFirstPage(string $first_page, string $method = null)
        public void setFinalPage(string $final_page, string $method = null)
        public void setErrorPage(string $error_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:

    • Call up conference BobsChatRoom using the default settings:

      $ctc = new Aculab\TelephonyRestAPI\ConnectToConference("BobsChatRoom", $participant_config);
      $actions->add($ctc);
      
    • Call up conference BobsChatRoom and connect to it specifying some features of the participant:

      $participant_config = new Aculab\TelephonyRestAPI\ConferenceParticipantConfiguration();
      $participant_config->setTalker(true);
      $participant_config->setStartOnEntry(true);
      $participant_config->setDestroyOnExit(true);
      $participant_config->setBeepOnEntry(true);
      $participant_config->setMuteDigit('#');
      $participant_config->setUnmuteDigit('*');
      $participant_config->setExitDigit('9');
      $participant_config->setWhileStoppedMedia(Aculab\TelephonyRestAPI\Play::playFile('cool_jazz.wav'));
      $participant_config->setName(Aculab\TelephonyRestAPI\Play::sayText('Bob'));
      $participant_config->setHasJoinedMessage(Aculab\TelephonyRestAPI\Play::sayText('has joined the conference'));
      $participant_config->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'));
      $ctc->setSecondsAnswerTimeout(30);
      $ctc->setNextPage('conferenceNextPage');
      
      $call_config = new Aculab\TelephonyRestAPI\SecondaryCallConfiguration();
      $call_config->setMinutesMaxCallDuration(240);
      $call_config->setRecord(true);
      $ctc->setSecondaryCallConfiguration($call_config);
      
      $actions->add($ctc);
      

      Obtain the duration for which the call was connected to the conference from the action's next page request:

      $info = InstanceInfo::getInstanceInfo();
      $connectToConferenceResult = $info->getActionResult();
      $durationConnected = $connectToConferenceResult->getSecondsConnectedDuration();
      
    • Call up conference BobsChatRoom, requesting conferenceFirstPage when the call to the conference is answered. Connect to the conference once all conferenceFirstPage's actions have run. Carry on with the next action once the connect to conference has finished:

      $ctc = new Aculab\TelephonyRestAPI\ConnectToConference("BobsChatRoom", $participant_config);
      $ctc->setHoldMedia(Aculab\TelephonyRestAPI\Play::playFile('cool_jazz.wav'));
      $ctc->setSecondsAnswerTimeout(30);
      
      $call_config = new Aculab\TelephonyRestAPI\SecondaryCallConfiguration();
      $call_config->setMinutesMaxCallDuration(240);
      $call_config->setRecord(true);
      $call_config->setFirstPage('conferenceFirstPage');
      $call_config->setErrorPage('conferenceErrorPage');
      $call_config->setFinalPage('conferenceFinalPage');
      $ctc->setSecondaryCallConfiguration($call_config);
      
      $actions->add($ctc);