This commit is contained in:
Joel Wetzell
2026-05-17 21:12:04 -05:00
parent 69bc31d3f1
commit 8e6cd58006
82 changed files with 642 additions and 450 deletions
@@ -1,8 +1,8 @@
---
title: Decode ArtNet Packet
sidebar:
label: Decode
order: 1
label: Decode
order: 1
---
- **type**: `artnet.packet.decode`
@@ -10,6 +10,7 @@ sidebar:
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
```yaml
- type: artnet.packet.decode
```
```
@@ -1,14 +1,15 @@
---
title: Encode ArtNet Packet
sidebar:
label: Encode
order: 2
label: Encode
order: 2
---
- **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.
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
```yaml
- type: artnet.packet.encode
```
```
+9 -5
View File
@@ -1,20 +1,24 @@
---
title: Database Query
sidebar:
label: Query
order: 1
label: Query
order: 1
---
The `db.query` processor will issue a query to the specified module and return the result to the next processor in line.
- **type**: `db.query`
- **params**:
- **module**: the id of the [module](/concepts/modules) to issue query to.
- **query**: the query to execute.
- **module**: the id of the [module](/concepts/modules) to issue query to.
- **query**: the query to execute.
### Example
Issue a `SELECT` statement to a module with id `sqlite`.
```yaml
- type: db.query
params:
module: sqlite
query: "SELECT * from users;"
```
```
+5 -4
View File
@@ -1,14 +1,15 @@
---
title: Debug Log
sidebar:
label: Log
order: 1
label: Log
order: 1
---
- **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.
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
```yaml
- type: debug.log
```
```
@@ -1,16 +1,16 @@
---
title: Filter On Change
sidebar:
label: On Change
order: 3
label: On Change
order: 3
---
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
```yaml
- type: filter.change
```
```
+7 -4
View File
@@ -1,19 +1,22 @@
---
title: Expr Filter
sidebar:
label: Expr
order: 2
label: Expr
order: 2
---
The `filter.expr` processor evaluates an [Expr expression](https://expr-lang.org/playground). If the expression evaluates to true then the payload is sent through. This processor will return an error if the expression fails to evaluate.
- **type**: `filter.expr`
- **params**:
- **expression**: [Expr expression](https://expr-lang.org/playground) to evaluate. The expression has access to the [wrapped payload](/concepts/payload).
- **expression**: [Expr expression](https://expr-lang.org/playground) to evaluate. The expression has access to the [wrapped payload](/concepts/payload).
### Example
Match a payload great than or equal to 0
```yaml
- type: filter.expr
params:
pattern: "Payload >= 0"
```
```
+7 -4
View File
@@ -1,19 +1,22 @@
---
title: Regex Filter
sidebar:
label: Regex
order: 1
label: Regex
order: 1
---
The `filter.regex` processor matches incoming string payload against a regular expression. If there is a match then the payload is sent through. This processor will return an error if the message being processed is not a string.
- **type**: `filter.regex`
- **params**:
- **pattern**: regex pattern to match against the incoming string
- **pattern**: regex pattern to match against the incoming string
### Example
Match strings starting with `hello`
```yaml
- type: filter.regex
params:
pattern: "^hello.*"
```
```
+7 -4
View File
@@ -1,19 +1,22 @@
---
title: Parse Float
sidebar:
label: Parse
order: 1
label: Parse
order: 1
---
The `float.parse` processor takes a string and parses it as a float with the specified `base` and `bitSize`. This processor will return an error if the message being processed is not a string or if the string cannot be parsed into a float.
- **type**: `float.parse`
- **params**:
- **bitSize**: (optional) the bit size of the float to parse, defaults to 64
- **bitSize**: (optional) the bit size of the float to parse, defaults to 64
### Example
This would parse the string payload as a 32 bit float and set the payload to that value.
```yaml
- type: float.parse
params:
bitSize: 32
```
```
+9 -6
View File
@@ -1,23 +1,26 @@
---
title: Create Random Float
sidebar:
label: Random
order: 2
label: Random
order: 2
---
The `float.random` processor will set the payload to a random float between the specified `min` and `max` value.
- **type**: `float.random`
- **params**:
- **bitSize**: (optional) the bit size of the float to generate, defaults to 32
- **min**: the minimum value for the random float (inclusive).
- **max**: the maximum value for the random float (exclusive).
- **bitSize**: (optional) the bit size of the float to generate, defaults to 32
- **min**: the minimum value for the random float (inclusive).
- **max**: the maximum value for the random float (exclusive).
### Example
This would generate a random 64-bit float between 1.1 and 1.5 and set the payload to that value.
```yaml
- type: float.random
params:
bitSize: 64
min: 1.0
max: 1.5
```
```
+13 -13
View File
@@ -1,26 +1,26 @@
---
title: Create FreeD
sidebar:
label: Create
order: 1
label: Create
order: 1
---
This processor will create a new FreeD message with the specified parameters.
- **type**: `free.d.create`
- **params**:
- **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
- **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
```yaml
- type: free.d.create
params:
@@ -33,4 +33,4 @@ This processor will create a new FreeD message with the specified parameters.
posZ: "15"
zoom: "2"
focus: "1"
```
```
@@ -1,8 +1,8 @@
---
title: Decode FreeD
sidebar:
label: Decode
order: 3
label: Decode
order: 3
---
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.
@@ -10,6 +10,7 @@ This processor will decode incoming bytes into a FreeD message. This processor w
- **type**: `free.d.decode`
### Example
```yaml
- type: free.d.decode
```
```
@@ -1,8 +1,8 @@
---
title: Encode FreeD
sidebar:
label: Encode
order: 2
label: Encode
order: 2
---
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.
@@ -10,6 +10,7 @@ This processor will encode a FreeD message into an array of bytes. This processo
- **type**: `free.d.encode`
### Example
```yaml
- type: free.d.encode
```
```
@@ -1,23 +1,24 @@
---
title: Make HTTP Request
sidebar:
label: Make Request
order: 1
label: Make Request
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**: the HTTP method to use for the request (e.g. `GET`, `POST`, `PUT`, etc.)
- **url**: the URL to send the request to
- **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`
```yaml
- type: http.request.do
params:
method: GET
url: https://example.com
```
```
@@ -1,22 +1,24 @@
---
title: Create HTTP Response
sidebar:
label: Create
order: 2
label: Create
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**: the HTTP status code to set for the response (e.g. `200`, `404`, etc.)
- **body**: the body template to set for the response
- **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`
```yaml
- type: http.response.create
params:
status: 200
body: "OK"
```
```
+8 -5
View File
@@ -1,20 +1,23 @@
---
title: Parse Int
sidebar:
label: Parse
order: 1
label: Parse
order: 1
---
The `int.parse` processor takes a string and parses it as an integer with the specified `base` and `bitSize`. This processor will return an error if the message being processed is not a string or if the string cannot be parsed into an integer.
- **type**: `int.parse`
- **params**:
- **base**: (optional) the base to use for parsing the integer, defaults to 10
- **bitSize**: (optional) the bit size of the integer to parse, defaults to 64
- **base**: (optional) the base to use for parsing the integer, defaults to 10
- **bitSize**: (optional) the bit size of the integer to parse, defaults to 64
### Example
This would parse the string payload as a 32 bit, base 10 integer and set the payload to that value.
```yaml
- type: int.parse
params:
bitSize: 32
```
```
+7 -4
View File
@@ -1,20 +1,23 @@
---
title: Create Random Int
sidebar:
order: 2
order: 2
---
The `int.random` processor will set the payload to a random integer between the specified `min` and `max` value.
- **type**: `int.random`
- **params**:
- **min**: the minimum value for the random integer (inclusive).
- **max**: the maximum value for the random integer (inclusive).
- **min**: the minimum value for the random integer (inclusive).
- **max**: the maximum value for the random integer (inclusive).
### Example
This would generate a random integer between -127 and 127 and set the payload to that value.
```yaml
- type: int.random
params:
min: -127
max: 127
```
```
+9 -7
View File
@@ -1,21 +1,23 @@
---
title: Scale Int
sidebar:
label: Scale
order: 3
label: Scale
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**: 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
- **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
```yaml
- type: int.scale
params:
@@ -23,4 +25,4 @@ Scale an integer value from the range 0-255 to the range 0-100
inMax: 255
outMin: 0
outMax: 100
```
```
+6 -3
View File
@@ -1,13 +1,16 @@
---
title: Decode JSON
sidebar:
label: Decode
order: 2
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`
### Example
```yaml
- type: json.decode
```
```
+3 -3
View File
@@ -1,16 +1,16 @@
---
title: Encode JSON
sidebar:
label: Encode
order: 1
label: Encode
order: 1
---
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
```yaml
- type: json.encode
```
+8 -5
View File
@@ -1,21 +1,24 @@
---
title: Get Key/Value
sidebar:
label: Get
order: 1
label: Get
order: 1
---
The `kv.get` processor gets the value associated with a key from a compatible module. The output payload is the value if the key is found.
- **type**: `kv.get`
- **params**:
- **module**: id of the module
- **key**: the key to look up
- **module**: id of the module
- **key**: the key to look up
### Example
This will attempt to get the value for the `counter` key from the module with an id of `redis`
```yaml
- type: kv.get
params:
module: redis
key: counter
```
```
+9 -6
View File
@@ -1,23 +1,26 @@
---
title: Set Key/Value
sidebar:
label: Set
order: 2
label: Set
order: 2
---
The `kv.set` processor sets the value associated with a key from a compatible module. The payload is unchanged so whatever is received by this payload is output unless any errors are encountered.
- **type**: `kv.set`
- **params**:
- **module**: id of the module
- **key**: the key to look up
- **value**: the value to set
- **module**: id of the module
- **key**: the key to look up
- **value**: the value to set
### Example
This will attempt to set the key `hello` to `world` using the module with an id of `redis`
```yaml
- type: kv.set
params:
module: redis
key: hello
value: world
```
```
@@ -1,22 +1,24 @@
---
title: Create MIDI Control Change
title: Create MIDI Control Change
sidebar:
label: Create
order: 1
label: Create
order: 1
---
This processor will create a MIDI Control Change message with the specified channel, control number, and control value.
- **type**: `midi.control_change.create`
- **params**:
- **channel**: the MIDI channel
- **control**: the control number
- **value**: the control value
- **channel**: the MIDI channel
- **control**: the control number
- **value**: the control value
### Example
```yaml
- type: midi.control_change.create
params:
channel: "1"
control: "64"
value: "127"
```
```
@@ -1,14 +1,16 @@
---
title: Decode MIDI Message
sidebar:
label: Decode
order: 3
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`
### Example
```yaml
- type: midi.message.decode
```
@@ -1,14 +1,16 @@
---
title: Encode MIDI Message
sidebar:
label: Encode
order: 2
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
```yaml
- type: midi.message.encode
```
```
@@ -1,14 +1,16 @@
---
title: Unpack MIDI Message
sidebar:
label: Unpack
order: 4
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
```yaml
- type: midi.message.unpack
```
```
@@ -1,22 +1,24 @@
---
title: Create MIDI Note On
title: Create MIDI Note On
sidebar:
label: Create
order: 1
label: Create
order: 1
---
This processor will create a MIDI Note On message with the specified channel, note, and velocity.
- **type**: `midi.note_on.create`
- **params**:
- **channel**: the MIDI channel
- **note**: the note number
- **velocity**: the velocity
- **channel**: the MIDI channel
- **note**: the note number
- **velocity**: the velocity
### Example
```yaml
- type: midi.note_on.create
params:
channel: "1"
note: "60"
velocity: "127"
```
```
@@ -1,22 +1,24 @@
---
title: Create MIDI Note Off
title: Create MIDI Note Off
sidebar:
label: Create
order: 1
label: Create
order: 1
---
This processor will create a MIDI Note Off message with the specified channel, note, and velocity.
- **type**: `midi.note_off.create`
- **params**:
- **channel**: the MIDI channel
- **note**: the note number
- **velocity**: the velocity
- **channel**: the MIDI channel
- **note**: the note number
- **velocity**: the velocity
### Example
```yaml
- type: midi.note_off.create
params:
channel: "1"
note: "60"
velocity: "127"
```
```
@@ -1,20 +1,22 @@
---
title: Create MIDI Prgoram Change
title: Create MIDI Prgoram Change
sidebar:
label: Create
order: 1
label: Create
order: 1
---
This processor will create a MIDI Program Change message with the specified channel and program number.
- **type**: `midi.program_change.create`
- **params**:
- **channel**: the MIDI channel
- **program**: the program number
- **channel**: the MIDI channel
- **program**: the program number
### Example
```yaml
- type: midi.program_change.create
params:
channel: "1"
program: "10"
```
```
@@ -1,18 +1,20 @@
---
title: Create MQTT Message
sidebar:
order: 1
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**: 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.
- **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
```yaml
- type: mqtt.message.create
params:
@@ -20,4 +22,4 @@ This processor will create an MQTT message from the provided parameters. This pr
qos: 1
retained: false
payload: "Hello, World!"
```
```
@@ -1,20 +1,22 @@
---
title: Create NATS Message
sidebar:
label: Create
order: 1
label: Create
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**: the subject to publish the message to.
- **payload**: the payload of the message.
- **subject**: the subject to publish the message to.
- **payload**: the payload of the message.
### Example
```yaml
- type: nats.message.create
params:
subject: "events"
payload: "Hello, World!"
```
```
@@ -1,18 +1,20 @@
---
title: Create OSC Message
sidebar:
label: Create
order: 1
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**: 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.
- **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.
```yaml
@@ -21,4 +23,4 @@ Create an OSC message with the address `/test/message` and two integer arguments
address: "/test/message"
args: ["{{.Payload[0]}}", "{{.Payload[1]}}"]
types: "ii"
```
```
@@ -1,14 +1,16 @@
---
title: Decode OSC Message
sidebar:
label: Decode
order: 3
label: Decode
order: 3
---
The `osc.message.decode` processor takes a array of bytes and turn it into OSC message if it can be. This processor will return an error if the bytes cannot be parsed as an OSC message
- **type**: `osc.message.decode`
### Example
```yaml
- type: osc.message.encode
```
```
@@ -1,14 +1,16 @@
---
title: Encode OSC Message
sidebar:
label: Encode
order: 2
label: Encode
order: 2
---
The `osc.message.encode` processor takes an OSC message and turns it into an array of bytes. This processor will return an error if the OSC message cannot be turned into bytes.
- **type**: `osc.message.encode`
### Example
```yaml
- type: osc.message.encode
```
```
@@ -1,21 +1,22 @@
---
title: Output from Router
sidebar:
label: Output
order: 1
label: Output
order: 1
---
The `router.output` processor takes any payload and outputs to the specified module.
- **type**: `router.output`
- **params**:
- **module**: the id of the [module](/concepts/modules) to output to.
- **module**: the id of the [module](/concepts/modules) to output to.
### Example
Output to the `osc-out` module.
```yaml
- type: router.output
params:
module: osc-out
```
```
+7 -4
View File
@@ -1,19 +1,22 @@
---
title: Execute Expr Expression
sidebar:
label: Expr
order: 2
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**: the Expr expressiont to execute.
- **expression**: the Expr expressiont to execute.
### Example
This example will add 1 to the wrapped payload.
```yaml
- type: script.expr
params:
expression: "Payload + 1"
```
```
+7 -5
View File
@@ -1,8 +1,8 @@
---
title: Execute JavaScript
sidebar:
label: JavaScript
order: 1
label: JavaScript
order: 1
---
The `script.js` processor takes in any payload type and executes a JavaScript function that is able to process the payload. The end value of `payload` will be returned as the output of the processor.
@@ -13,13 +13,15 @@ This run your JavaScript program in a [sandboxed environment](https://gitlab.com
- **type**: `script.js`
- **params**:
- **program**: The JavaScript program to run. The payload is available as a global variable called `payload`.
- **program**: The JavaScript program to run. The payload is available as a global variable called `payload`.
### Example
Replace all occurrences of `|` with `,` in the payload
```yaml
- type: script.js
params:
program: |
payload = payload.replaceAll('|',',');
```
payload = payload.replaceAll('|',',');
```
+9 -6
View File
@@ -1,22 +1,25 @@
---
title: Run WASM (Extism) Plugin
sidebar:
label: WASM
order: 3
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**: 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`
- **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
```yaml
- type: script.wasm
params:
path: "./test.wasm"
function: "test"
```
```
@@ -1,23 +1,26 @@
---
title: Create SIP Audio Response
sidebar:
label: Create
order: 1
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**: 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
- **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.
```yaml
- type: sip.response.audio.create
params:
preWait: 1000
audioFile: "response.wav"
postWait: 1000
```
```
@@ -1,23 +1,26 @@
---
title: Create SIP DTMF Response
sidebar:
label: Create
order: 1
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**: 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
- **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.
```yaml
- type: sip.response.dtmf.create
params:
preWait: 1000
digits: "1234"
postWait: 1000
```
```
@@ -1,19 +1,22 @@
---
title: Create String
sidebar:
label: Create
order: 3
label: Create
order: 3
---
The `string.create` processor creates a string based on the provided template. This processor will return an error if there is an issue executing the template. The template property is just a [Go template](https://pkg.go.dev/text/template) that will be evaluated with the incoming message provided as an environment.
- **type**: `string.create`
- **params**:
- **template**: string template that will have the incoming message as the context
- **template**: string template that will have the incoming message as the context
### Example
This would create a string using the `Address` property of the incoming message like and OSC message
```yaml
- type: string.create
params:
params:
template: "{{.Address}}
```
```
@@ -1,14 +1,16 @@
---
title: Decode String
sidebar:
label: Decode
order: 1
label: Decode
order: 1
---
The `string.decode` processor takes a array of bytes and turn it into string. This processor will return an error if the message being processed is not an array of bytes.
- **type**: `string.decode`
### Example
```yaml
- type: string.decode
```
```
@@ -1,14 +1,16 @@
---
title: Encode String
sidebar:
label: Encode
order: 2
label: Encode
order: 2
---
The `string.encode` processor takes a string and turns it into an array of bytes. This processor will return an error if the message being processed is not a string.
- **type**: `string.encode`
### Example
```yaml
- type: string.encode
```
```
+6 -4
View File
@@ -1,20 +1,22 @@
---
title: Split String
sidebar:
label: Split
order: 5
label: Split
order: 5
---
The `string.split` processor takes a string and turns it into an array of strings by splitting on `params.separator`. This processor will return an error if the message being processed is not a string.
- **type**: `string.split`
- **params**:
- **pattern**: string to split incoming string on
- **pattern**: string to split incoming string on
### Example
Split incoming string on `,` i.e `"one,two,three"` -> `["one","two","three"]`
```yaml
- type: string.split
params:
separator: ","
```
```
+7 -4
View File
@@ -1,19 +1,22 @@
---
title: Sleep
sidebar:
label: Sleep
order: 1
label: Sleep
order: 1
---
The `time.sleep` processor will sleep for the specified `duration` in milliseconds before passing the message to the next processor.
- **type**: `time.sleep`
- **params**:
- **duration**: the duration to sleep in milliseconds
- **duration**: the duration to sleep in milliseconds
### Example
This would sleep for 5 seconds before passing the message to the next processor.
```yaml
- type: time.sleep
params:
duration: 5000
```
```