Sorry to bring back an old thread but I am close to finishing this project except for this part.
After reviews, this is what the flow seems to be:
1) Client app makes all requests to Wowza in this format: http://WOWZA_IP:1935/live/channel.st...ING_ALSO_IN_DB
2) Wowza custom module executes the following code on the onHTTPSessionCreate event (based on this):
* Check DB to see if this user's token is active.
* If token is active, allow stream. Otherwise, reject.
* If stream is allowed, add Wowza Session_ID to database's "active_sessions" table.
Then I plan to have a separate cron script (every 1-5 minutes) that does the following:
* Get all active sessions in a Wowza server
* Check every session against database (match Wowza's list of active sessions with session_id's from DB)
* Kill all orphaned Wowza sessions that do not have a corresponding row in "active_sessions" table.
I have a few questions about implementing this:
1) How do I get the newly allowed stream's Wowza Session_ID in onHTTPSessionCreate event?
2) How do I implement this kill-script for orphaned Wowza sessions?
2.1) If I write a Shell/Python script, how would I access all of Wowza's active streams for that server?
2.2) Can I write a custom module which is executed on set interval that would take care of orphaned streams?
Thank you in advance for your help about this.