### Jigasi Command-Line Usage Example Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/configuration.md This example demonstrates how to start Jigasi with custom media port ranges and a specified log directory. ```bash ./jigasi.sh --min-port 5000 --max-port 25000 --logdir /var/log/jigasi ``` -------------------------------- ### Initialize and Use VoskTranscriptionService Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/api-reference-transcription.md Example of initializing the VoskTranscriptionService, checking its configuration, and starting a streaming session for a participant. ```java VoskTranscriptionService service = new VoskTranscriptionService(); if (service.isConfiguredProperly()) { Participant p = new Participant("user1", "en"); StreamingRecognitionSession session = service.initStreamingSession(p); // Send audio session.stop(); } ``` -------------------------------- ### Usage Example: Creating and Listening to SipGatewaySession Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/api-reference-session.md Demonstrates the typical creation of a SipGatewaySession and adding a listener for session start events. Note that direct instantiation is uncommon; it's usually managed by SipGateway. ```java // Typically created by SipGateway, not directly SipGatewaySession session = new SipGatewaySession( callContext, bundleContext, sipGateway ); // Add listener session.addListener(new GatewaySessionListener() { @Override public void onSessionStarted(AbstractGatewaySession session) { System.out.println("SIP session started"); } }); ``` -------------------------------- ### Start Jigasi with Default Configuration Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/README.md Starts Jigasi using its default configuration settings. No specific arguments are required. ```bash ./jigasi.sh ``` -------------------------------- ### XMPP VisitorsPromotionResponseExtension Example Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/INDEX.md Example of using the VisitorsPromotionResponseExtension for XMPP communication within Jigasi. ```java VisitorsPromotionResponseExtension visitorsPromotionResponseExtension = new VisitorsPromotionResponseExtension(); // Set properties as needed StanzaBuilder.createResponseStanza(iqRequest, "to@example.com", "from@example.com", visitorsPromotionResponseExtension) .build(); ``` -------------------------------- ### Install Google Cloud CLI Source: https://github.com/jitsi/jigasi/blob/master/README.md Install the Google Cloud SDK on Debian/Ubuntu systems to use Google Cloud speech-to-text API. This involves adding the Google Cloud repository and installing the `google-cloud-cli` package. ```bash curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo gpg --dearmor -o /usr/share/keyrings/cloud.google.gpg echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list sudo apt-get update && sudo apt-get install google-cloud-cli gcloud init gcloud auth application-default login ``` -------------------------------- ### TranscriptionGatewaySession Usage Example Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/api-reference-session.md Demonstrates how to create a TranscriptionGatewaySession and attach listeners for session lifecycle events like starting and failure. ```java // Session created by TranscriptionGateway TranscriptionGatewaySession session = new TranscriptionGatewaySession( callContext, bundleContext, transcriptionGateway ); // Listener for transcription lifecycle session.addListener(new GatewaySessionListener() { @Override public void onSessionStarted(AbstractGatewaySession s) { System.out.println("Transcription started"); } @Override public void onSessionFailed(AbstractGatewaySession s) { System.out.println("Transcription failed"); } }); ``` -------------------------------- ### Authorization Configuration Example Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/api-reference-callcontrol.md Example of configuring an allowed JID for issuing dial commands in Jigasi. ```properties org.jitsi.jigasi.ALLOWED_JID=jicofo@focus.mydomain.com ``` -------------------------------- ### SipGateway Usage Example Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/api-reference-gateway.md Demonstrates the initialization and configuration of a SipGateway with a SIP provider. ```java SipGateway sipGateway = new SipGateway(bundleContext); ProtocolProviderService sipProvider = getSipProviderService(); sipGateway.setSipProvider(sipProvider); ``` -------------------------------- ### Complete sip-communicator.properties Example Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/configuration.md This example demonstrates a comprehensive configuration file for Jigasi, including settings for SIP and XMPP accounts, feature enablement, gateway parameters, REST API, and logging. ```properties # SIP Account net.java.sip.communicator.impl.protocol.sip.acc-sip-1=acc-sip-1 net.java.sip.communicator.impl.protocol.sip.acc-sip-1.ACCOUNT_UID=SIP:jigasi@sipserver.com net.java.sip.communicator.impl.protocol.sip.acc-sip-1.USER_ID=jigasi@sipserver.com net.java.sip.communicator.impl.protocol.sip.acc-sip-1.SERVER_ADDRESS=sipserver.com net.java.sip.communicator.impl.protocol.sip.acc-sip-1.SERVER_PORT=5060 net.java.sip.communicator.impl.protocol.sip.acc-sip-1.PASSWORD= # XMPP Account net.java.sip.communicator.impl.protocol.jabber.acc-xmpp-1=acc-xmpp-1 net.java.sip.communicator.impl.protocol.jabber.acc-xmpp-1.ACCOUNT_UID=Jabber:jigasi@auth.myserver.com net.java.sip.communicator.impl.protocol.jabber.acc-xmpp-1.USER_ID=jigasi@auth.myserver.com net.java.sip.communicator.impl.protocol.jabber.acc-xmpp-1.SERVER_ADDRESS=xmpp.myserver.com net.java.sip.communicator.impl.protocol.jabber.acc-xmpp-1.SERVER_PORT=5222 net.java.sip.communicator.impl.protocol.jabber.acc-xmpp-1.PASSWORD= net.java.sip.communicator.impl.protocol.jabber.acc-xmpp-1.DOMAIN_BASE=myserver.com net.java.sip.communicator.impl.protocol.jabber.acc-xmpp-1.BREWERY=JigasiBrewery@internal.auth.myserver.com # Features org.jitsi.jigasi.ENABLE_SIP=true org.jitsi.jigasi.ENABLE_TRANSCRIPTION=false # Gateway org.jitsi.jigasi.DEFAULT_JVB_ROOM_NAME=default-room org.jitsi.jigasi.JVB_INVITE_TIMEOUT=30000 org.jitsi.jigasi.DEFAULT_CALL_EMPTY_TIMEOUT=30000 # REST API org.jitsi.jigasi.rest.jetty.port=8788 # Logging net.java.sip.communicator.util.log.LEVEL=INFO ``` -------------------------------- ### Usage Example Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/api-reference-callcontrol.md Provides a Java code example demonstrating how to initialize and use the CallControl class within an XMPP environment. ```APIDOC ## Usage Example ```java CallControl callControl = new CallControl(sipGateway, configService); // Register with XMPP provider XMPPConnection connection = ...; iqRequestHandler.register( new IQRequestHandler() { @Override public IQ handleIQRequest(IQ iq) { return callControl.handleRequest(iq); } } ); ``` ``` -------------------------------- ### GoogleCloudTranscriptionService Usage Example Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/api-reference-transcription.md Example of initializing and using the GoogleCloudTranscriptionService for streaming recognition. Ensure the service is properly configured before use. ```java GoogleCloudTranscriptionService service = new GoogleCloudTranscriptionService(); if (service.isConfiguredProperly()) { Participant p = new Participant("user1", "en"); StreamingRecognitionSession session = service.initStreamingSession(p); // ... send audio packets session.stop(); } ``` -------------------------------- ### Start Jigasi with Custom Configuration Directory Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/README.md Starts Jigasi and specifies a custom directory for its configuration files. This is useful for managing multiple Jigasi configurations or non-standard deployment paths. ```bash ./jigasi.sh --configdir /etc/jitsi/jigasi --configdirname config ``` -------------------------------- ### Start Jigasi with Custom Log Directory Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/README.md Starts Jigasi and directs log output to a specified directory. This allows for centralized log management or custom log file locations. ```bash ./jigasi.sh --logdir /var/log/jigasi ``` -------------------------------- ### Jigasi CallControl Usage Example Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/api-reference-callcontrol.md Example demonstrating how to instantiate CallControl and register its request handler with an XMPP connection. ```java CallControl callControl = new CallControl(sipGateway, configService); // Register with XMPP provider XMPPConnection connection = ...; iqRequestHandler.register( new IQRequestHandler() { @Override public IQ handleIQRequest(IQ iq) { return callControl.handleRequest(iq); } } ); ``` -------------------------------- ### Start Jigasi with Custom Port Range Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/README.md Starts Jigasi and specifies a custom range for ports to be used. This is useful for network configurations that require specific port allocations. ```bash ./jigasi.sh --min-port 5000 --max-port 25000 ``` -------------------------------- ### XMPP RaiseHandExtension Example Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/INDEX.md Example of using the RaiseHandExtension for XMPP communication within Jigasi. ```java RaiseHandExtension raiseHandExtension = new RaiseHandExtension(); // Set properties as needed StanzaBuilder.createIqStanza("set", "urn:xmpp:jingle:1", "session-modify", "to@example.com", "from@example.com", raiseHandExtension) .build(); ``` -------------------------------- ### Start Jigasi Application Source: https://github.com/jitsi/jigasi/blob/master/README.md Execute the Jigasi startup script to launch the application. This script is located in the extracted application directory. ```bash cd jigasi/target/jigasi-{os-version}-{version}/ ./jigasi.sh ``` -------------------------------- ### GatewayListener Usage Example Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/api-reference-gateway.md Implement the GatewayListener interface to handle gateway events. Register your custom listener with a SipGateway instance. ```java public class MyGatewayListener implements GatewayListener { @Override public void onSessionAdded(AbstractGatewaySession session) { System.out.println("Session added: " + session); } @Override public void onReady() { System.out.println("Gateway is ready!"); } } // Register the listener SipGateway sipGateway = ...; sipGateway.addGatewayListener(new MyGatewayListener()); ``` -------------------------------- ### Start Transcription (XMPP) Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/README.md Instruct Jigasi to start a transcription session for a specific JVB room. This requires the transcription service to be configured. ```xml
``` -------------------------------- ### Start Transcription Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/README.md Initiates a transcription session via XMPP. ```APIDOC ## Start Transcription (XMPP) ### Description Initiates a transcription session for a specific room. This is achieved by sending an IQ set stanza to Jigasi. ### XML Stanza Example ```xml
``` ### Parameters - **to** (string) - Must be 'jitsi_meet_transcribe'. - **JvbRoomName** (string) - Required - The name of the Jitsi Meet room to transcribe. ``` -------------------------------- ### Answer IQ Format Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/api-reference-callcontrol.md Example of an IQ stanza to answer an incoming SIP call. ```xml ``` -------------------------------- ### Implement GatewaySessionListener for Session Monitoring Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/api-reference-session.md Example implementation of GatewaySessionListener to monitor and log session state changes. Register an instance with a SipGateway to receive events. ```java public class SessionStateMonitor implements GatewaySessionListener { @Override public void onSessionStarted(AbstractGatewaySession session) { System.out.println("Session " + session.getMucDisplayName() + " started"); // Log metrics, update dashboards, etc. } @Override public void onSessionFailed(AbstractGatewaySession session) { System.out.println("Session failed: " + session.getMucDisplayName()); // Alert monitoring, cleanup resources } @Override public void onSessionEnded(AbstractGatewaySession session) { System.out.println("Session ended: " + session.getMucDisplayName()); // Finalize logs, save statistics } } // Register with gateway SipGateway sipGateway = ...; sipGateway.addGatewayListener(new SessionStateMonitor()); ``` -------------------------------- ### Rayo Dial IQ Transcription Start Use Case Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/endpoints-xmpp.md Use this Rayo Dial IQ format to start a transcription session. The 'to' attribute should be set to 'jitsi_meet_transcribe', and the 'JvbRoomName' header is required. ```xml
``` -------------------------------- ### Setup JVB Conference and Bridge Media Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/api-reference-session.md Called when the session successfully joins the JVB conference, initiating the audio/video bridge. ```java protected void onJvbConferenceJoined(JvbConference jvbConference) ``` -------------------------------- ### Initialize Streaming Recognition Session Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/api-reference-transcription.md Starts a new session for continuous audio streaming transcription. This method requires participant information and will throw an exception if streaming is not supported. ```java StreamingRecognitionSession initStreamingSession(Participant participant) throws UnsupportedOperationException ``` -------------------------------- ### Run Vosk Server with Docker Source: https://github.com/jitsi/jigasi/blob/master/README.md Start the Vosk speech recognition server using Docker. This command runs the server in detached mode and exposes port 2700. ```bash docker run -d -p 2700:2700 alphacep/kaldi-en:latest ``` -------------------------------- ### Usage Example for TranscriptionListener in Java Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/api-reference-transcription.md Demonstrates how to add a TranscriptionListener to a Transcriber instance to process transcription results and errors. Ensure the Transcriber is properly initialized with session, service, and locale. ```java Transcriber transcriber = new Transcriber(session, service, Locale.ENGLISH); transcriber.addTranscriptionListener(new TranscriptionListener() { @Override public void onResult(TranscriptionResult result) { System.out.println(result.getParticipant().getName() + ": " + result.getTranscription()); } @Override public void onError(String message) { System.err.println("Error: " + message); } }); transcriber.start(); ``` -------------------------------- ### REST API Shutdown Example Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/INDEX.md Use this curl command to initiate a graceful shutdown of the Jigasi REST API. ```bash curl POST /about/shutdown ``` -------------------------------- ### REST API Debug State Inspection Example Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/INDEX.md Use this curl command to inspect the detailed state of the Jigasi REST API. ```bash curl GET /debug ``` -------------------------------- ### Get Destination URI String Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/api-reference-session.md Retrieves the destination URI, which can be a room name or a phone number. ```java public String getUriString() ``` -------------------------------- ### Add XMPP Account Configuration Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/api-reference-rest.md This example demonstrates how to add an XMPP account configuration to Jigasi using a POST request to the /configure/call-control-muc/add endpoint. It sends a JSON payload with account details, including credentials encoded in base64. ```bash #!/bin/bash cat < ``` -------------------------------- ### Dial IQ Format Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/api-reference-callcontrol.md Example of an IQ stanza to initiate an outgoing call or transcription session using the Rayo protocol. ```xml
``` -------------------------------- ### Call Key Methods Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/types.md Provides essential methods for managing a call, such as retrieving call information, identifying the initiator, accessing peers, hanging up, and getting the associated conference. ```java String getCallID() CallPeer initiator() List getCallPeers() void hangup() Conference getConference() ``` -------------------------------- ### XMPP Account Setup for Control Room Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/configuration.md Configure an XMPP account for Jigasi's control room. This includes user ID, server details, password, and other connection parameters. ```properties net.java.sip.communicator.impl.protocol.jabber.acc-xmpp-1=acc-xmpp-1 net.java.sip.communicator.impl.protocol.jabber.acc-xmpp-1.ACCOUNT_UID=Jabber:jigasi@auth.meet.example.com net.java.sip.communicator.impl.protocol.jabber.acc-xmpp-1.USER_ID=jigasi@auth.meet.example.com net.java.sip.communicator.impl.protocol.jabber.acc-xmpp-1.SERVER_ADDRESS=192.168.1.100 net.java.sip.communicator.impl.protocol.jabber.acc-xmpp-1.SERVER_PORT=5222 net.java.sip.communicator.impl.protocol.jabber.acc-xmpp-1.PASSWORD= net.java.sip.communicator.impl.protocol.jabber.acc-xmpp-1.ALLOW_NON_SECURE=true net.java.sip.communicator.impl.protocol.jabber.acc-xmpp-1.DOMAIN_BASE=meet.example.com net.java.sip.communicator.impl.protocol.jabber.acc-xmpp-1.BREWERY=JigasiBrewery@internal.auth.meet.example.com ``` -------------------------------- ### Create SipGateway Instance Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/api-reference-gateway.md Instantiates a new SipGateway. Requires an OSGi bundle context for service registration. ```java public SipGateway(BundleContext bundleContext) ``` -------------------------------- ### Get SIP Account Property Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/api-reference-gateway.md Fetches a specific property from the SIP account configuration. Returns null if the property is not set or the provider is not initialized. ```java public String getSipAccountProperty(String propertyName) ``` -------------------------------- ### Publish Transcription Started Event Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/endpoints-xmpp.md Published to the conference MUC when transcription begins for a conference. This signals the start of transcription services. ```xml Transcription started ``` -------------------------------- ### REST API Add MUC Account Example Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/INDEX.md Use this curl command to add a MUC account for call control via the Jigasi REST API. Ensure all required fields are provided. ```bash POST /configure/call-control-muc/ { "muc_jid": "muc@example.com", "login": "user@example.com", "password": "password" } ``` -------------------------------- ### Java Servlet Debug GET Method Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/api-reference-rest.md This Java method handles GET requests to the debug endpoint of the REST API. ```java protected void doGetDebugJSON(HttpServletRequest request, HttpServletResponse response) throws IOException ``` -------------------------------- ### XMPP IQ Key Methods Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/types.md Key methods for interacting with XMPP IQ stanzas, including getting the type, sender, receiver, stanza ID, and error information. ```java IQ.Type getType() // set, get, result, error String getFrom() String getTo() String getStanzaId() StanzaError getError() ``` -------------------------------- ### onReady Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/api-reference-gateway.md Called when the gateway becomes ready to create new sessions. This method is part of the GatewayListener interface. ```APIDOC ## onReady ### Description Called when the gateway becomes ready to create new sessions. ### Method Signature ```java void onReady() ``` ``` -------------------------------- ### initStreamingSession Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/api-reference-transcription.md Initializes a session for continuous audio streaming for a given participant. ```APIDOC ## initStreamingSession ### Description Initializes a session for continuous audio streaming. This session will be used to send audio packets for real-time transcription. ### Method N/A (Method signature provided) ### Endpoint N/A ### Parameters #### Request Parameters - **participant** (Participant) - Required - Information about the participant for whom the streaming session is being initialized. ### Returns - **StreamingRecognitionSession**: An object representing the streaming session, used for sending audio packets. ### Throws - **UnsupportedOperationException**: If the service does not support streaming recognition. ``` -------------------------------- ### isReady Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/api-reference-gateway.md Checks if the gateway is registered and ready to create sessions. Returns true if the SIP provider has successfully registered with the SIP server, false otherwise. ```APIDOC ## isReady ### Description Checks if the gateway is registered and ready to create sessions. ### Method ```java public boolean isReady() ``` ### Parameters None ### Returns - boolean - `true` if the gateway is registered and ready to create sessions, `false` otherwise ### Note This method returns true after the SIP provider successfully registers with the SIP server. ``` -------------------------------- ### XML Response for Gateway Not Ready Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/errors.md An example of an XML error response indicating that the gateway is not ready for a dial request. This 'service-unavailable' error typically means the SIP or Transcription gateway is not initialized or is shutting down. ```xml Jigasi not ready ``` -------------------------------- ### SipGateway Constructor Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/api-reference-gateway.md Initializes a new SipGateway instance to manage SIP sessions. It requires an OSGi bundle context for service registration. ```APIDOC ## SipGateway Constructor ### Description Creates a new SipGateway instance that will manage SIP sessions. It requires an OSGi bundle context for service registration. ### Method ```java public SipGateway(BundleContext bundleContext) ``` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters - **bundleContext** (BundleContext) - Required - OSGi bundle context for service registration ``` -------------------------------- ### Create Transcriber Account Source: https://github.com/jitsi/jigasi/blob/master/README.md Register a transcriber account with Prosody. Ensure Prosody is restarted after adding virtual host configuration. ```bash prosodyctl register transcriber recorder.yourdomain.com jigasirecorderexamplepass ``` -------------------------------- ### Get Call Initiator Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/api-reference-session.md Retrieves the call initiator for incoming calls. ```java public CallPeer getInitiator() ``` -------------------------------- ### Get Conference Members Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/api-reference-callcontrol.md Retrieves a collection of all current members in the conference. ```java public Collection getMembers() ``` -------------------------------- ### ConfigurationService Key Methods Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/types.md Key methods for retrieving configuration properties of various types (String, boolean, int, long) from the ConfigurationService. Default values can be provided for convenience. ```java String getString(String property) String getString(String property, String defaultValue) boolean getBoolean(String property, boolean defaultValue) int getInt(String property, int defaultValue) long getLong(String property, long defaultValue) ``` -------------------------------- ### Get MUC Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/api-reference-callcontrol.md Returns the Smack ChatRoom object representing the conference. ```java public ChatRoom getMUC() ``` -------------------------------- ### isReady Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/api-reference-gateway.md Checks if the gateway is ready to create transcription sessions. Returns true when the XMPP provider is registered and ready. ```APIDOC ## isReady ### Description Checks if the gateway is ready to create transcription sessions. Returns true when the XMPP provider is registered and ready. ### Method public boolean isReady() ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Response #### Success Response (200) - **return value** (boolean) - true if the gateway is ready, false otherwise ``` -------------------------------- ### Get Room Password Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/api-reference-callcontrol.md Retrieves the conference password, if one is set. ```java public String getRoomPassword() ``` -------------------------------- ### VisitorsPromotionResponseExtension Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/api-reference-callcontrol.md An XMPP extension for managing visitor promotion and demotion. ```APIDOC ## VisitorsPromotionResponseExtension ### Description Extension for visitor promotion/demotion handling. ### Class Signature ```java public class VisitorsPromotionResponseExtension extends IQData ``` ### XML Namespace `urn:xmpp:jitsi-meet:visitors-promotion-response:0` ``` -------------------------------- ### Get Statistics Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/README.md Retrieves statistics about the Jigasi service, such as active sessions. ```APIDOC ## POST /about/stats ### Description Retrieves statistics about the Jigasi service. ### Method POST ### Endpoint /about/stats ### Response #### Success Response (200) - **activeSessions** (integer) - The number of currently active sessions. - **totalSessions** (integer) - The total number of sessions handled. ``` -------------------------------- ### Constructor for TranscriptionGatewaySession Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/api-reference-session.md Initializes a new TranscriptionGatewaySession. Requires call context, OSGi bundle context, and the parent transcription gateway. ```java public TranscriptionGatewaySession(CallContext callContext, BundleContext bundleContext, TranscriptionGateway gateway) ``` -------------------------------- ### AbstractGateway isReady Method Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/api-reference-gateway.md Abstract method to check if the gateway is ready to create new sessions. Subclasses must provide the implementation. ```java public abstract boolean isReady() ``` -------------------------------- ### Get Debug State Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/README.md Retrieves the current debug state of the Jigasi service. ```APIDOC ## GET /debug ### Description Retrieves the current debug state of the Jigasi service. ### Method GET ### Endpoint /debug ### Response #### Success Response (200) - **debugInfo** (object) - Contains various debug information about the service. ``` -------------------------------- ### AbstractGatewaySession Constructor Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/api-reference-session.md Initializes a new instance of the AbstractGatewaySession class. ```APIDOC ## Constructor AbstractGatewaySession ### Description Initializes a new instance of the AbstractGatewaySession class. ### Parameters #### Path Parameters - **callContext** (T) - Required - The call context for this session - **bundleContext** (BundleContext) - Required - OSGi bundle context ``` -------------------------------- ### SipGatewaySession Constructor Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/api-reference-session.md Instantiates a new SipGatewaySession. Typically created by SipGateway, not directly. ```java public SipGatewaySession(CallContext callContext, BundleContext bundleContext, SipGateway gateway) ``` -------------------------------- ### Hangup IQ Format Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/api-reference-callcontrol.md Example of an IQ stanza to terminate an active call or session. ```xml ``` -------------------------------- ### Get Destination Phone Number Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/api-reference-session.md Retrieves the destination phone number for SIP calls. ```java public String getDestinationNumber() ``` -------------------------------- ### VisitorsPromotionResponseExtension Java Class Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/api-reference-callcontrol.md Defines the VisitorsPromotionResponseExtension for managing visitor promotion and demotion. This class extends IQData. ```java public class VisitorsPromotionResponseExtension extends IQData ``` -------------------------------- ### Build Jigasi with Maven Source: https://github.com/jitsi/jigasi/blob/master/README.md Compile and package Jigasi using Maven. Ensure the assembly plugin is enabled for packaging. ```bash cd jigasi mvn install -Dassembly.skipAssembly=false ``` -------------------------------- ### Get Conference Password Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/api-reference-session.md Retrieves the conference password if one is set for the call context. ```java public String getRoomPassword() ``` -------------------------------- ### Get SIP Call Object Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/api-reference-session.md Retrieves the SIP Call object associated with this session. ```java public Call getCall() ``` -------------------------------- ### GET /debug Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/errors.md Endpoint to inspect active sessions and the current state of the Jigasi service. ```APIDOC ## GET /debug ### Description Endpoint to inspect active sessions and the current state of the Jigasi service. ### Endpoint `GET /debug` ### Use Inspect active sessions and state ### Request Example ```bash curl http://localhost:8788/debug | jq . ``` ``` -------------------------------- ### Get Conference Name Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/api-reference-callcontrol.md Retrieves the JVB conference room name associated with this instance. ```java public String getConferenceName() ``` -------------------------------- ### Enable Advertising Transcript URL Source: https://github.com/jitsi/jigasi/blob/master/README.md Set to true to advertise the URL for serving final transcripts when Jigasi joins a room. Default is false. ```properties org.jitsi.jigasi.transcription.ADVERTISE_URL=false ``` -------------------------------- ### Check SipGateway Readiness Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/api-reference-gateway.md Determines if the gateway is fully registered and prepared to establish new sessions. Returns true once the SIP provider has successfully registered. ```java public boolean isReady() ``` -------------------------------- ### Dial IQ Success Response Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/api-reference-callcontrol.md Example of a successful result IQ stanza after a dial request. ```xml ``` -------------------------------- ### Get Focus Authentication Cycles Count Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/api-reference-callcontrol.md Returns the number of focus authentication cycles that have occurred. ```java public int focusAuthCyclesCount() ``` -------------------------------- ### Run LibreTranslate Docker Container Source: https://github.com/jitsi/jigasi/blob/master/README.md Run the LibreTranslate Docker container to provide translation services. Note that it downloads language models on startup. ```bash docker run -d -p 5000:5000 libretranslate/libretranslate ``` -------------------------------- ### XMPP Error Stanza: Service Unavailable Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/endpoints-xmpp.md Returned when the requested service is not available, for example, if the gateway is not ready. ```xml Gateway not ready ``` -------------------------------- ### Dial IQ Error Response Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/api-reference-callcontrol.md Example of an error result IQ stanza for a failed dial request. ```xml ``` -------------------------------- ### CallPeer Interface Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/types.md Represents a party in a call. Provides methods to get information about the peer and their media handler. ```APIDOC ## CallPeer Interface **Location:** `net.java.sip.communicator.service.protocol.CallPeer` Represents a party in a call. ```java public interface CallPeer { String getDisplayName(); String getPeerID(); CallPeerState getState(); MediaAwareCallPeer getMediaHandler(); } ``` ### Description Represents a party in a call. Provides methods to get information about the peer and their media handler. ``` -------------------------------- ### Get Focus Authentication Session Expiry Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/api-reference-callcontrol.md Returns the expiry time of the focus authentication session in seconds. ```java public int focusAuthSessionExpires() ``` -------------------------------- ### SipGatewaySession Constructor Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/api-reference-session.md Initializes a new SipGatewaySession. This constructor is typically called by the SipGateway class. ```APIDOC ## SipGatewaySession Constructor ### Description Initializes a new SipGatewaySession to manage a SIP call bridged to a JVB conference. ### Signature ```java public SipGatewaySession(CallContext callContext, BundleContext bundleContext, SipGateway gateway) ``` ### Parameters #### Path Parameters - **callContext** (CallContext) - Required - Call context containing call information - **bundleContext** (BundleContext) - Required - OSGi bundle context - **gateway** (SipGateway) - Required - Parent SIP gateway instance ``` -------------------------------- ### Get JVB Conference Room Name Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/api-reference-session.md Retrieves the JVB conference room name associated with the call context. ```java public String getRoomName() ``` -------------------------------- ### TranscriptionRequest Constructor Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/api-reference-transcription.md Initializes a TranscriptionRequest with audio data and its format. Use this to prepare audio for transcription services. ```java public TranscriptionRequest(byte[] audio, AudioFormat format) ``` -------------------------------- ### Debug Information Endpoint Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/api-reference-rest.md Retrieves debug information from the Jigasi service. This endpoint is accessible via a GET request. ```APIDOC ## GET /debug ### Description Retrieves debug information from the Jigasi service. ### Method GET ### Endpoint /debug ### Response #### Success Response (200) - **debugInfo** (object) - Contains detailed debug information. ``` -------------------------------- ### Create SIP Session (Incoming Call) Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/api-reference-session.md Describes the automatic creation of a SipGatewaySession when a call listener receives an incoming call. ```java // Incoming call // Call listener receives incoming call // SipGateway creates SipGatewaySession automatically ``` -------------------------------- ### Health Check Endpoint Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/api-reference-rest.md Retrieves the health status of the Jigasi service. This endpoint is accessible via a GET request. ```APIDOC ## GET /health ### Description Checks the health status of the Jigasi service. ### Method GET ### Endpoint /health ### Response #### Success Response (200) - **status** (string) - Indicates the health status of the service. ``` -------------------------------- ### Register Jigasi XMPP Account with Prosody Source: https://github.com/jitsi/jigasi/blob/master/README.md Register a new XMPP user for Jigasi on your Prosody server. This account will be used for controlling the brewery room. ```bash prosodyctl register jigasi auth.meet.example.com topsecret ``` -------------------------------- ### Get Conference Members by Filter Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/api-reference-callcontrol.md Retrieves conference members whose display names match the provided filter. ```java public Collection getMembers(String displayNameFilter) ``` -------------------------------- ### Configure Prosody MUC Component for Jigasi Source: https://github.com/jitsi/jigasi/blob/master/README.md Append configuration lines to your Prosody server's configuration file to set up an internal MUC component for Jigasi's brewery rooms. ```lua Component "internal.auth.meet.example.com" "muc" storage = "memory" modules_enabled = { "ping"; } admins = { "focus@auth.meet.example.com", "jigasi@auth.meet.example.com" } muc_room_locking = false muc_room_default_public_jids = true ``` -------------------------------- ### REST API Statistics Example Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/INDEX.md Use this curl command to retrieve active session statistics from the Jigasi REST API. ```bash curl POST /about/stats ``` -------------------------------- ### Handle SIP Gateway Not Ready Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/errors.md When the SIP gateway is not ready, check its readiness and retry the dial operation after a delay. Ensure the SIP provider is registered and the server connection is stable. ```java // Wait for registration if (!sipGateway.isReady()) { // Retry dial after delay Thread.sleep(5000); if (sipGateway.isReady()) { // Proceed with dial } else { // Report failure to user } } ``` -------------------------------- ### AbstractGateway fireGatewayReady Method Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/api-reference-gateway.md Protected method to notify all registered listeners that the gateway has become ready. ```java protected void fireGatewayReady() ``` -------------------------------- ### REST API Health Check Example Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/INDEX.md Use this curl command to check the health status of the Jigasi REST API. ```bash curl GET /about/health ``` -------------------------------- ### Configure Google Cloud Credentials for Jigasi Source: https://github.com/jitsi/jigasi/blob/master/README.md Move the generated Google Cloud credentials file to the Jigasi configuration directory and set appropriate ownership. Then, configure Jigasi to use these credentials. ```bash mv /root/.config/gcloud/application_default_credentials.json /etc/jitsi/jigasi chown jigasi:jitsi /etc/jitsi/jigasi/application_default_credentials.json ``` -------------------------------- ### Basic SIP Account Configuration Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/configuration.md Configure a basic SIP account using the `net.java.sip.communicator.impl.protocol.sip.acc-sip-` prefix. Ensure the password is base64-encoded. ```properties net.java.sip.communicator.impl.protocol.sip.acc-sip-1=acc-sip-1 net.java.sip.communicator.impl.protocol.sip.acc-sip-1.ACCOUNT_UID=SIP:user@sipserver.com net.java.sip.communicator.impl.protocol.sip.acc-sip-1.USER_ID=user@sipserver.com net.java.sip.communicator.impl.protocol.sip.acc-sip-1.SERVER_ADDRESS=sipserver.com net.java.sip.communicator.impl.protocol.sip.acc-sip-1.SERVER_PORT=5060 net.java.sip.communicator.impl.protocol.sip.acc-sip-1.PREFERRED_TRANSPORT=TCP net.java.sip.communicator.impl.protocol.sip.acc-sip-1.PASSWORD= ``` -------------------------------- ### Get Associated Call Object Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/api-reference-session.md Retrieves the associated Call object for SIP calls, or null if it's a transcription session. ```java public Call getCall() ``` -------------------------------- ### ChatRoomMember Interface Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/types.md Represents a member of a chat room/MUC. Provides methods to get member details and their associated chat room. ```APIDOC ## ChatRoomMember Interface **Location:** `net.java.sip.communicator.service.protocol.ChatRoomMember` Represents a member of a chat room/MUC. ```java public interface ChatRoomMember { String getName(); String getNickname(); String getDisplayName(); ChatRoom getChatRoom(); } ``` ### Description Represents a member of a chat room/MUC. Provides methods to get member details and their associated chat room. ``` -------------------------------- ### TranscriptionGateway Constructor Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/api-reference-gateway.md Initializes a new TranscriptionGateway. Requires an OSGi BundleContext for service registration. ```java public TranscriptionGateway(BundleContext context) ``` -------------------------------- ### Call Interface Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/types.md Represents an active or incoming SIP call. Provides methods to get call details and manage the call. ```APIDOC ## Call Interface **Location:** `net.java.sip.communicator.service.protocol.Call` Represents an active or incoming SIP call. ```java public interface Call { String getCallID(); CallPeer initiator(); List getCallPeers(); void hangup(); Conference getConference(); } ``` ### Description Represents an active or incoming SIP call. Provides methods to get call details and manage the call. ``` -------------------------------- ### BundleContext Key Methods Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/types.md Key methods of the OSGi BundleContext for interacting with bundles and services. These are essential for accessing services and performing OSGi-related tasks. ```java Bundle getBundle() ServiceReference getServiceReference(Class) T getService(ServiceReference) void registerService(String, Object, Dictionary) ``` -------------------------------- ### Get SipGateway Debug State Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/api-reference-gateway.md Retrieves detailed debug information, including all active sessions, formatted as a JSON object. ```java public OrderedJsonObject getDebugState() ``` -------------------------------- ### Java Servlet Health Check Method Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/api-reference-rest.md This Java method handles GET requests to the health endpoint of the REST API. ```java protected void doGetHealthJSON(HttpServletRequest request, HttpServletResponse response) throws IOException ``` -------------------------------- ### Get Jigasi Statistics (REST API) Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/README.md Retrieve statistics about the Jigasi service. This can be useful for monitoring performance and resource usage. ```bash curl -X POST http://localhost:8788/about/stats ``` -------------------------------- ### Configure Transcript Base URL Source: https://github.com/jitsi/jigasi/blob/master/README.md Specify the base URL for serving final transcripts. The filename will be appended to this URL. Default is http://localhost/. ```properties org.jitsi.jigasi.transcription.BASE_URL=http://localhost/ ``` -------------------------------- ### ChatRoom Key Methods Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/types.md Provides methods for interacting with chat rooms, including joining, leaving, sending messages, and retrieving room members. ```java String getName() String getIdentifier() void join() void leave() void sendMessage(String message) Collection getMembers() ``` -------------------------------- ### Error Handling Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/api-reference-rest.md Details the error responses provided by the Jigasi REST API, including status codes and example JSON bodies. ```APIDOC ## Error Responses ### 400 Bad Request Returned when the request has invalid JSON or is missing required fields. ```json { "error": "Invalid JSON: expected field 'id'" } ``` ### 503 Service Unavailable Returned when the Jigasi service is not ready. ```json { "error": "Jigasi not ready" } ``` ``` -------------------------------- ### Configure Multiple Vosk Server Instances Source: https://github.com/jitsi/jigasi/blob/master/README.md Configure multiple Vosk server instances for different languages by providing a JSON object with language codes as keys and WebSocket URLs as values. ```properties # org.jitsi.jigasi.transcription.vosk.websocket_url={"en": "ws://localhost:2700", "fr": "ws://localhost:2710"} ``` -------------------------------- ### Handle IllegalStateException in SipGateway Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/errors.md Shows how to catch an IllegalStateException when attempting to set the SIP provider on a SipGateway that is already configured. ```java try { sipGateway.setSipProvider(provider); } catch (IllegalStateException e) { logger.error("SIP provider already configured: " + e.getMessage()); } ``` -------------------------------- ### Get SIP Provider from SipGateway Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/api-reference-gateway.md Retrieves the currently configured SIP protocol provider service. Returns null if not yet set. ```java public ProtocolProviderService getSipProvider() ``` -------------------------------- ### GET /about/health Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/errors.md Health check endpoint to determine gateway readiness. It returns the registration state and Jigasi's health status. ```APIDOC ## GET /about/health ### Description Health check endpoint to determine gateway readiness. It returns the registration state and Jigasi's health status. ### Endpoint `GET /about/health` ### Use Determine gateway readiness ### Request Example ```bash curl http://localhost:8788/about/health ``` ### Response Example ```json [{"registrationState":"Registered"}, {"jigasiHealthStatus":"HEALTHY"}] ``` ``` -------------------------------- ### addListener Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/api-reference-session.md Adds a listener to monitor session state changes. ```APIDOC ## Method addListener ### Description Adds a session state listener. ### Parameters #### Path Parameters - **listener** (GatewaySessionListener) - Required - The listener to add ``` -------------------------------- ### RegistrationStateChangeEvent Methods Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/types.md Provides methods to retrieve the new and old registration states, and the associated provider service. ```java RegistrationState getNewState() RegistrationState getOldState() ProtocolProviderService getProvider() ``` -------------------------------- ### Get Jigasi Debug State (REST API) Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/README.md Retrieve the current debug state of the Jigasi service. Useful for diagnosing issues. ```bash curl http://localhost:8788/debug | jq . ``` -------------------------------- ### Gateway Session Listener Interface Source: https://github.com/jitsi/jigasi/blob/master/_autodocs/api-reference-session.md Interface for listening to session state changes. Implement this to react to session start, failure, or end events. ```java default void onSessionStarted(AbstractGatewaySession session) ``` ```java default void onSessionFailed(AbstractGatewaySession session) ``` ```java default void onSessionEnded(AbstractGatewaySession session) ```