Closed dronmaxman closed 1 year ago
I don't think that metadata is available at the time when the recording ends.
As far as I understand, metadata.json store information about participants only for internal authorization. In my case it is empty
cat saefmcbwauujpuhr/metadata.json
{"meeting_url":"https://test-meet.domain.ua/id-adm-tasks","participants":[],"share":true}
I found the necessary information in the jicofo log, now the question is how to transfer it to jibri. Can you advise something? In theory, I can use a docker socket or another container with a mongo base.
docker-jitsi-meet-stable-8319-jicofo-1 | Jicofo 2023-03-23 10:53:50.063 INFO: [258] AbstractAuthAuthority.authenticateJidWithSession#431: Authenticated jid: v7hlvkzpnic4p5nkgtxewgcn@guest.meet.jitsi/HoZpD7FfRPiY with session: AuthSession[ID=andrey.barbolin@meet.jitsi, JID=v7hlvkzpnic4p5nkgtxewgcn@guest.meet.jitsi/HoZpD7FfRPiY, SID=650c9119-acc3-4b36-ba7f-d96c8b2f47bc, MUID=e622920858e3f0949c3fa845ce901414, LIFE_TM_SEC=62, R=id-adm-tasks@muc.meet.jitsi]@722495307
andrey.barbolin - my domain user id-adm-tasks - conference name
This is how it is done for jwt you can add similar thing. Jicofo is not the place for that, everything is in prosody. https://github.com/jitsi/jitsi-meet/blob/master/resources/prosody-plugins/mod_presence_identity.lua
The question is simple. Is it ok-correct that the participants field can be empty when using ldap?
cat saefmcbwauujpuhr/metadata.json {"meeting_url":"https://test-meet.domain.ua/id-adm-tasks","participants":[],"share":true}
This is the expected behavior, yes. What was suggested is that you take a look at the module in question and adapt it to also provide this data from your user type. Currently it is only for users with JWT but it could be adapted to really anything
thanks for the help.
I successfully set up a conference recording with jibri and ldap auth. I'm wrote a finalize.sh script to upload the file to the nextcloud.
Can you help me with the finalize.sh script to upload the Recording with LDAP auth to nextcloud?
If you are successful in getting the E-Mail ID that would be helpful too.. I am able to get E-Mail if entered in Profile to metadata.json.
I haven't found a way to get to the mailbox yet. This script uploads the file to the cloud, makes a public link, and sends it to the support team's mailbox, who then forwards the email to the owner.
If you are interested, this is my script. I use nextcloudcmd to upload files because curl can't handle large files. To work, you need to install the msmtp and nextcloudcmd packages
cat /root/.jitsi-meet-cfg/jibri/finalize.sh
#!/bin/bash
NEXTCLOUD_URL='https://cloud.example.com'
USERNAME='cloud_user'
PASSWORD='cloud_password'
CLOUD_FILE_PATH=records/$(basename $1)
LOCAL_FILE_PATH=$(ls $1/*.mp4)
FILE_NAME=$(basename $LOCAL_FILE_PATH)
JITSI_CONF_NAME=$(echo "$FILE_NAME" | cut -d'_' -f1)
MAIL_TO="hostmaster@example.com"
MAIL_SUBJECT="Meet record $JITSI_CONF_NAME"
MAIL_FROM="meet@example.com"
MAIL_SMTP="mxs01.example.com"
MAIL_SMTP_PORT="25"
# Create folder on Nextcloud
curl -u $USERNAME:$PASSWORD -X MKCOL $NEXTCLOUD_URL/remote.php/dav/files/$USERNAME/$CLOUD_FILE_PATH
## Upload file with curl to nextcloud
##curl -u $USERNAME:$PASSWORD -X PUT --data-binary @$LOCAL_FILE_PATH $NEXTCLOUD_URL/remote.php/dav/files/$USERNAME/$CLOUD_FILE_PATH/$FILE_NAME
# Upload file to Nextcloud
nextcloudcmd -u $USERNAME -p $PASSWORD $1 $NEXTCLOUD_URL/remote.php/webdav/$CLOUD_FILE_PATH
echo /$CLOUD_FILE_PATH $1 $NEXTCLOUD_URL
# Generate public link for file
SHARE_RESPONSE=$(curl -u $USERNAME:$PASSWORD -X POST -H "OCS-APIRequest: true" $NEXTCLOUD_URL/ocs/v1.php/apps/files_sharing/api/v1/shares -d path="$CLOUD_FILE_PATH/$FILE_NAME" -d shareType=3 -d permissions=1)
PUBLIC_LINK=$(echo $SHARE_RESPONSE | sed -E 's/.*<url>([^<]+)<\/url>.*/\1/g')
MAIL_BODY="<html><body><h1>A recording of the conference is available by clicking here</h1><p>$PUBLIC_LINK</b> link.</p></body></html>"
# Send email
echo -e "From: $MAIL_FROM\nTo: $MAIL_TO\nSubject: $MAIL_SUBJECT\nContent-Type: text/html\n\n$MAIL_BODY" | msmtp --host=$MAIL_SMTP --port=$MAIL_SMTP_PORT --from=$MAIL_FROM $MAIL_TO
I successfully set up a conference recording with jibri and ldap auth. I'm wrote a finalize.sh script to upload the file to the nextcloud. And, I also want to send an email with a link to a file in the cloud.
How can I get the username (login) of the user who created the conference?