Skip to main content
Routing rules in Zero Runtime allow you to control how inbound and outbound SIP calls are routed to specific rooms or agents based on the configurations you define. With routing rules, you can flexibly direct calls according to your business logic, such as sending support calls to a particular room or routing sales calls to a specific agent. You can configure routing rules using the Zero Runtime dashboard or programmatically via the API.

Configure routing rules using dashboard

Routing rules are created from a phone number in the dashboard:
  1. In the Zero Runtime Dashboard, go to Telephony > Phone Numbers.
  2. Click Configure Rule on your number, then Create New Routing Rule. To reuse a rule, choose Assign Existing Rule instead.
  3. Fill in the details:
    • Routing Rule Name and API Key.
    • Call Direction: Inbound to receive calls, or Outbound to place them.
    • Phone Numbers: The numbers this rule applies to.
    • Room Configuration: Dynamic creates a new room per call (set a Room Prefix and optional Room PIN). Static sends every call to a fixed room.
    • Agent Configuration: Enter the Agent Name or ID and click Verify Agent ID. Optionally add Agent Meta Data as key-value pairs.
    • SIP Header Mapping (optional): Convert metadata into SIP headers for outbound requests.
    • Access Control (optional): Limit calls to Allowed Numbers or Allowed IP Addresses.
    • Tags (optional): Label the rule.
  4. Click Create Rule. The rule applies immediately, and you can manage all rules in the Routing Rules tab.

Configure routing rules using API

You can also create routing rules using the API for automation or advanced use cases. Endpoint Parameters:
  • gatewayId: The ID of the gateway this routing rule belongs to.
  • name: A descriptive name for the routing rule.
  • numbers: Array of phone numbers associated with this rule.
  • dispatch: Defines how calls should be dispatched (to a room or agent).
  • hidePhoneNumber: (Optional) Hide the caller’s phone number.
  • metadata: (Optional) Custom metadata key-value pairs.
  • tags: (Optional) Custom tags for the rule.
See the Create Routing Rule API for the full request and response schema.

API Reference