Skip to main content

SIP Routing

SIP routing selects which profile handles an incoming call.

This is the first routing decision in the call lifecycle.

SIP routing is declared under [routing].

[routing]

[[routing.sip]]
profile = "main"

[routing.sip.match]
called = ["1000", "concierge"]

[[routing.sip]]
profile = "openai_realtime_profile"

[routing.sip.match]
called = ["2000", "openai_realtime_profile"]

[[routing.sip]]
profile = "openai_realtime_profile"

[routing.sip.match]
called = ["3000", "openai_realtime_profile"]

SIP route entries

Each SIP route is declared as an array item:

[[routing.sip]]
profile = "main"

The profile field tells the runtime which profile to use when the route matches.

Match block

Each route has a match block.

[routing.sip.match]
called = ["1000", "concierge"]

The called array contains values that can match the called destination.

In this example, a call to 1000 or concierge selects the main profile.

Multiple routes

You can define multiple SIP routes.

[[routing.sip]]
profile = "openai_realtime_profile"

[routing.sip.match]
called = ["2000", "openai_realtime_profile"]

[[routing.sip]]
profile = "openai_realtime_profile"

[routing.sip.match]
called = ["3000", "openai_realtime_profile"]

Both routes select the same profile, but they match different called values.

This is useful when several numbers or aliases should use the same call experience.

How routing connects to profiles

Routing selects profiles by name.

profile = "main"

This references:

[profiles.main]

The selected profile then determines:

  • persona
  • policy
  • realtime modality

Example call flow

A call arrives for 1000.

The routing table matches:

called = ["1000", "concierge"]

The runtime selects:

profile = "main"

The main profile uses:

persona = "concierge"
policy = "concierge"
realtime = "deepgram_rt"

The call now runs with the concierge persona, concierge policy, and Deepgram realtime modality.

Design guidelines

Keep SIP routing simple and explicit.

A good SIP route:

  • matches a clear called value
  • points to one profile
  • avoids overlapping matches unless intentional
  • uses profile names that describe the experience

Do not place adapter or function configuration in SIP routing. SIP routing only selects the profile.

Summary

SIP routing decides which profile handles the call.

It is the entry point of runtime composition. After a profile is selected, the rest of the runtime is determined by that profile’s persona, policy, and modality.