Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ LBHOST='' #Obligatory to set if Load Balancer is used for PSTN (DID provider con
#RVD workspace path. (If not set default will be used).
#Default: leave empty.
RVD_LOCATION=''
RVD_URL='' # override if RVD is not under the same domain with restcomm. Use a base url like http://myrvd.restcomm.com . No path included.
RVD_URL='' # override if RVD is not under the same domain with restcomm. Use a base url like http://myrvd.restcomm.com . No path included. Also, if provided, bundled RVD will get undeployed.
RVD_VIDEO_SUPPORT='false' # Toggle RVD Video RCML generation and UI
RVD_MAX_MEDIA_FILE_SIZE=4194304 # Limit media file size when uploading. For video should probably be greater

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -540,26 +540,50 @@ otherRestCommConf(){
echo "End Rest RestComm configuration"
}

confRVD(){
echo "Configure RVD"
if [ -n "$RVD_LOCATION" ]; then
echo "RVD_LOCATION $RVD_LOCATION"
mkdir -p `echo $RVD_LOCATION`
sed -i "s|<workspaceLocation>.*</workspaceLocation>|<workspaceLocation>${RVD_LOCATION}</workspaceLocation>|" $RVD_DEPLOY/WEB-INF/rvd.xml

COPYFLAG=$RVD_LOCATION/.demos_initialized
if [ -f "$COPYFLAG" ]; then
#Do nothing, we already copied the demo file to the new workspace
echo "RVD demo application are already copied"
else
echo "Will copy RVD demo applications to the new workspace $RVD_LOCATION"
cp -ar $RVD_DEPLOY/workspace/* $RVD_LOCATION
touch $COPYFLAG
fi
disableRVD() {
if [[ -f "$RVD_DEPLOY.deployed" || -f "$RVD_DEPLOY.dodeploy" ]]; then
rm -f "$RVD_DEPLOY.deployed"
rm -f "$RVD_DEPLOY.dodeploy"
echo "RVD undeployed (or not deployed at all)"
else
echo "RVD not deployed"
fi
}

enableRVD() {
if [ -f "$RVD_DEPLOY.deployed" ]; then
echo "RVD already deployed"
else
touch "$RVD_DEPLOY".dodeploy
echo "RVD deployed"
fi
}

confRVD(){
if [ -z "$RVD_URL" ]; then
enableRVD
echo "Configure bundled RVD"
if [ -n "$RVD_LOCATION" ]; then
echo "RVD_LOCATION $RVD_LOCATION"
mkdir -p `echo $RVD_LOCATION`
sed -i "s|<workspaceLocation>.*</workspaceLocation>|<workspaceLocation>${RVD_LOCATION}</workspaceLocation>|" $RVD_DEPLOY/WEB-INF/rvd.xml

COPYFLAG=$RVD_LOCATION/.demos_initialized
if [ -f "$COPYFLAG" ]; then
#Do nothing, we already copied the demo file to the new workspace
echo "RVD demo application are already copied"
else
echo "Will copy RVD demo applications to the new workspace $RVD_LOCATION"
cp -ar $RVD_DEPLOY/workspace/* $RVD_LOCATION
touch $COPYFLAG
fi

fi
else
disableRVD
fi
}

## Adds/removes <rcmlserver>/<base-url> element based on $RVD_URL
## This version of confRcmlserver() will used xmlstarlet and will probably sed commands that rely on empty elements like <x></x> instead of <x/>
#confRcmlserver(){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public URI uploadFile(final String fileToUpload) {
if (logger.isInfoEnabled()) {
logger.info("Will thread sleep for 1 minute simulating the long operation of FileUtils.waitFor");
}
Thread.sleep(60000);
Thread.sleep(6000);
} catch (Exception e) {
logger.error("Exception while sleepig simulating the long operation waiting for the file");

Expand Down