Record hook not working

smartbet

New Member
Dear Max, Recording hook stop to work after Dec 5 when I updated to version 5.2.854.
I tried to set recording hook manually but server failed to start.
Code:
on_record_hook_script=/usr/local/FlashphonerWebCallServer/bin/on_record_hook.sh
 

Max

Administrator
Staff member
Good day.
In latest builds, WCS is starting from flashphoner user, not from root for better security. So if you're copying record files somewhere in record hook script, please make sure that this user have permission to write to. For example, if you're copying files to /opt/media folder
Code:
STREAM_NAME=$1
FILE_NAME=$2

echo $STREAM_NAME:$FILE_NAME >> /usr/local/FlashphonerWebCallServer/logs/record.log
cp $FILE_NAME /opt/media
please allow writing permissions to this folder
Code:
sudo chmod o+w /opt/media
You can also add flashphoner user to sudoers and use sudo while copying
I tried to set recording hook manually but server failed to start.
We cannot reproduce this issue on our test servers. Please provide SSH access to the server using this form, we will check
 

smartbet

New Member
Good day.
In latest builds, WCS is starting from flashphoner user, not from root for better security. So if you're copying record files somewhere in record hook script, please make sure that this user have permission to write to. For example, if you're copying files to /opt/media folder
Code:
STREAM_NAME=$1
FILE_NAME=$2

echo $STREAM_NAME:$FILE_NAME >> /usr/local/FlashphonerWebCallServer/logs/record.log
cp $FILE_NAME /opt/media
please allow writing permissions to this folder
Code:
sudo chmod o+w /opt/media
You can also add flashphoner user to sudoers and use sudo while copying

We cannot reproduce this issue on our test servers. Please provide SSH access to the server using this form, we will check
We checked and rechecked by your info provided and hook script does not call, recordings are stored in default folder. How can i see hook script log?
 

Max

Administrator
Staff member
How can i see hook script log?
You can add any logging messages to the script. Please make sure you redirecting messages to a file which is permissive to write, for example, to
/usr/local/FlashphonerWebCallServer/logs/record.log
You can also provide SSH access to the server using this form, we will check
 

smartbet

New Member
So after long investigation we resolved this is was from our side, certificate for hook that was connecting to amazon has been expired and it didn't log any error on that cause.
 
Top