Assets
An asset is something you keep in your SautiPBX account instead of on your own server. There are two kinds, and both live on the Assets page in the portal.
| Kind | What it holds | How you use it |
|---|---|---|
| Verb document | A call-control document you write in the portal. | Point a webhook at its URL. No server needed. |
| Audio | A sound clip you upload. | Play it on a call with <Play asset="…"/>. |
Verb documents. Answer calls with no server
Section titled “Verb documents. Answer calls with no server”A call-control webhook normally points at a server you run. For a call flow that is the same every time. A greeting, an announcement, a number that always forwards to the same place. You do not need that server. Write the document once in the portal and point the webhook at it.
- Open Assets and choose New document.
- Write your
<Response>document in the editor and save it. - Choose Copy URL to get its public address.
- Paste that address as the webhook for a number or for the whole account. See Voice webhooks.
<Response> <Say voice="woman">Karibu SautiPBX. Our office is closed.</Say> <Hangup/></Response>That is a working inbound call handler. There is nothing else to deploy, host or keep running.
What you get:
- It is checked before it is saved. The portal parses your document with the same parser that runs live calls. A document that would fail on a call cannot be saved, so a typo becomes a message in the editor rather than a failed call at 2am.
- A saved change is used on the next call. Documents are never cached.
- The URL never moves. Renaming a document does not change its address, so a webhook that already points at it keeps working.
- Switch one off to take it out of service without deleting it. Its URL then returns
404, and the call falls back exactly as it would for any other failing webhook. - It works anywhere a URL does. A number’s webhook, the account-wide default, a
<Redirect>, or a<Dial action>or<Record action>target.
- Open Assets and choose Upload audio.
- Give the clip a name, then pick a file. WAV, MP3, OGG and M4A are accepted.
- The portal shows the slug your name became.
Reminder (English)becomesreminder-english. The slug is what you write in a call-control document.
Every upload is converted to the format the phone network needs, and your original is kept.
<Response> <Play asset="reminder-english"/></Response>The portal’s Copy the Play line button gives you this line for any clip.
assetwins over a URL. If a<Play>has both anassetand a URL, the asset plays.- A name is a label; the slug is the handle. Slugs are unique within your account.
- Renaming a clip changes its slug. Every document that plays the old slug stops finding it,
and those calls emit
PLAY.0404instead. Update your documents in the same change, or upload the clip under the new name and delete the old one once nothing uses it. - A missing asset is reported, not silent. If the slug does not exist in your account, the
asset is switched off, or it has no playable audio, the call carries on with the next verb and
emits
PLAY.0404. If a caller hears silence, check the slug first. - Switch a clip off in the portal to stop it playing without deleting it.
Limits
Section titled “Limits”| Limit | Value | Applies to |
|---|---|---|
| Assets per account | 100 | Documents and audio together |
| Size of one uploaded file | 10 MB | Audio |
| Total stored per account | 200 MB | Audio |
| Length of one clip | 10 minutes | Audio |
An upload over a limit is refused with a message that says which limit it hit.