diff --git a/jilo b/jilo index fdb6427..04015bb 100755 --- a/jilo +++ b/jilo @@ -266,6 +266,17 @@ jitsi_log_parse() { db_query "$db_insert" fi + # locate participant leaving event + elif [[ "$line" =~ ([0-9-]+\ [0-9:.]+)\ [A-Z]+:.*\[room=${conference_name}@.*\ meeting_id=${conference_id}\]\ .*\.removeParticipant#.*:\ Removing\ ([a-zA-Z0-9]+) ]]; then + event_time="${BASH_REMATCH[1]}" + event_type='participant leaving' + participant_endpoint_id="${BASH_REMATCH[2]}" + participant_stats_id="" # FIXME + if [[ -n "$conference_id" ]]; then + db_insert=$(printf "$db_insert_participant_template" "$jitsi_component" "$conference_id" "$event_time" "$event_type" "$participant_endpoint_id" "$participant_stats_id" "") + db_query "$db_insert" + fi + # locate the corresponding conference ending event elif [[ "$line" =~ ([0-9-]+\ [0-9:.]+)\ [A-Z]+:.*\[room=([^ ]+)@.*\ meeting_id=([a-zA-Z0-9-]+)\]\ JitsiMeetConferenceImpl\.stop ]]; then end_time="${BASH_REMATCH[1]}"