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_webhookFabric 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_webhooksbeing plural, this creates a singlecxml_webhookFabric 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.
versionacceptsworking_copyorcurrent_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).