open_conference()
  • 1 Minute to read

open_conference()


Article summary

This function creates an open conference component that is used to send call requests

The open conference component provides a title and subtitle for a first screen when the call/conference has not yet been initiated. It provides a button to press to initiate the call, new title and subtitle for the post-initiation screen, as well as customization options.

Reference

Screenshot 2023-06-20 at 4.03.49 PM.png

Explore more about this component here

Arguments

ArgumentsTypeDefault ValueDescription
titlestringTitle of the modal (mandatory)
title_sizeenumUI_TITLE_SIZE.MEDIUMSize of the title
subtitlestringSubtitle of the modal (optional)
clientstrName of the client where the robot is located
call_on_joinboolFalseSend call request as soon as the screen is opened
button_textstr'Make a Call'Text of the call button
loading_subtitlestr'Loading . . . 'Subtitle of the loading screen after button press
show_back_buttonboolFalseShow a button to go back
back_button_textstring"Back"Text of the back button
button_sizeint1Button size (1 = SMALL, 2 = MEDIUM, 3 = LARGE)
languageslistNoneList of languages to be displayed on the screen (optional)
chosen_languagestrNoneIf list given, string representing chosen language
themeenumUI_THEME_TYPE.DARKEnum to define the theme of the screen, check UI_THEME_TYPE
custom_styledictNoneDictionary containing custom styles for the modal (optional)
waitboolTrueBool indicating to wait for user response (optional)
callbackcallableNoneCallable function to handle the response (optional)

See the complete list of general enumerations.

Return

Dictionary that contains the action performed by the user
Ex: {'action': 'back_pressed', 'app_id': 'doctest'}

Example

...


class RayaApplication(RayaApplicationBase):

    async def setup(self):
        self.UI = await self.enable_controller('ui')
        ....
        
    async def loop(self):
     ....
        response = await self.UI.open_conference(
            title="Hello, Can I Help you?", 
            subtitle="Click below to call the nurse", 
            wait = True, 
            button_text = "Call the Nurse", 
            loading_subtitle= "waiting for nurse to answer", 
            client = "ui-kit"
        )
        self.log.info(response)
      ...
      
    async def finish(self):
      ...

...
"""
This is show when the back button is clicked:
{'action': 'back_pressed', 'app_id': 'doctest'}
"""

Was this article helpful?