Skip to main content

Forwarding a PSTN Call Into a Zero Runtime Room

When using Twilio as your SIP/PSTN provider, you may need to forward an incoming phone call into a specific Zero Runtime room.
This is useful when:
  • You want to route calls dynamically to different room IDs.
  • You don’t want to configure a fixed room inside Zero Runtime Routing Rules.
Twilio requires a webhook endpoint that returns TwiML, telling Twilio which SIP URI to dial. This SIP URI connects directly to the Zero Runtime SIP Gateway with the room ID appended as a query parameter.

Example: Node.js Express Webhook

Create a simple Express server that Twilio will call whenever someone dials your Twilio number.

How It Works

  1. Twilio receives an incoming call on your phone number, then it sends a webhook to your server for call instructions.
  2. Your server responds with TwiML containing the SIP URI + room ID.
  3. Twilio dials the Zero Runtime SIP Gateway, which connects the caller into the room.