NAME

SignalWire::REST::Namespaces::PhoneNumbers - Phone number management

DESCRIPTION

Supports the standard CRUD surface plus typed helpers for binding an inbound call to a handler (SWML webhook, cXML webhook, AI agent, call flow, RELAY application/topic). The binding model is: set call_handler plus the handler-specific companion field on the phone number; the server auto-materializes the matching Fabric resource. See SignalWire::REST::PhoneCallHandler for the enum.

HELPERS

set_swml_webhook($sid, url => $url)

Route inbound calls to an SWML webhook URL. Your backend returns an SWML document per call. The server auto-creates a swml_webhook Fabric resource keyed off this URL.

set_cxml_webhook($sid, url => $url, fallback_url => $f?, status_callback_url => $s?)

Route inbound calls to a cXML (Twilio-compat / LAML) webhook. Despite the wire value laml_webhooks being plural, this creates a single cxml_webhook Fabric resource.

set_cxml_application($sid, application_id => $id)

Route inbound calls to an existing cXML application by ID.

set_ai_agent($sid, agent_id => $id)

Route inbound calls to an AI Agent Fabric resource by ID.

set_call_flow($sid, flow_id => $id, version => $v?)

Route inbound calls to a Call Flow by ID. version accepts working_copy or current_deployed (server default when omitted).

set_relay_application($sid, name => $name)

Route inbound calls to a named RELAY application.

set_relay_topic($sid, topic => $topic, status_callback_url => $s?)

Route inbound calls to a RELAY topic (client subscription).