Connecting Plivo to the Gateway
To connect a Plivo phone number to your Rymi Voice Agent, you need to configure a Plivo XML response that instructs Plivo to open a bidirectional WebSocket stream to the Rymi Gateway.
1. Expose your Gateway
If you are running the gateway locally, expose it using ngrok or a similar tunneling tool:
bash
ngrok http 80802. Plivo XML Configuration
Configure your incoming Plivo number to return the following XML response (replace rymi.ngrok-url.app with your actual domain):
xml
<Response>
<Stream keepCallAlive="true" bidirectional="true">wss://rymi.ngrok-url.app/api/v1/stream</Stream>
</Response>When a call comes in, Plivo will initiate a WebSocket connection. The Rymi Gateway will automatically extract the streamId and begin translating the PCMU (mu-law) audio into PCM linear audio for the underlying Gemini agent.