Renater / SIPMediaGW

A media gateway to provide SIP access (audio+video) on top of Jitsi Meet, BBB,...web conferences
Apache License 2.0
30 stars 9 forks source link

Add a route to monitor the host status #1

Closed Benjou02 closed 2 years ago

Benjou02 commented 2 years ago

Short description

This route checks the number of gateways that are up but not in a call, and if all gateways have ended their calls, meaning the host can be deleted.

Do not forget: since the gateway container takes 5sec to be deleted after the end of a call, the metrics are not accurate during these 5sec.

Changes

Added a GET route in the web.py server:

Tests

This code was tested on a machine with 3 gateways being used one after the other.