Managing Your SignalWire Resources
Resources Overview
Resources are the primary entities for communication within the Call Fabric ecosystem. They are the building blocks of the system, representing the various communication elements that can be used to interact with subscribers. The different types of Resources can be found in the Resource Types section.
Creating Resources
To create a Resource in your SignalWire Space, you will need to click on the Resources
tab in the left-hand navigation menu.
From there, you can select the type of Resource you would like to create by clicking on the + Add
button.
For example, if you would like to create a new Subscribers
Resource, you would click on the Subscribers
option.
After selecting the type of Resource you would like to create, you will be prompted to enter the details for the Resource on a new page.
Upon completion, you can click on the Create
button to create the Resource.
Editing Resources
To modify a Resource within your SignalWire Space, navigate to the Resources
page and select the desired Resource.
This action directs you to the details page of that Resource.
Here, by selecting the Edit
button, you can alter the specifics of the Resource.
Deleting Resources
From your Resources page, you can delete a Resource by clicking on the trashcan icon next to the Resource you would like to delete. This will prompt you to confirm the deletion of the Resource. Once you have confirmed the deletion, the Resource will be removed from your SignalWire Space.
Additionally, you can delete a Resource from the Resource's details page by clicking on the Delete
button.
Resource Addresses
Each Resource is uniquely identified by its Address, allowing for precise targeting and interaction within the Call Fabric ecosystem. This simplifies the development process by providing a standardized way to handle different communication elements, and enhances flexibility, as developers can interact with a wide range of communication tools using a unified approach.
Resources can have multiple addresses, and addresses are mutable. For instance, you can map a SWML script and a Video Room to the same Resource Address. These addresses can be changed or deleted later as needed.
Each Resource Address has two components:
- Context: A identifier that indicates in which context the resource is located.
- Name: The name is the unique identifier for the resource.
For example, the address for a Subscribers
resource named Alice
in the public
context would be /public/Alice
.
If you are interacting with a resource from within the same context, you can omit the context from the address.
For example, if you are interacting with a Subscribers
resource named Bob
from within the private
context,
you can use the address /Bob
instead of /private/Bob
.
Once you have created a Resource, you can use the address to interact with it within the Call Fabric ecosystem.
Additionally, you can view the created resource in the Resources
tab of the SignalWire Dashboard.
Here, you can view the address, type, and other details of the resource.
Contexts
Contexts
in Call Fabric define the operational environment or 'scenario' under which resources operate.
They determine how resources are routed and interact with each other.
Every Space has two contexts:
- The
public
context exposes the Resource to anyone. - The
private
context exposes the Resource to Subscribers.