18 Building Intelligent Media Connector UA Applications
When building a SIP Servlet–based user agent (UA) application for the Intelligent Media Connector domain, use the Media Gateway Service API to create and manage media sessions, and the AI Gateway Service API to create and manage Speech-To-Text (STT) sessions on the Intelligent AI Connectors (IACs).
The UA application handles SIP signaling (for example, INVITE, ACK, BYE, re-INVITE, and CANCEL) and delegates media session lifecycle management to the Media Gateway Service (MGS) and STT session lifecycle management to the AI Gateway Service (AGS). The application does not process RTP directly, nor does it communicate with the IACs directly.
- MediaGatewayServiceApi—Use this to create, modify, deactivate, or delete media sessions as well as to get session status.
- MediaFactory—Use this to obtain the API instance and build CreateMediaRequest, ModifyMediaRequest, and related DTOs (ingress/egress streams, codecs, SDP, etc.).
The AI Gateway API provides two high-level objects:
- AIGatewayService—Use this to create, update, or delete STT sessions, and to obtain the WebSocket URL for result streaming.
- AIGatewayServiceFactory—Use this to obtain the AIGatewayService instance and build CreateAISessionRequest, ModifyAISessionRequest, and related DTOs.
As a developer, you can use the MGS and AGS APIs directly without worrying about calls to the underlying infrastructure. The MGS handles calls to the Media Flow Engines and RTP Proxies. The AGS handles calls to the IACs and manages the audio stream routing to the STT pipeline.