`siphon.telephony.inbound.Dispatch`

siphon.telephony.inbound.Dispatch

Dispatch creates an inbound routing rule so calls to a number/trunk reach your agent worker.

Import:

from siphon.telephony.inbound import Dispatch

Constructor

Dispatch(
    agent_name: Optional[str] = "Calling-Agent-System",
    dispatch_name: str = None,
    sip_trunk_id: Optional[str] = None,
    sip_number: Optional[str] = None,
    llm: Optional[Any] = None,
    stt: Optional[Any] = None,
    tts: Optional[Any] = None,
    greeting_instructions: Optional[str] = None,
    system_instructions: Optional[str] = None,
)

Parameters

  • dispatch_name (required)
    • Stable name for the dispatch rule.
  • agent_name
    • Must match the worker name you run with Agent(...).
  • One of
    • sip_trunk_id: use an existing inbound trunk ID.
    • sip_number: let SIPHON look up or create an inbound trunk for this number.
  • Optional agent config overrides
    • llm, stt, tts, greeting_instructions, system_instructions

agent()

def agent(self)

Creates the inbound routing rule. Internally it:

  • Ensures an inbound trunk exists (reuses or creates one)
  • Creates a dispatch rule that routes inbound calls to your agent_name
  • Attaches agent_config metadata if you provided llm/stt/tts or instructions

Return value

Dispatch.agent() returns the underlying dispatch-rule creation result. On failure, it returns a dict like:

{"Error": ...}

Notes

  • If you provide sip_trunk_id but no sip_number, SIPHON attempts to infer the number from the trunk.

See also