Example: Matrix - sipcapture/paStash GitHub Wiki
Decentralized paStash with Matrix
Matrix is an open network for secure, decentralized communication.
In this example we'll use Matrix for two paStash instances using Matrix rooms to securely connect and exchange data, with optional e2e encryption :lock:
:wrench: Install
Install pastash and the required plugin on two separate systems:
npm install -g @pastash/pastash @pastash/input_matrix @pastash/output_matrix
:round_pushpin: Example
Create a recipe on the sender and receiver, joining the same roomId
.
:loudspeaker: Sender
input {
stdin {}
}
output {
matrix {
userId => "@some_account:matrix.org"
roomId => "#some_room:matrix.org"
token => "xxx_XXXXXXXXXXXXXXXXXXXXXXXXXXXX_xxxxx"
}
}
pastash --config_file=/tmp/sender.conf
:radio: Receiver
input {
matrix {
userId => "@some_account:matrix.org"
roomId => "#some_room:matrix.org"
token => "xxx_XXXXXXXXXXXXXXXXXXXXXXXXXXXX_xxxxx"
}
}
output {
stdout {}
}
pastash --config_file=/tmp/receiver.conf
:bell: Try it!
Type something in the sender console and you should see corresponding events on the receiver. Et Voila'!