Resources
A Resource is the part of your SignalWire Space that handles a call or message. An AI Agent that holds a conversation is a Resource. So is a SWML Script that runs call logic, a Subscriber whose devices ring, and a Video Room that several people join.
People and code reach a Resource through an Address: a phone number, a SIP URI, or a
name such as /public/support. The Resource decides what happens, and the Address decides how
someone gets there.
Keeping the two apart lets you change either side without touching the other. You can point a phone number at a new Resource and callers keep dialing the same number, or give one Resource a phone number, a SIP URI, and a web entry point that all run the same logic.
How a call reaches a Resource
Every inbound call or message follows the same path:
- Someone dials an Address. A caller on the phone network dials a phone number, a private branch exchange (PBX) or carrier sends a SIP call to a SIP Address, and a browser, script, or another Resource dials an alias.
- SignalWire looks up the Address and finds its handler, the one Resource assigned to it. A phone number gives you two Addresses, one for calls and one for messages, so each can go to a different Resource.
- The handler runs. What it does depends on its type: an AI Agent holds the conversation, a SWML Script runs its document, a Relay Application delivers the call to your server, and a Subscriber rings that user’s devices.
Consider Bayview Taxi. Its dispatcher, Ada, is an AI Agent Resource. Riders reach Ada by calling
the company’s phone number or by pressing a call button on its website, which dials /public/ada,
the alias SignalWire created with the Resource. Both Addresses have Ada as their handler, so every
rider gets the same conversation however they got there. When Bayview builds a new version of Ada,
it assigns the phone number to the new Resource and re-creates /public/ada on it, so riders never
notice the change.
What each part controls
Resource types
Every Resource has a type, and the type decides what the Resource does with a call or message. These are the most common types:
Most types can take calls. Messages go to Resources that run messaging logic, such as SWML Scripts created for messaging and Relay Applications.
Resources and Addresses
A Resource can carry any number of Addresses, and each Address hands its calls to one Resource. Deleting an Address never deletes the Resource behind it.
SignalWire gives every new Resource one alias so it’s reachable right away. The alias
name is a URL-safe form of the Resource name, so an AI Agent named Support Agent that you add in
the Dashboard is reachable at /public/support-agent. Whether that first alias is public or
private depends on the Resource type, as Aliases lists. If the name is already taken in
the alias’s context, SignalWire adds a short random suffix. Renaming the Resource later keeps the
alias it already has.
To take calls from the phone network or from SIP systems outside SignalWire, give the Resource a phone number or a SIP Address. The Addresses page covers each Address type and how contexts decide who can dial them.
Create and manage Resources
In the SignalWire Dashboard, select My Resources in the left sidebar to list every Resource in your project, then select + Add to create one. Script lists the script types, such as SWML Script, and SIP asks you to choose SIP Credential or SIP Gateway. AI Agent asks for an Agent Name and an Agent URL. Open any Resource to find its settings on the Configuration tab and its Addresses on the Addresses & Phone Numbers tab, where you can also add more.
An AI Agent added in the Dashboard points to the public URL of an agent you build with the Server SDKs and host yourself. SignalWire checks that the URL returns a valid SWML document before it creates the Resource.
With the REST API, create or update a Resource through the endpoints for its type, such as Create SWML Script. The generic Resources endpoints work with every type: list Resources, retrieve or delete one by ID, and list a Resource’s Addresses.
Deleting a Resource also deletes its aliases. A Resource that is still assigned as a handler can’t be deleted. That covers the call or message handler of a phone number or WhatsApp number, the handler of a SIP Address, and the Resource a SIP Credential sends its calls to. Reassign those numbers and SIP Addresses, or point the SIP Credential at another Resource, then delete it.