Friday, February 22, 2019

Issabel Contact Center GUI Tweaks

Here are some modifications you can make to ISSABEL asterisk distribution to make it more customized at a HTML level.

Make sure you backup the files.  If you aren't familiar with HTML JAVA etc one wrong place quote or tick could make the system completely unusable!

Agent Contact Center Desktop:

Edit the file:


On around LINE 180 alter the text in ' ' section on the right. (shown in bold
 'WELCOME_AGENT'         =>  _tr('COMPANYNAME Agent Console'),

Save your changes and reload the page (CTRL+F5) and the title should update



Can change the name of the VTIGER CRM tab that ISSABEL puts in.
I changed mine to CUSTOMER CRM

Edit the file:

Alter the section in BOLD

    'BTN_VTIGERCRM'  =>  file_exists('/var/www/html/vtigercrm') ? _tr('CUSTOMER CRM') : NULL,

My agents were confused sometimes and would press end session instead of hangup.

Edit the file:

'BTN_FINALIZAR_LOGIN'           =>  _tr('End Calls and Logout'),


Issable has a feature that if you click on the "VTIGER" CRM tab in the agent desktop console window, it will launch VTIGER.  

This tab can be useful for a number of reasons.   One being that even if you DONT have vtiger installed on your system, IF you create the folder called "vtigercrm" in  /var/www/html/ the presence of that directory will make the tab appear in the console.

In my situation I have Vtiger 7 installed in a completely different server, so I created a file called "index.php" in this directory with the following inside the file to direct any web traffic to that directory to the new server.

        echo "<script> location.href=''; </script>";

However you could make this tab be anything.  You can rename it (process outlined in this post) and then you can put any URL in there you like.

Change the stuff under the "ADMIN" drop down menu
In this example I changed the value from "ISSABEL" to "CONTACT CENTER" 
(we have a product with a similar name and it was causing confusion)


Modify the options in BOLD to be what you want

"CHANGE_PASSWORD"           =>  _tr("Change Issabel Password"),


EDIT "INFO" options

edit the file:

you'll see options listed.  You can customize and ADD options in!

In this example we copy/pasted some lines and modified them with Hotmail, Reddit and Google to show how you can point to other URL locations

<!-- Profile sub-links -->
<li><a href="#" class="register_link">{$Registered}</a></li>
<li><a href="#" id="viewDetailsRPMs"><i class="fa fa-cube"></i>{$VersionDetails}</a></li>
<li><a href="" target="_blank"><i class="fa fa-external-link"></i>Visit Issabel Website</a></li>
<li><a href="" target="_blank"><i class="fa fa-external-link"></i>Hotmail</a></li>
<li><a href="" target="_blank"><i class="fa fa-external-link"></i>Reddit</a></li>  
<li><a href="" target="_blank"><i class="fa fa-external-link"></i>Google</a></li>  
<li><a href="#" id="dialogaboutissabel"><i class="fa fa-info-circle"></i>{$ABOUT_ISSABEL2}</a></li>


Add Additional menus of your own in the Agent console:

You'll notice in this example we've add 2 more menu options, and we've updated the ICON.

edit the file:


Copy paste the BOLD code and alter it to suite your environment.

            <ul class="dropdown-menu">

                <!-- Reverse Caret -->
                <li class="caret"></li>

                <!-- Profile sub-links -->
                <li><a href="#" class="register_link">{$Registered}</a></li>
                <li><a href="#" id="viewDetailsRPMs"><i class="fa fa-cube"></i>{$VersionDetails}</a></li>
<!--            <li><a href="" target="_blank"><i class="fa fa-external-link"></i>Issabel Website</a></li>  -->
                <li><a href="" target="_blank"><i class="fa fa-external-link"></i>Hotmail</a></li>
                <li><a href="" target="_blank"><i class="fa fa-external-link"></i>Reddit</a></li>
                <li><a href="#" id="dialogaboutissabel"><i class="fa fa-info-circle"></i>{$ABOUT_ISSABEL2}</a></li>

<!------- doubled up code ---->

        <li id="header_notification_bar" class="profile-info dropdown">
            <a data-toggle="dropdown" class="" href="#">
                <i class="fa fa-info-circle"></i>
            <ul class="dropdown-menu">

                <!-- Reverse Caret -->
                <li class="caret"></li>

                <!-- Profile sub-links -->
                <li><a href="" target="_blank"><i class="fa fa-external-link"></i>Google</a></li>

<!------ end doubledup code ----->

        <!--li id="header_notification_bar" class="dropdown">
            <a {*data-toggle="dropdown"*} class="" href="index.php?menu=addons">
                <i class="fa fa-cubes"></i>

Customize the icon that you click on by altering
<i class="fa fa-info-circle"></i>

Here's a few you can use

Icon changed from an "I" to a gauge (tachometer)

You can have a whole bunch of them.  Just repeat the code in bold above then customize each one.


You can edit the PASSWORD prompt on the login. Again, we have a product with a similar name so we had agents getting confused.

Alter the password popup box when you click on "CHANGE ISSABEL PASSWORD"


        'title' =>  _tr('Change GUI Password'),
        'html'  =>  $smarty->fetch("$local_templates_dir/_change_password.tpl"),


Modify Login password box.  

My users sometimes get confused between the agent id they logon to the GUI with and the one for their phone.  IE.  jsmith/password01  vs  SIP/1000  / numeric password they key into the phone.  Agents are smart, but we live in a society of too many passwords.


This hack will let you change the Campaign Monitoring screen to show the agent name instead of the just the extension.  its not perfect but its a start.

Just use these 2 lines for each agent you want to change and repeat it for each additional agent.
 if ($agent ['agentchannel'] == "SIP/1001")
     $agent ['agentchannel'] = "John Smith";

Find this code in the file /var/www/html/modules/campaign_monitoring/index.php
function formatoAgente($agent)
$sEtiquetaStatus = _tr($agent['status']);
$sFechaHoy = date('Y-m-d');
$sDesde = '-';
switch ($agent['status']) {
case 'paused':
    // Prioridad de pausa: hold, break, agendada
    if ($agent['onhold']) {
        $sEtiquetaStatus = _tr('Hold');
        // TODO: desde cuándo está en hold?
    } elseif (!is_null($agent['pauseinfo'])) {
        $sDesde = $agent['pauseinfo']['pausestart'];
        $sEtiquetaStatus .= ': '.$agent['pauseinfo']['pausename'];
    // TODO: exponer pausa de agendamiento
case 'oncall':
    $sDesde = $agent['callinfo']['linkstart'];
if (strpos($sDesde, $sFechaHoy) === 0)
    $sDesde = substr($sDesde, strlen($sFechaHoy) + 1);

return array(
    'agent'         =>  $agent['agentchannel'],
    'status'        =>  $sEtiquetaStatus,
    'callnumber'    =>  is_null($agent['callinfo']['callnumber']) ? '-' : $agent['callinfo']['callnumber'],
    'trunk'         =>  is_null($agent['callinfo']['trunk']) ? '-' : $agent['callinfo']['trunk'],
    'desde'         =>  $sDesde,
Now insert the 'fix' above the "return array(" section below
 if (strpos($sDesde, $sFechaHoy) === 0)
    $sDesde = substr($sDesde, strlen($sFechaHoy) + 1);

     if ($agent ['agentchannel'] == "SIP/1001")
         $agent ['agentchannel'] = "John Smith";

    return array(
    'agent'         =>  $agent['agentchannel'],
    'status'        =>  $sEtiquetaStatus,
    'callnumber'    =>  is_null($agent['callinfo']['callnumber']) ? '-' : $agent['callinfo']['callnumber'],
    'trunk'         =>  is_null($agent['callinfo']['trunk']) ? '-' : $agent['callinfo']['trunk'],
    'desde'         =>  $sDesde,
You can repeat the code for a more agents
if (strpos($sDesde, $sFechaHoy) === 0)
    $sDesde = substr($sDesde, strlen($sFechaHoy) + 1);

     if ($agent ['agentchannel'] == "SIP/1001")
         $agent ['agentchannel'] = "John Smith";

     if ($agent ['agentchannel'] == "SIP/1002")
         $agent ['agentchannel'] = "Barb Dell";

     if ($agent ['agentchannel'] == "SIP/1003")
         $agent ['agentchannel'] = "Jane Doe";

     if ($agent ['agentchannel'] == "SIP/1004")
         $agent ['agentchannel'] = "Maria Jones";

    return array(
    'agent'         =>  $agent['agentchannel'],
    'status'        =>  $sEtiquetaStatus,
    'callnumber'    =>  is_null($agent['callinfo']['callnumber']) ? '-' : $agent['callinfo']['callnumber'],
    'trunk'         =>  is_null($agent['callinfo']['trunk']) ? '-' : $agent['callinfo']['trunk'],
    'desde'         =>  $sDesde,

Looks like this:


If you need to modify the Issabel logos and replace them with your own, just replace this png file.

the main menu logo is located in this directory:


Hey I don't want to NOT give Issabel credit for this product, its awesome.  But my login is public facing so I want to avoid advertising the system to reduce chances of exploits being attempted.

This is the reference file - changes it to the new name
The default file is about 200x60 in size.

The file name reference is in the

and called "issabel_logo_mini.png"

You can make the logo size doubled with the following commands:

sed -i -r 's/width="200"/width="400"/' /var/www/html/themes/tenant/_common/login.tpl
sed -i -r 's/height="62"/height="110"/' /var/www/html/themes/tenant/_common/login.tpl


You can remove the change password option completely

search for 'password'
Delete these 3 lines
<a href="#" class="setadminpassword"> <i class="fa fa-user"></i> {$CHANGE_PASSWORD}

Agent Logoin screens


grep -R "agent_call" /var/www/html/

Add customer portal to vtiger 7.1.0

Here's what I did to get the Customer Portal to work on an instance of 7.1.0
This was pretty much step by step after an install.  SOME sections might not apply to you. 

This is tested on CENTOS 7.0 (based on the install detailed in this blog site)

You might need to change it a little if using another form of OS to suit that OS.
the server ip we are using is, so you'll need to change that to your own needs
Also our installation directory for vtiger is "vtigercrm" which might differ from yours.

So, here's what the screen will pretty much look like when you click on the "Customer Portal" for the first time.

In 7.1.0 there's a problem.  The URL is formatted wrong and has an extra " / " in the title that will fail everything right away.

That is fixed by editing the file 
 and in the section "$PORTAL_URL" you'll see this " /customerportal

Remove the "/" in front of customer portal.  Should look like this:

$PORTAL_URL = $site_URL.'customerportal';

Save those changes

Now you need to download the customer portal code which is usually separate from Vtiger install.
This threw me for a loop why this code isnt' included with the install.  So you can grab it from source forge.

from cli type this:
cd /tmp
Now you need to unzip it.
(if you are on centos and need to install unzip type in   " yum -y install unzip " and it will download and install the app)
mv vtigercrm-customerportal-7.1.0 customerportal
mv customerportal/ /var/www/html/scansourcecrm/
chown -R apache:apache /var/www/html/vtigercrm/customerportal
cd /var/www/html/vtigercrm/customerportal
cp config.sample.php config.php
edit the file config.php

You'll see this section in the file

//CRM URL without trialing/
'crm.url' => '',
//Portal URL without trialing/
'portal.url' => '',

//CRM URL without trialing/
'crm.url' => '',

//Portal URL without trialing/
'portal.url' => '',

Save those changes

Now, log OUT of Vtiger and log back in


Now you should have a logon screen!

If you get an error in this window with something like:

Warning: strftime(): It is not safe to rely on the system's timezone settings.
You are *required* to use the date.timezone setting or the date_default_timezone_set() function.

then you need to edit the /etc/php.ini file

Under [DATE}, make sure you have a valid date.timezone setting in there.  If not add it in (like in bold) and save your changes.  Here is a link of valid time zone syntax

; Defines the default timezone used by the date functions
;date.timezone =
date.timezone = America/Denver

Save your changes enter in

service httpd restart

Should be all fixed

Issabel Call Center - Make Callback Agent default

Issabel call center makes "agent" the default menu selection in the gui to login with "Call Back Agent" is the secondary.  

If you run a contact center that is primarily a callback, this is an extra step that you can get around by adjusting the following piece of code.   My coworker Vince and HTML wizard had this engineered in minutes.  A master of slick code.

This code clicks the "Callback Login" button automatically to make this screen the default one.
It saves agents in a center that is primarily "CallBack" agents the tedious step of clicking on this very small checkbox.

First edit this file:
Scroll down to the </head> function and you'll see the following:

    <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" "class="mainBody page-body" {$BODYPARAMS}>
    <div class="page-container">

Insert the code in BOLD into this section and make it look like this:


<script type='text/javascript'>
        function checkTheBox()

    <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="checkTheBox()" class="mainBody page-body" {$BODYPARAMS}>

Save your changes

Now go to your logon screen and test.

When you click on Agent Console, you will be taken directly to the CallBack Agent Screen.

Wednesday, February 20, 2019

Remove vTiger 7.1.0 banner advertisement

Installed Vtiger 7.1.0 but don't want the banner advertisement on the desktop?
here's what you do:

create file " removead.php " in /var/www/html/DirectoryOfvTiger 

Inside this file put in the following:

include_once 'vtlib/Vtiger/Module.php';
$moduleInstance = Vtiger_Module::getInstance('ExtensionStore');
if ($moduleInstance) $moduleInstance->deleteLink('HEADERSCRIPT', 'ExtensionStoreCommonHeaderScript');
echo "ads removed";

Save that file
now from a web browser run that file


You should see the web browser display "vtiger banner has been removed"

You can now delete the file removead.php

 vTIGER login screen logo

That logo is stored in /var/www/html/vtigercrm/layouts/v7/modules/Users/Login.tpl

in a filename of vtiger.png and is located at /var/www/html/scansourcecrm/layouts/v7/resources/Images

 vTIGER login background screen logo
That is stored in is stored 

in /var/www/html/vtigercrm/layouts/v7/modules/Users/Login.tpl
refereed to by a file called "login-background.jpg"

The code to display the advertisement on the login screen is located in

from lines from around 260 to 310 
you'll see it start with this bit:

<div class="col-lg-5">
<div class="marketingDiv widgetHeight">{if $JSON_DATA}
and end around line 310 with

   <a href="" target="_blank" style="margin-right: 25px;"><img src="layouts/v7/resources/Images/" style="width: 85%; height: 100%; margin-top: 25px;"/></a>

The alignment for the login box is at around line 208.

This keeps it left justified

This would make it middle justified
 class=”col-lg-4 col-lg-offset-4″

How to enable SSL on your vTiger CRM

Get an SSL certificate, free one from let’s encrypt will work
Edit to add https:// to your site URL
Force everyone to be redirected to the https version of the app. To force that, you need to access your CRM folder in the server and create a new file called “.htaccess” At the top of the file, you need to include the following code:

RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$$1 [R,L]

Save the file and test!

Optimize Vtiger Mysql server

MariaDB has a system known as  “Slow Query Log", but is default off.
To enable the slow query log 

mysql -u root -pSET GLOBAL slow_query_log = 'ON';SET GLOBAL long_query_time = X;
By default, the log file is stored in /var/lib/mysql/hostname-slow.log. You can change it with the following command

SET GLOBAL slow_query_log_file = '/path/filename';
Continue to monitor the slow query log file to see which queries take a long time to run.
You can trigger a sleep with this command.
SELECT SLEEP(X);SET GLOBAL slow_query_log = 'OFF';

Now that you have identified the slow or problematic queries you will need to fix and improve them
Fixing bad or slow queries
MariaDB has an EXPLAIN command which will look at queries for performance issues:
EXPLAIN describes how a SELECT statement
EXPLAIN EXTENDED provides information of the table rows that are filtered by the statement

Tuesday, February 19, 2019

Install osTticket 1.11 on CENTOS 7

Install osTicket 1.11 on CENTOS 7

Standard installation of CENTOS 7 minimal build 1810 completed with root access to SSH session and root access.
Deployment below is based on a fully updated OS available (as of January 2019) test on HyperV)

Copy/Paste the commands in BOLD.  Submit them one at a time, waiting for each action to complete.  

Install base packages

yum -y install epel-release*
sudo yum -y install httpd mariadb mariadb-server php php-mysql php-fpm php-cli php-xml php-common php-gd php-mbstring wget unzip php-opcache php-pecl-apcu php-intl php-imap
Install MySQL/MariaDB
systemctl start mariadb.service
systemctl enable mariadb.service 
Configure MYSQL
sudo mysql -u root -p
 Setup database tables. You can change anything in itelics to suit your installation ids
CREATE DATABASE osticket_db;
CREATE USER 'osticket_user'@'localhost' IDENTIFIED BY 'osticket_password';
GRANT ALL PRIVILEGES on osticket_db.* TO 'osticket_user'@'localhost' ;
Install latest version (as of FEB 2019) of osTicket from GITHUB
cd /tmp/
Unzip (defaults to 'upload' folder)
Move it to apache web directory
sudo mv /tmp/upload /var/www/html/support
Set permissions
sudo chown apache: -R /var/www/html/support
Preinstall osTicket configs
cd /var/www/html/support/
sudo cp /var/www/html/support/include/ost-sampleconfig.php include/ost-config.php
Sets SELINUX to disable 
sed -i -r 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config
Update Firewall Rules
sudo firewall-cmd --zone=public --add-port=80/tcp --permanent
sudo firewall-cmd --reload
This next command is super important.  This resolves the error "is currently unable to handle this request." When you try and login to (as of my testing) above 1.9.  If you have a different location name for your osTicket installation just alter the file path in the command.
sudo chmod -R 755 /var/www/html/support/
Set config file ready for initial customization
sudo chmod 0666 /var/www/html/support/include/ost-config.php
service httpd restart
Test your install! 
You should see something like this screen, everything should be GREEN check marked.


You'll be at the osTicket basic information.  This section allows you to do some initial configs.

System Settings
HELP DESK NAME = The name that this trouble ticket system should be associated with.  Maybe the name of the company or project.

Default email is the email address that interaction with this ticket system will use.

Database settings

Use the settings that you configured when installing the the maria db
Once completed, click on INSTALL NOW

Once completed the initial configuration you'll see a window like this:

When you see this window, go back to your CLI and change the privileges from the configuration file.
chmod 0644 /var/www/html/support/include/ost-config.php
All Done!  Start using it!

Monday, February 18, 2019

Install CENTOS 7 and RT - Request Ticket

Do a base install of Centos 7 1810 (tested on)

Install RT prerequisites
yum -y install expat gd graphviz openssl expat-devel gd-devel graphviz-devel  openssl-devel perl perl-CPAN wget screen mod_fcgid postgresql-server postgresql-devel
yum -y groupinstall "Development Tools" "Web Server"
Update system files 
yum -y update
Disable SELINX 
sed -i -r 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config
shutdown -r now
Install Postgres database 
postgresql-setup initdb
systemctl enable postgresql.service
systemctl enable httpd.service
systemctl start postgresql.service
systemctl stop httpd.service
sudo -u postgres psql
 Change the entry "XXXXXXX" to your preferable password
Edit the config
vi /var/lib/pgsql/data/pg_hba.conf
Look for:

# "local" is for Unix domain socket connections only#local  all  all  peerlocal  all all peer

change "peer" to "md5"

# "local" is for Unix domain socket connections only#local  all  all  peerlocal  all all md5 
systemctl restart postgresql.service
Install CPAN (Comprehensive Perl Archive Network) 
curl -L | perl - --sudo App::cpanminus
Get RT
cd /tmp 
tar xvzf rt-4.4.3.tar.gz -C /tmp
cd /tmp/rt-4.4.3
Configure RT 
./configure --enable-graphviz --enable-gd --with-web-user=apache --with-web-group=apache --with-db-type=Pg
export RT_FIX_DEPS_CMD=/usr/local/bin/cpanm
make testdeps
Depending on network and CPU step this next step can be 30 minute process
make fixdeps
cpanm HTTP::Headers::Fast --force
make fixdeps

Edit the file
vi lib/RT/Interface/Web/
Find these two lines (around line 60)

use RT::Interface::Web::Request;
use File::Path qw( rmtree );
Insert the following line between them

use RT::ObjectCustomFieldValues; 
Make it look like this

use RT::Interface::Web::Request;
use RT::ObjectCustomFieldValues;
use File::Path qw( rmtree );

Complete the installation of RT
make install
Update Firewall Entries
firewall-cmd --zone=public --add-port=80/tcp --permanent
firewall-cmd --reload
Start RT service
Login to RT - http://serverIP

Configure using the web interface refer to the RT documents on what to do

Press CTRL+C

Configure web server


vi /etc/httpd/conf.d/fcgid.conf

Add the following to the bottom

FcgidMaxRequestLen 1073741824

Create /etc/httpd/conf.d/rt.conf and put this in the file
# RT4 configuration for Apache
# With minor changes, this configuration is based on the original documentation:
### Optional apache logs for RT
# Ensure that your log rotation scripts know about these files
# ErrorLog /opt/rt4/var/log/apache2.error
# TransferLog /opt/rt4/var/log/apache2.access
# LogLevel debug

AddDefaultCharset UTF-8

ScriptAlias / /opt/rt4/sbin/rt-server.fcgi/

DocumentRoot "/opt/rt4/share/html"

<Location />
  # For Centos7/Apache 2.4 use this line:
  Require all granted

  # For Centos6/Apache 2.2 use these two lines:
  # Order allow,deny
  # Allow from all

  Options +ExecCGI
  AddHandler fcgid-script fcgi

Start apache:
systemctl start httpd.service