mirror of
https://github.com/jambonz/next-static-site.git
synced 2026-07-24 13:02:22 +00:00
4d9a0f844c
* reset yarn lock * ws docs * answering machine detection spec * amd updates * 0.7.6 release notes and articles * update transcribe options Co-authored-by: kitajchuk <bk@kitajchuk.com>
2.5 KiB
2.5 KiB
command
websocket server => jambonz
A command message is sent by the websocket server to jambonz when the server wants to asynchronously provide a new set of instructions to jambonz.
| property | type | meaning | required |
|---|---|---|---|
| type | string "command" | indicates this is a command message | yes |
| command | string | describes the action to take, see allowed commands below | yes |
| queueCommand | boolean | if true, queue this command until previous commands are completed; otherwise, interrupt and flush all previous commands and execute this command immediately | no |
| data | array or object | data pertaining to the requested command | yes |
The command property must be one of the values shown below.
Note:
redirectis the most commonly-used value.
| command value | meaning | data requirements |
|---|---|---|
| redirect | execute the application provided | data must be an array of jambonz verbs; i.e. a jambonz application. |
| call:status | change the call status (e.g. hangup the call) | data must include a call_status property with a value of 'completed' or 'no-answer' |
| mute:status | mute or unmute the call | data must include a mute_status property with a value of 'mute' or 'unmute' |
| conf:mute-status | mute or unmute all non-moderator conference legs | data must include a conf_mute_status property with a value of either 'mute' or 'unmute' |
| conf:hold-status | place a conference leg on hold or take off hold | data must include a conf_hold_status property with a value of either 'hold' or 'unhold' |
| listen:status | Change the status of a listen stream | data must include a listen_status property with a value of 'pause' or 'resume' |
| whisper | Play a whisper prompt to the caller (i.e only one party hears the prompt) | data must include a whisper property that can be an array of say or play verbs |
| sip:request | Send a SIP INFO, NOTIFY, or MESSAGE request to the far end party | data must include a 'method' property (allowed values: 'INFO', 'NOTIFY', 'MESSAGE') and can include 'content_type', 'content', and 'headers' properties. |
Note: In the data payload when
redirectis used, each jambonz verb in thedataarray may optionally include anidproperty. If present, jambonz will provideverb:statusnotifications when the verb starts and ends execution.
{
"type": "command",
"command": "redirect",
"queueCommand": true,
"data": [
{
"say": {
"id": "b5e39996",
"text": "Hello it's me Mario"
}
}
]
}