A third-party system hook is a provider that sends internal events from the media server to other systems. The events sent through the hook contain session, peer, and track.
The connector
node sends the hook. So, to enable the hook to provide, you need to use --hook-uri
to pass the provider's URI when starting the node.
RUST_LOG=info \
RUST_BACKTRACE=1 \
cargo run -- \
--sdn-zone-id 0 \
--sdn-zone-node-id 4 \
--seeds 1@/ip4/127.0.0.1/udp/10001 \
connector \
--hook-uri "http://localhost:30798/webhook"
Message will sent to another system by using JSON (serde and serde_json) or Binary format which is generated from Protobuf, defined by HookEvent message:
message HookEvent {
uint32 node = 1;
uint64 ts = 2;
oneof event {
RoomEvent room = 3;
PeerEvent peer = 4;
RecordEvent record = 5;
}
}
Example with Json:
{
"node":1,
"ts":1724605969302,
"event":{
"Peer":{
"session_id":3005239549225289700,
"event":{
"RouteBegin":{
"remote_ip":"127.0.0.1"
}
}
}
}
provider | status | description |
---|---|---|
webhook | ✅ | Will send each event using Restful API with POST method |