diff --git a/package-lock.json b/package-lock.json index 4ba20c7..171fcfc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2313,6 +2313,7 @@ "integrity": "sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw==", "dev": true, "license": "MIT", + "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -2336,6 +2337,7 @@ "integrity": "sha512-PlXPeEWMXMZ7sPYOHqmDyCJzcfNrUr3fGNKtezX14ykXOEIvyK81d+qydx89KY5O71FKMPaQ2vBfBFI5NHR63A==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", @@ -2438,6 +2440,7 @@ "integrity": "sha512-DCPeb8GKOoFWh+8whB7Qi/kKWD/6NcQ9nd1QVNzJFxgHkea3WYrNroQRq4whmBdjhkYPTLS/1gmUAl2iA2Es2g==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@astrojs/compiler": "^3.0.0", "@astrojs/internal-helpers": "0.8.0", @@ -5759,6 +5762,7 @@ } ], "license": "MIT", + "peer": true, "dependencies": { "nanoid": "^3.3.11", "picocolors": "^1.1.1", @@ -5814,6 +5818,7 @@ "integrity": "sha512-UOnG6LftzbdaHZcKoPFtOcCKztrQ57WkHDeRD9t/PTQtmT0NHSeWWepj6pS0z/N7+08BHFDQVUrfmfMRcZwbMg==", "dev": true, "license": "MIT", + "peer": true, "bin": { "prettier": "bin/prettier.cjs" }, @@ -6284,6 +6289,7 @@ "integrity": "sha512-2oMpl67a3zCH9H79LeMcbDhXW/UmWG/y2zuqnF2jQq5uq9TbM9TVyXvA4+t+ne2IIkBdrLpAaRQAvo7YI/Yyeg==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@types/estree": "1.0.8" }, @@ -6649,6 +6655,7 @@ "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", "dev": true, "license": "Apache-2.0", + "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -7051,6 +7058,7 @@ "integrity": "sha512-w+N7Hifpc3gRjZ63vYBXA56dvvRlNWRczTdmCBBa+CotUzAPf5b7YMdMR/8CQoeYE5LX3W4wj6RYTgonm1b9DA==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "esbuild": "^0.27.0", "fdir": "^6.5.0", diff --git a/src/content/docs/modules/nats/client.md b/src/content/docs/modules/nats/client.md index 173c544..dce8152 100644 --- a/src/content/docs/modules/nats/client.md +++ b/src/content/docs/modules/nats/client.md @@ -4,8 +4,18 @@ sidebar: label: Client order: 1 --- - +This module connects to a [NATS](https://nats.io/) server and subscribes to a subject. - **type**: `nats.client` - **params**: - - **url** - - **subject** \ No newline at end of file + - **url**: the URL of the NATS server to connect to (e.g. `nats://localhost:4222`) + - **subject**: the subject to subscribe to + +### Example +Connect to a local NATS server and subscribe to the `events` subject +``` +- id: natsClient + type: nats.client + params: + url: nats://localhost:4222 + subject: events +``` \ No newline at end of file diff --git a/src/content/docs/modules/nats/server.md b/src/content/docs/modules/nats/server.md index 604bb00..c101204 100644 --- a/src/content/docs/modules/nats/server.md +++ b/src/content/docs/modules/nats/server.md @@ -4,8 +4,18 @@ sidebar: label: Server order: 2 --- - +This module starts a NATS server that listens for incoming connections. - **type**: `nats.server` - **params**: - - **ip** - - **port** \ No newline at end of file + - **ip**: (optional) the IP address to bind the server to defaults to `0.0.0.0` + - **port**: (optional) the port to listen on defaults to `4222` + +### Example +Start a local NATS server listening on port 5555 +``` +- id: httpServer + type: http.server + params: + ip: 127.0.0.1 + port: 5555 +``` \ No newline at end of file diff --git a/src/content/docs/modules/net/udp/multicast.md b/src/content/docs/modules/net/udp/multicast.md index cfe63e5..2e521c4 100644 --- a/src/content/docs/modules/net/udp/multicast.md +++ b/src/content/docs/modules/net/udp/multicast.md @@ -7,6 +7,15 @@ sidebar: - **type**: `net.udp.multicast` - **params**: - - **ip** - - **port** - - **bufferSize** \ No newline at end of file + - **ip**: the multicast IP address to listen to + - **port**: the port to listen on + +### Example +Listen to the mDNS multicast address on port 5353 +``` +- id: mdnsListener + type: net.udp.multicast + params: + ip: 224.0.0.251 + port: 5353 +``` \ No newline at end of file diff --git a/src/content/docs/modules/psn/client.md b/src/content/docs/modules/psn/client.md index bc6dc16..a5cc3d5 100644 --- a/src/content/docs/modules/psn/client.md +++ b/src/content/docs/modules/psn/client.md @@ -5,4 +5,13 @@ sidebar: order: 1 --- -- **type**: `psn.client` \ No newline at end of file +- **type**: `psn.client` + +This module listens on the [PosiStageNet](http://posistage.net/) multicast address and emits tracker states anytime a new PSN message is received. + +### Example +List +``` +- id: psnClient + type: psn.client +``` \ No newline at end of file diff --git a/src/content/docs/modules/sip/call/server.md b/src/content/docs/modules/sip/call/server.md index 3f67d2a..942f852 100644 --- a/src/content/docs/modules/sip/call/server.md +++ b/src/content/docs/modules/sip/call/server.md @@ -4,10 +4,21 @@ sidebar: label: Server order: 1 --- - +This module starts a [SIP](https://en.wikipedia.org/wiki/Session_Initiation_Protocol) server that listens for incoming connections and emits call events when a new call is received. This can be used with cheap SIP gateway devices to connect an analog phone line and do interesting things like [firing QLab cues with phone calls](/examples/dial-a-cue). - **type**: `sip.call.server` - **params**: - - **ip** - - **port** - - **transport** - - **userAgent** \ No newline at end of file + - **ip**: (optional) the IP address to bind the server to defaults to `0.0.0.0` + - **port**: (optional) the port to listen on defaults to `5060` + - **transport**: (optional) the transport protocol to use (e.g. `udp`, `tcp`, `ws`) defaults to `udp` + - **userAgent**: (optional) the User-Agent string to use in SIP responses defaults to `showbridge` + +### Example +Start a UDP SIP server listening on port 5060 +``` +- id: sipCallServer + type: sip.call.server + params: + ip: 127.0.0.1 + port: 5060 + transport: udp +``` \ No newline at end of file diff --git a/src/content/docs/modules/sip/dtmf/server.md b/src/content/docs/modules/sip/dtmf/server.md index cfcc48e..289116a 100644 --- a/src/content/docs/modules/sip/dtmf/server.md +++ b/src/content/docs/modules/sip/dtmf/server.md @@ -4,11 +4,24 @@ sidebar: label: Server order: 1 --- +This module starts a [SIP](https://en.wikipedia.org/wiki/Session_Initiation_Protocol) server that listens for incoming connections. When a call is received this module will emit events based on the touch tones (DTMF) received during the call. The event is sent out whenever the use presses the separator key defined in the params. - **type**: `sip.dtmf.server` - **params**: - - **ip** - - **port** - - **transport** - - **userAgent** - - **separator** \ No newline at end of file + - **ip**: (optional) the IP address to bind the server to defaults to `0.0.0.0` + - **port**: (optional) the port to listen on defaults to `5060` + - **transport**: (optional) the transport protocol to use (e.g. `udp`, `tcp`, `ws`) defaults to `udp` + - **userAgent**: (optional) the User-Agent string to use in SIP responses defaults to `showbridge` + - **separator**: the DTMF separator key to know when to emit events + +### Example +Start a UDP SIP server listening on port 5060 that will emit events whenever the user presses the `#` key on their phone during a call +``` +- id: sipDTMFServer + type: sip.dtmf.server + params: + ip: 127.0.0.1 + port: 5060 + transport: udp + separator: '#' +``` \ No newline at end of file diff --git a/src/content/docs/processors/artnet/decode.md b/src/content/docs/processors/artnet/decode.md index c514098..f3bc737 100644 --- a/src/content/docs/processors/artnet/decode.md +++ b/src/content/docs/processors/artnet/decode.md @@ -5,4 +5,11 @@ sidebar: order: 1 --- -- **type**: `artnet.packet.decode` \ No newline at end of file +- **type**: `artnet.packet.decode` + +This processor will decode incoming bytes into an ArtNet packet. This processor will return an error if the message being processed is not an array of bytes. + +### Example +``` +- type: artnet.packet.decode +``` \ No newline at end of file diff --git a/src/content/docs/processors/artnet/encode.md b/src/content/docs/processors/artnet/encode.md index 3f0d0b0..29350ff 100644 --- a/src/content/docs/processors/artnet/encode.md +++ b/src/content/docs/processors/artnet/encode.md @@ -5,4 +5,10 @@ sidebar: order: 2 --- -- **type**: `artnet.packet.encode` \ No newline at end of file +- **type**: `artnet.packet.encode` +This processor will encode an ArtNet packet into an array of bytes. This processor will return an error if the message being processed is not an ArtNet packet. + +### Example +``` +- type: artnet.packet.encode +``` \ No newline at end of file diff --git a/src/content/docs/processors/debug/log.md b/src/content/docs/processors/debug/log.md index 14b5d60..bf43ce9 100644 --- a/src/content/docs/processors/debug/log.md +++ b/src/content/docs/processors/debug/log.md @@ -5,4 +5,10 @@ sidebar: order: 1 --- -- **type**: `debug.log` \ No newline at end of file +- **type**: `debug.log` +This processor will log information about the message being processed to the console. This processor does not modify the message in any way and will pass the message through to the next processor in the chain. + +### Example +``` +- type: debug.log +``` \ No newline at end of file diff --git a/src/content/docs/processors/filter/change.md b/src/content/docs/processors/filter/change.md index f603230..6ff0268 100644 --- a/src/content/docs/processors/filter/change.md +++ b/src/content/docs/processors/filter/change.md @@ -5,4 +5,12 @@ sidebar: order: 3 --- -- **type**: `filter.change` \ No newline at end of file +This processor will only pass messages through if the value of the message has changed since the last time a message was processed. This processor is useful for filtering out duplicate messages that may be emitted by a module or processor. + +- **type**: `filter.change` + + +### Example +``` +- type: filter.change +``` \ No newline at end of file diff --git a/src/content/docs/processors/free-d/create.md b/src/content/docs/processors/free-d/create.md index 6fc3818..b673c51 100644 --- a/src/content/docs/processors/free-d/create.md +++ b/src/content/docs/processors/free-d/create.md @@ -5,14 +5,32 @@ sidebar: order: 1 --- +This processor will create a new FreeD message with the specified parameters. + - **type**: `free.d.create` - **params**: - - **id** - - **pan** - - **tilt** - - **roll** - - **posX** - - **posY** - - **posZ** - - **zoom** - - **focus** \ No newline at end of file + - **id**: the ID to set for the FreeD message + - **pan**: the pan value to set for the FreeD message + - **tilt**: the tilt value to set for the FreeD message + - **roll**: the roll value to set for the FreeD message + - **posX**: the X position value to set for the FreeD message + - **posY**: the Y position value to set for the FreeD message + - **posZ**: the Z position value to set for the FreeD message + - **zoom**: the zoom value to set for the FreeD message + - **focus**: the focus value to set for the FreeD message + + +### Example +``` +- type: free.d.create + params: + id: "1" + pan: "45" + tilt: "30" + roll: "0" + posX: "10" + posY: "5" + posZ: "15" + zoom: "2" + focus: "1" +``` \ No newline at end of file diff --git a/src/content/docs/processors/free-d/decode.md b/src/content/docs/processors/free-d/decode.md index 3d5ea90..59242d3 100644 --- a/src/content/docs/processors/free-d/decode.md +++ b/src/content/docs/processors/free-d/decode.md @@ -5,4 +5,11 @@ sidebar: order: 3 --- -- **type**: `free.d.decode` \ No newline at end of file +This processor will decode incoming bytes into a FreeD message. This processor will return an error if the message being processed is not an array of bytes. + +- **type**: `free.d.decode` + +### Example +``` +- type: free.d.decode +``` \ No newline at end of file diff --git a/src/content/docs/processors/free-d/encode.md b/src/content/docs/processors/free-d/encode.md index e3b24fe..229eb3a 100644 --- a/src/content/docs/processors/free-d/encode.md +++ b/src/content/docs/processors/free-d/encode.md @@ -5,4 +5,11 @@ sidebar: order: 2 --- -- **type**: `free.d.encode` \ No newline at end of file +This processor will encode a FreeD message into an array of bytes. This processor will return an error if the message being processed is not a FreeD message. + +- **type**: `free.d.encode` + +### Example +``` +- type: free.d.encode +``` \ No newline at end of file diff --git a/src/content/docs/processors/http/request/do.md b/src/content/docs/processors/http/request/do.md index dd38a98..ebacbd5 100644 --- a/src/content/docs/processors/http/request/do.md +++ b/src/content/docs/processors/http/request/do.md @@ -5,7 +5,19 @@ sidebar: order: 1 --- +This process will make an HTTP request to the specified URL using the specified method. The response will be passed through to the next processor in the chain. This processor will return an error if the request fails for any reason (e.g. network error, invalid URL, etc.). + - **type**: `http.request.do` - **params**: - - **method** - - **url** \ No newline at end of file + - **method**: the HTTP method to use for the request (e.g. `GET`, `POST`, `PUT`, etc.) + - **url**: the URL to send the request to + + +### Example +Make a GET request to `https://example.com` +``` +- type: http.request.do + params: + method: GET + url: https://example.com +``` \ No newline at end of file diff --git a/src/content/docs/processors/http/response/create.md b/src/content/docs/processors/http/response/create.md index e60547e..6385fac 100644 --- a/src/content/docs/processors/http/response/create.md +++ b/src/content/docs/processors/http/response/create.md @@ -5,7 +5,18 @@ sidebar: order: 2 --- +This processor will create a new HTTP response with the specified status code and body template. The created response will be passed through to the next processor in the chain. If the response is subsequently sent to an HTTP server module using the [router.output](../router/output.md) processor, the status code and body template set by this processor will be used for the response sent to the client. This processor will return an error if there is an issue executing the body template. + - **type**: `http.response.create` - **params**: - - **status** - - **body** \ No newline at end of file + - **status**: the HTTP status code to set for the response (e.g. `200`, `404`, etc.) + - **body**: the body template to set for the response + +### Example +This would create an HTTP response with a status code of `200` and a body of `OK` +``` +- type: http.response.create + params: + status: 200 + body: "OK" +``` \ No newline at end of file diff --git a/src/content/docs/processors/int/scale.md b/src/content/docs/processors/int/scale.md index 0c016a4..7661121 100644 --- a/src/content/docs/processors/int/scale.md +++ b/src/content/docs/processors/int/scale.md @@ -5,9 +5,22 @@ sidebar: order: 3 --- +This processor will scale an integer value from one range to another. This processor will return an error if the message being processed is not an integer or if the parameters are not valid (e.g. if `inMin` is greater than or equal to `inMax`, etc.). + - **type**: `int.scale` - **params**: - - **inMin** - - **inMax** - - **outMin** - - **outMax** \ No newline at end of file + - **inMin**: the minimum value of the input range + - **inMax**: the maximum value of the input range + - **outMin**: the minimum value of the output range + - **outMax**: the maximum value of the output range + +### Example +Scale an integer value from the range 0-255 to the range 0-100 +``` +- type: int.scale + params: + inMin: 0 + inMax: 255 + outMin: 0 + outMax: 100 +``` \ No newline at end of file diff --git a/src/content/docs/processors/json/decode.md b/src/content/docs/processors/json/decode.md index caf1d21..24e0d9d 100644 --- a/src/content/docs/processors/json/decode.md +++ b/src/content/docs/processors/json/decode.md @@ -4,5 +4,10 @@ sidebar: label: Decode order: 2 --- +Convert an incoming byte array or raw string into a JSON object. This processor will return an error if the message being processed is not an array of bytes or a raw string, or if the bytes/string cannot be parsed as JSON. +- **type**: `json.decode` -- **type**: `json.decode` \ No newline at end of file +### Example +``` +- type: json.decode +``` \ No newline at end of file diff --git a/src/content/docs/processors/json/encode.md b/src/content/docs/processors/json/encode.md index f3f9363..5d2e0b4 100644 --- a/src/content/docs/processors/json/encode.md +++ b/src/content/docs/processors/json/encode.md @@ -5,4 +5,12 @@ sidebar: order: 1 --- -- **type**: `json.decode` +This processor will encode an incoming object into a JSON byte array. This processor will return an error if the message being processed is not able to be serialized as JSON. + +- **type**: `json.encode` + + +### Example +``` +- type: json.encode +``` diff --git a/src/content/docs/processors/midi/message/decode.md b/src/content/docs/processors/midi/message/decode.md index 76bd734..291f865 100644 --- a/src/content/docs/processors/midi/message/decode.md +++ b/src/content/docs/processors/midi/message/decode.md @@ -4,5 +4,11 @@ sidebar: label: Decode order: 3 --- +This processor will decode incoming bytes into a MIDI message. This processor will return an error if the message being processed is not an array of bytes. -- **type**: `midi.message.decode` \ No newline at end of file +- **type**: `midi.message.decode` + +### Example +``` +- type: midi.message.decode +``` diff --git a/src/content/docs/processors/midi/message/encode.md b/src/content/docs/processors/midi/message/encode.md index 3bf2daa..190613b 100644 --- a/src/content/docs/processors/midi/message/encode.md +++ b/src/content/docs/processors/midi/message/encode.md @@ -4,5 +4,11 @@ sidebar: label: Encode order: 2 --- +This processor will encode a MIDI message into an array of bytes. This processor will return an error if the message being processed is not a MIDI message. - **type**: `midi.message.encode` + +### Example +``` +- type: midi.message.encode +``` \ No newline at end of file diff --git a/src/content/docs/processors/midi/message/unpack.md b/src/content/docs/processors/midi/message/unpack.md index 1ac6cac..b3f4644 100644 --- a/src/content/docs/processors/midi/message/unpack.md +++ b/src/content/docs/processors/midi/message/unpack.md @@ -4,5 +4,11 @@ sidebar: label: Unpack order: 4 --- +This processor will unpack a MIDI message into its individual components. This processor will return an error if the message being processed is not a MIDI message. - **type**: `midi.message.unpack` + +### Example +``` +- type: midi.message.unpack +``` \ No newline at end of file diff --git a/src/content/docs/processors/mqtt/message/create.md b/src/content/docs/processors/mqtt/message/create.md index 443d406..5fdff97 100644 --- a/src/content/docs/processors/mqtt/message/create.md +++ b/src/content/docs/processors/mqtt/message/create.md @@ -3,10 +3,21 @@ title: Create MQTT Message sidebar: order: 1 --- +This processor will create an MQTT message from the provided parameters. This processor will return an error if any of the required parameters are missing or if the parameters are of the wrong type. - **type**: `mqtt.message.create` - **params**: - - **topic** - - **qos** - - **retained** - - **payload** \ No newline at end of file + - **topic**: the topic to publish the message to. + - **qos**: the QoS level of the message. + - **retained**: whether the message should be retained by the broker. + - **payload**: the payload of the message. This can be a string or a byte array. + +### Example +``` +- type: mqtt.message.create + params: + topic: "test/topic" + qos: 1 + retained: false + payload: "Hello, World!" +``` \ No newline at end of file diff --git a/src/content/docs/processors/nats/message/create.md b/src/content/docs/processors/nats/message/create.md index e895abf..05914d4 100644 --- a/src/content/docs/processors/nats/message/create.md +++ b/src/content/docs/processors/nats/message/create.md @@ -5,7 +5,16 @@ sidebar: order: 1 --- +This processor will create a NATS message from the provided parameters. This processor will return an error if any of the required parameters are missing or if the parameters are of the wrong type. - **type**: `nats.message.create` - **params**: - - **subject** - - **payload** \ No newline at end of file + - **subject**: the subject to publish the message to. + - **payload**: the payload of the message. + +### Example +``` +- type: nats.message.create + params: + subject: "events" + payload: "Hello, World!" +``` \ No newline at end of file diff --git a/src/content/docs/processors/osc/message/create.md b/src/content/docs/processors/osc/message/create.md index a1dbbd6..9b847cb 100644 --- a/src/content/docs/processors/osc/message/create.md +++ b/src/content/docs/processors/osc/message/create.md @@ -4,9 +4,21 @@ sidebar: label: Create order: 1 --- +This processor will create an OSC message from the provided parameters. This processor will return an error if any of the required parameters are missing or if the parameters are of the wrong type. The address parameter is required, while the args and types parameters are optional. However, if args are provided, then types must also be provided and must match the amount of args provided. - **type**: `osc.message.create` - **params**: - - **address** - - **args** - - **types** \ No newline at end of file + - **address**: the address of the OSC message. + - **args**: (optional) array of string templates for each argument. + - **types**: (optional) a single string with the of each arg in order. This is required if args are provided. + +### Example +Create an OSC message with the address `/test/message` and two integer arguments from the payload of the message being processed. + +``` +- type: osc.message.create + params: + address: "/test/message" + args: ["{{.Payload[0]}}", "{{.Payload[1]}}"] + types: "ii" +``` \ No newline at end of file diff --git a/src/content/docs/processors/router/output.md b/src/content/docs/processors/router/output.md index 9e0ef8b..7e82ef7 100644 --- a/src/content/docs/processors/router/output.md +++ b/src/content/docs/processors/router/output.md @@ -9,6 +9,8 @@ The `router.output` processor takes any payload and outputs to the specified mod - **type**: `router.output` - **params**: - **module**: the id of the [module](/concepts/modules) to output to. + + ### Example Output to the `osc-out` module. ``` diff --git a/src/content/docs/processors/script/expr.md b/src/content/docs/processors/script/expr.md index cf16b2c..78c983b 100644 --- a/src/content/docs/processors/script/expr.md +++ b/src/content/docs/processors/script/expr.md @@ -4,7 +4,15 @@ sidebar: label: Expr order: 2 --- - +The processor will execute the provided Expr expression and return the result as the new payload. This processor will return an error if the expression cannot be executed or if there is an error during execution. The expression will have access to the [wrapped payload](/concepts/payloads). - **type**: `script.expr` - **params**: - - **expression** \ No newline at end of file + - **expression**: the Expr expressiont to execute. + +### Example +This example will add 1 to the wrapped payload. +``` +- type: script.expr + params: + expression: "Payload + 1" +``` \ No newline at end of file diff --git a/src/content/docs/processors/script/wasm.md b/src/content/docs/processors/script/wasm.md index 79733ba..49f47c0 100644 --- a/src/content/docs/processors/script/wasm.md +++ b/src/content/docs/processors/script/wasm.md @@ -4,9 +4,19 @@ sidebar: label: WASM order: 3 --- +This processor will load and execute a WASM plugin using the [Extism](https://extism.org/) runtime. The processor will execute the specified function in the WASM plugin and return the result as the new payload. This processor will return an error if the plugin cannot be loaded, if the function cannot be executed, or if there is an error during execution. The incoming payload will be passed as the argument to the WASM function. If the plugin is successfully executed, the result of the function will be returned as the new payload. - **type**: `script.wasm` - **params**: - - **path** - - **function** - - **enableWasi** \ No newline at end of file + - **path**: the path to the WASM plugin to load. + - **function**: (optional) the function to execute in the WASM plugin defaults to `process` + - **enableWasi**: (optional) whether to enable WASI for the plugin defaults to `false` + +### Example +This example will load the plugin at `./test.wasm` and execute the `test` function +``` +- type: script.wasm + params: + path: "./test.wasm" + function: "test" +``` \ No newline at end of file diff --git a/src/content/docs/processors/sip/response/audio/create.md b/src/content/docs/processors/sip/response/audio/create.md index 767b0b4..bdd5af4 100644 --- a/src/content/docs/processors/sip/response/audio/create.md +++ b/src/content/docs/processors/sip/response/audio/create.md @@ -4,9 +4,20 @@ sidebar: label: Create order: 1 --- +This processor will create a SIP response message with an audio file as the payload. If this message is output to a SIP module using the [router.output](/processors/router/output) processor, then the SIP module will send the response to the caller and play the audio file included in the response. - **type**: `sip.response.audio.create` - **params**: - - **preWait** - - **audioFile** - - **postWait** \ No newline at end of file + - **preWait**: the amount of time in milliseconds to wait before sending the response + - **audioFile**: the path to the audio file to include in the response + - **postWait**: the amount of time in milliseconds to wait after sending the response + +### Example +This example will create a SIP response that will wait 1 second then play `response.wav` then wait another second before completing the response. +``` +- type: sip.response.audio.create + params: + preWait: 1000 + audioFile: "response.wav" + postWait: 1000 +``` \ No newline at end of file diff --git a/src/content/docs/processors/sip/response/dtmf/create.md b/src/content/docs/processors/sip/response/dtmf/create.md index 58f58ef..c344872 100644 --- a/src/content/docs/processors/sip/response/dtmf/create.md +++ b/src/content/docs/processors/sip/response/dtmf/create.md @@ -4,9 +4,20 @@ sidebar: label: Create order: 1 --- +This processor will create a SIP DTMF response from the provided parameters. If this message is output to a SIP module using the [router.output](/processors/router/output) processor, then the SIP module will send the response to the caller and play the DTMF tones specified. - **type**: `sip.response.dtmf.create` - **params**: - - **preWait** - - **digits** - - **postWait** \ No newline at end of file + - **preWait**: the amount of time in milliseconds to wait before sending the response + - **digits**: the DTMF digits to include in the response + - **postWait**: the amount of time in milliseconds to wait after sending the response + +### Example +This example will create a SIP response that will wait 1 second then play the DTMF digits "1234" then wait another second before completing the response. +``` +- type: sip.response.dtmf.create + params: + preWait: 1000 + digits: "1234" + postWait: 1000 +``` \ No newline at end of file