Browse Author


Video Conferencing Endpoint Not Saving CDR in TMS

There was this one Tandberg VC endpoint, that we call SGP, on our network that would not save any call detail records into our TelePresence Management Suite.


This particular endpoint was set up with a public IP address facing the public internet, so we thought maybe there were some firewall rules blocking the CDR being sent to TMS. Before asking the network engineers to look at the firewall and network rules, I tried playing with every single setting on the endpoint that I could think of. Nothing that I changed would get the CDR to save.

One day, while I was looking at the settings for a different device in TMS, I noticed a tab called Connection. In that area, there was a “System Connectivity” dropdown menu with “Reachable on LAN” chosen. Then I thought to myself, what if I change it to “Reachable on Public Internet” for the SGP VC endpoint? Because SGP was facing the public internet after all…


Solution: I went to SGP’s Connection page in TMS, changed the connectivity to “Reachable on Public Internet”, pressed Save, and made a test video call to the endpoint. Lo and behold, the CDR was sent to TMS!


Now we can finally start gathering CDR for this VC endpoint after years of deployment, and we can give proper usage reports to our managers.

Bash Script Not Writing to File

I was making a bash script,, that uses cURL and regex to grab 6 chart images (that are encoded in base64) from 6 ServiceNow published reports, and then writing them to a file, page_its.php. Here’s the code:




for (( i = 0 ; i < ${#urls[@]} ; i++ )) do
	result[$i]=`curl -s ${urls[$i]} | sed -rn 's/.*<img usemap="#" class="chart" src="(.+)"><\/img>.*/\1/p'`

echo '<div class="row shadow">' > $file
echo '<h3>IT Services</h3>' >> $file
echo '<div class="col-md-4"><img src="'${result[0]}'" class="img-responsive" /></div>' >> $file
echo '<div class="col-md-4"><img src="'${result[1]}'" class="img-responsive" /></div>' >> $file
echo '<div class="col-md-4"><img src="'${result[2]}'" class="img-responsive" /></div>' >> $file
echo '</div>' >> $file
echo '<div class="row shadow">' >> $file
echo '<div class="col-md-4"><img src="'${result[3]}'" class="img-responsive" /></div>' >> $file
echo '<div class="col-md-4"><img src="'${result[4]}'" class="img-responsive" /></div>' >> $file
echo '<div class="col-md-4"><img src="'${result[5]}'" class="img-responsive" /></div>' >> $file
echo '</div>' >> $file

It was working fine when I was running it in SSH like this:

root@server ~# /var/www/dashboard/it/

No errors, and the page_its.php file was getting the data written to it.

But then I logged into the web control panel and set up the Scheduled Cron Job, all these errors popped up when I ran the cron job:

Execute Cron Job
Output from command /var/www/dashboard/it/ ..

/var/www/dashboard/it/ line 18: /var/www/dashboard/it/page_its.php: Permission denied
/var/www/dashboard/it/ line 19: /var/www/dashboard/it/page_its.php: Permission denied
/var/www/dashboard/it/ line 20: /var/www/dashboard/it/page_its.php: Permission denied
/var/www/dashboard/it/ line 21: /var/www/dashboard/it/page_its.php: Permission denied
/var/www/dashboard/it/ line 22: /var/www/dashboard/it/page_its.php: Permission denied
/var/www/dashboard/it/ line 23: /var/www/dashboard/it/page_its.php: Permission denied
/var/www/dashboard/it/ line 24: /var/www/dashboard/it/page_its.php: Permission denied
/var/www/dashboard/it/ line 25: /var/www/dashboard/it/page_its.php: Permission denied
/var/www/dashboard/it/ line 26: /var/www/dashboard/it/page_its.php: Permission denied
/var/www/dashboard/it/ line 27: /var/www/dashboard/it/page_its.php: Permission denied
/var/www/dashboard/it/ line 28: /var/www/dashboard/it/page_its.php: Permission denied


I couldn’t find out what was wrong. I was trying things like changing echo to cat, adding tee, using sudo, etc. It turns out that it was such a simple mistake… I forgot to set the file permissions of page_its.php to be writable.

Solution: I did chmod 666 page_its.php, and all is working well now.

Execute Cron Job
Output from command /var/www/dashboard/it/ ..

No output generated