Categories
Case Studies Knowledge Base QueueMetrics Support

QueueMetrics

We have recently installed and customised a Queuemetrics solution for a customer. Their key reason for choosing Queuemetrics was the ability to use dynamic agents without the need of major Elastix reprogramming and a clear and simple interface.

It was also decided that users needed to be able to log into the system from their handsets as well as from a web interface, as the customer is hoping to roll out an agent portal in the future.

To enable Hotdesk the  following setting has to be set similar to below

# The value is interval time (in seconds) used by the analyzer to look back searching HOTDESK verbs in the queue log
default.hotdesking=86400

This meant some additional dialplans to allow logging in & out and pausing.

These are similar to the dialplans that the web portals use except that they have prompts and they also have to store the extension and agent id in the asterisk database.

;added dialplan for queuemetrics
; Add Member - 422
; User is asked for their loging agent id
exten => _422XXXX,1,Answer
exten => _422XXXX,2,Read(AGENTID,agent-login,4,,1,6)
exten => _422XXXX,3,Gotoif($["${AGENTID}" = ""]?end)
exten => _422XXXX,4,GotoIf($[${LEN(${AGENTID})} != 4]?2)
exten => _422XXXX,5,set(DB(qmagent/${CALLERID(num)})=${AGENTID})
exten => _422XXXX,6,Macro(queuelog,${EPOCH},${UNIQUEID},NONE,Agent/${AGENTID},HOTDESK,SIP/${CALLERID(num)})
exten => _422XXXX,7,AddQueueMember(${EXTEN:3:4},SIP/${CALLERID(num)})
exten => _422XXXX,8,SayDigits(${AGENTID})
exten => _422XXXX,9,Playback(agent-loginok)
exten => _422XXXX,10(end),Hangup
; Remove Member - 423
exten => _423XXXX,1,Answer
exten => _423XXXX,2,set(DEL_AGENT=${DB_DELETE(qmagent/${CALLERID(num)})})
exten => _423XXXX,3,RemoveQueueMember(${EXTEN:3:4},SIP/${CALLERID(num)})
exten => _423XXXX,4,Playback(agent-loggedoff)
exten => _423XXXX,5,Hangup
; extension 32: agent pause with hotdesking (with pause code)
exten => _32XX,1,Answer
exten => _32XX,2,set(AGENTCODE=${DB(qmagent/${CALLERID(num)})})
exten => _32XX,3,NoOp( "QM: Pausing Agent/${AGENTCODE} at extension SIP/${CALLERID(num)} with pause reason '${EXTEN:2:2}' made by '${QM_LOGIN}' " )
exten => _32XX,4,PauseQueueMember(,SIP/${CALLERID(num)})
exten => _32XX,5,System( echo "${EPOCH}|${UNIQUEID}|NONE|Agent/${AGENTCODE}|PAUSEREASON|${EXTEN:2:2}" >> /var/log/asterisk/queue_log )
exten => _32XX,6,Playback(dictate/paused)
exten => _32XX,7,Hangup
; extension 33: agent unpause with hotdesking
exten => 33,1,Answer
exten => 33,2,NoOp( "QM: Unpausing Agent/${AGENTCODE} at extension SIP/${CALLERID(num)} made by '${QM_LOGIN}' " )
exten => 33,3,UnpauseQueueMember(,SIP/${CALLERID(num)})
exten => 33,4,Playback(dictate/pause)
exten => 33,5,Playback(removed)
exten => 33,6,Hangup

These need to be added to your extensions_custom.conf file in a context that’s included in the from-internal  context.

Also a change has to be made to the dialplans in the extensions_queuemetrics.conf to store and delete the database entry as well.

The system has proved to deliver what was expected and will shortly be expanded to track outbound calls and the addition of custom wallboards similar to what we recently produced for another customer.

If you would like to talk about adding QueueMetrics to your Asterisk system or are looking for a complete phone system and queuemetrics platform please contact us.

Categories
Asterisk Support Blog Elastix Support Knowledge Base Security

Shellshocked by Bash !

Well any one in IT and many people who never have anything todo with dirty working of *nix operating systems including Apples OSX cant have missed the news about the latest venerability. This is hot on the heels of teh OpenSSl one and the NTP one before that.

All these have different levels of risk, The NTP one was just a pain easily fixed and could cause little damage, The Openssl one was more of a risk as it allowed hackers to read the memory of systems using certain versions of OpenSSL nicknamed Heartbleed. Now the Bash one is fairly simple to exploit and has been now seen in the wild which in the case of Heartbleed it wasn’t really exploited in the wild.

So how do you test. simple , just type

env x='() { :;}; echo vulnerable’ bash -c “test”

and if it comes back saying Vulnerable update bash.

Great easy you say, well it was spent half a day checking 40 odd servers and updating bash. But then the update they rolled out want enough so today went back round updating again.

It has to be noted that some repositories were running slow and in teh case of one (SCHMOOZE) they hadn’t got the latest patch live by mid day.

It was pleasing how most suppliers were open and concise on what to check and how to fix. I was rather disappointed with  another Asterisk Based PBX distro who instead of publishing how to check and what to do, told users to download a script and run that, I don’t think its a good idea to hide security measures, If people deploy systems they need to know how to secure them.

I wonder whats next? , After spending 2 days on this now looking at setting up a Puppet server, This has cost me a day of my time and i’m meant to be installing a queuemetrics call center for a customer…

Categories
Asterisk Support Elastix Support FreePBX Knowledge Base

Using Gmail to send Voicemail emails

We have seen more and more ISPs blocking Port 25.  This means that sending emails natively from FreePBX or any Asterisk based IPBX for things such as voicemail notification can time out or be rejected.

To get round this you can send your email notifications via Gmail.

Firstly you need a Gmail account, once you have this jot down the user and password, you will need this later.

You now need to connect to your server via ssh as you have a couple of files to edit.

Firstly you need to enter the account details in sasl_passwd

vi /etc/postfix/sasl_passwd

and add

smtp.gmail.com:587 yourmailaddress@gmail.com:password

Save it, then edit main.cf

vi  /etc/postfix/main.cf

Then add at the end:

masquerade_domains = yourdomain.com
# The servers hostname below
myhostname = Asterisk.yourdomain.com
mydomain = Asterisk.yourdomain.com
# The email account its being sent from below
myorigin = voicemail@yourdomain.com

relayhost = smtp.gmail.com:587
mynetworks = 127.0.0.0/8
inet_interfaces = loopback-only
smtp_use_tls = yes
smtp_always_send_ehlo = yes
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
smtp_sasl_tls_security_options = noanonymous
smtp_tls_security_level = encrypt
smtp_generic_maps = hash:/etc/postfix/generic 
smtp_tls_security_level = secure
smtp_tls_mandatory_protocols = TLSv1
smtp_tls_mandatory_ciphers = high
smtp_tls_secure_cert_match = nexthop
smtp_tls_CAfile = /etc/pki/tls/certs/ca-bundle.crt

Then enter the following commands at teh command line

postmap hash:/etc/postfix/sasl_passwd
/etc/init.d/postfix restart

Finally you need to make a change to your gmail account to “Allow users to manage their access to less secure apps” which is in the security section of the Gmail ‘Domain’ account setting if its a GSuite account then make sure “Less secure app access” is set to yes in the accounts ‘security section’ if you don’t do this you will see:

535-5.7.8 Username and Password not 
accepted. Learn more at?535 5.7.8 https://support.google.com/mail/?p=BadCredentials  

or 

530-5.7.0 Authentication Required. Learn more at 530 5.7.0 h
ttps://support.google.com/mail/?p=WantAuthError

Most likely the 535 error if ‘Less secure app access’ is not enabled.

You should now be able to send email via the gmail account.

It’s worth making a couple of changes to the gmail account, firstly set and out of office sayings it’s only a sending mailbox and another to delete messages in the inbox.

Categories
Knowledge Base Security

Remote ssh tunnel script

We have various customers that have firewalls that only allow known trusted IP addresses through. Normally our office and our monitoring platform for example.

But if we are out and about we still sometimes need to access a system and its GUI, so we have created the simple script below that makes a ssh connection to the customer server and also tunnel to access any web gui.

This script is in place on the monitoring server so we can just ssh in to the monitoring platform and run the script. all that is needed is a single tunnel setup on the ssh client that i’m accessing the monitoring platform from.

#!/bin/bash
echo ssh tunnel tool. 2013 cyber-cottage.co.uk
echo Setting up a tunnel to $1
whois $1 |grep netname
if [ "$1" = '' ]; then
 echo "You have no remote destination set"
 echo "usage: remotetunnel.sh <remote server> <remote ssh port> <remote system port>"
 echo "For example remotetunnel.sh 81.22.23.24 8022 80"
 exit
fi
if [ "$3" = '' ]; then
echo "usage: remotetunnel.sh <remote server> <remote ssh port> <remote system port>"
echo "For example remotetunnel.sh 81.22.23.24 8022 80"
if [ "$2" = '' ]; then
 echo "You have no remote ssh or system port set, Setting ssh to port 22"
 port="22"
else
 port="$2"
fi
 echo "You have no remote system port set, Setting remote to port 80"
 rport="80"
else
 rport="$3"
fi
if [ "$port" = '' ]; then
 port=$2
fi
echo Remote system IP is $1
echo Remote ssh port is $port
echo Remote system port is $rport
read -p "Is this correct? (y/n) " RESP
if [ "$RESP" = "y" ]; then
 echo "Glad to hear it"
else
 exit
fi
ssh -L 9999:localhost:$rport  $1 -oport=$port
Categories
Elastix Support Knowledge Base

Elastix Custom Extensions.

This Short Video shows you how to setup custom extensions in Elastix and FreePBX

These can be used for calling mobiles or other external numbers that you want users to be able to dial as if they were extensions.

 

 

 

Categories
Elastix Support Knowledge Base

Setting up timed call flow in Elastix

Screenshot from 2013-06-19 14:50:45If you want to set up timed call flow in Elastix but still have the ability to override for holidays and when the office is open late you have a few extra steps to add.

We will assume  you have your queues and extensions setup for this video. If you havent set your extensions up see our other video on setting up extensions.

 

 

We have used 2 day/night modes, One at before the call enters the time condition, This means that you can override day service for holidays etc and another at the end that means the call can be forced to go to a night queue instead of voicemail.

I hope you found this useful and keep coming back for more.

Categories
Case Studies

Multi-Site Multi-Country Asterisk network

UPDATE

We have recently added the 5th system to the customers international VoIP network. This system was for their Polish office and is linked to their Tokyo, Sydney, Singapore and London office systems.

Globe

For this site a Sangoma FREEPBX 60 system was chosen for ease of remote deployment and reliability.    The Tokyo & Sydney offices already has a Xorcom XR2000 systems whilst the London and Singapore offices have a Openvox  Asterisk solutions.  .

xe2000-xe3000

For the New International offices FreePBX systems were chosen as they provide a full turnkey system that can be sent out to the office plugged in. The systems initially obtain their IP address by DHCP and once a port is forwarded through the firewall to this address a fixed IP address is assigned and the customer firewall updated. Access to The GUI is by a SSH tunnel so that other than a random port for SSH and a port for IAX2 no other ports need to be opened on the customer firewall. Endpoint manager makes the deployment of handsets on the remote systems a simple and reliable process.

All systems have been linked by IAX2 trunks and the dial-plan configured so that desk to desk calls can be made between all offices and outgoing calls break out of the closest geographic system, for example a user in Sydney making a call to a UK number will have the call originate from the London system and the same goes for Tokyo, Singapore and Polish users calling UK or international numbers.

The network of systems is key to the support of the customers 24×7 support service. This is controlled by a dial-plan that is complicated by the fact that Japan does not have “Daylight saving” so even though the calls land on the UK system we had to configure the dial-plan to take into account local time in Tokyo and not base routing solely on UK time.  This has proved reliable and very successful.

All systems on the network are monitored 24×7 by our Nagios monitoring platform, Not only monitoring Asterisk but also monitoring the status of the international IAX2 trunks.

 

Categories
Knowledge Base

Elmeg IP290 Configuration

elmeg_290_large

 

The Elmeg IP290 are a clone of the Old Snom 190 Sets. and these did support auto configuration. We hoped that it was a simple change to get the files working with the Elmeg.

It turns out that it wasn’t, There are a few gotchas.

  1. The phones dont seem to support tftp download, Just http and https
  2. They dont support sub directories. So files must be in the root directory of your webserver.

Firstly you need to configure your dhcpd.conf

Add the following to the general section

option snom-setting code 66 = string;
option snom-bootfile code 67 = string;

Then the following to the subnet

class “snom-phones” {
match if substring(hardware,1,3) = 00:09:4f;
option snom-setting “https://SERVERIP”;
}

Theb the following are the two files you need to create .

elmegIP290.htm

<html>

<pre>

# example snom general setting file

# After each setting (before the colon) you can set a flag

# General language and time configuration parameter

language: English

web_language: English

timezone: GBR-0

time_server: pool.ntp.org

ntp_server: pool.ntp.org

date_us_format: off

time_24_format: on

user_host1: SERVERIP

user_host2: SERVERIP

tone_scheme: GBR

</pre>

</html>

elmegIP290-00094FMACADDR.htm

<html>

<pre>

# example snom specific setting file

# After each setting (before the colon) you can set a flag

user_name1: 345

user_pass1: PASSWORD

user_name1: 345

user_realname1: 345

user_host1: SERVERIP

user_srtp1: off

user_dp_str1: !([^#]%2b)#!sip:1@d!d

# You may add up to 4 (snom300/ 12 (snom320,snom360,snom370) accounts

# set 1st account to active outgoing identity

active_line: 1

</pre>

</html>

 

Categories
Asterisk Support Elastix Support Knowledge Base Technical

Running a Macro on answer for Asterisk queues.

asteriskThe Asterisk Queue application has an option that will run a macro on answer, This can be very useful when integrating with CRM such as Capsule or call centre applications.

This option isnt included in freepbx, Though this can be hand coded it isn’t best to do this when using Elastix, AsteriskNoW or any other freepbx based system.

To add this option We have written a couple of patched versions of the relevant freepbx pages that can be downloaded here , You will also need to add a extra field to the mysql database as follows

  1. Log in to mysql:   mysql -u root -p
  2. Enter password
  3. mysql> use asterisk
  4. mysql> ALTER TABLE `queues_config` ADD `qmacro` VARCHAR( 255 ) NULL;
  5. mysql> describe queues_config;

You should now have something like this:- | qmacro | varchar(255) | YES | | NULL | | as the last line of the table.

Now download the tar file and unpack it. then copy the two files to the /var/www/html/admin/modules/queues directory.

On loading the queue page in freepbx you will now have the “Queue macro on answer” box

queuemacro

In this box you put the macro name you wish to run when a member answers a call.

For example:-

[macro-logit]
exten => s,1,Noop( capsule crm intergration ${crminfo} ${CALLERID(all)})
exten => s,n,Set(foo=${CURL(http://127.0.0.1/directory/capsual.php?strCallid=${crminfo})})
exten => s,n,Noop(${foo})
exten => s,n,Hangup()

This a simple dialplan that runs a php script to log calls to the capsule crm

capsual.php

<?php
$today = date(“F j, Y, g:i a”);
$duedate1 = date(“Y-m-d”);
$duedate2 = date(“H:i:s”);
$Token = ‘YOUR CAPSUAL API CODE’;
$number = $_GET[‘strCallid’];
$datetime = $today;
$duedate = “$duedate1″.”T”.”$duedate2″.”Z”;
echo $duedate;
$myxml=”<?xml version=”1.0″ encoding=”UTF-8″?>n
<task>n
<description>Call recieved from $number at $datetime. Please update and assign this task if required</description>n
<dueDateTime>$duedate</dueDateTime>n
<category>incoming call</category>n
</task>”;
// The URL to connect with (note the /api/ that’s needed and note it’s person rather than party)
// SEE: http://capsulecrm.com/help/page/api_gettingstarted/
$capsulepage = “https://youraccount.capsulecrm.com/api/task”;
echo $capsulepage;
echo $number;
// Initialise the session and return a cURL handle to pass to other cURL functions.
$ch = curl_init($capsulepage);
// set appropriate options NB these are the minimum necessary to achieve a post with a useful response
// …can and should add more in a real application such as
// timeout CURLOPT_CONNECTTIMEOUT
// and useragent CURLOPT_USERAGENT
$options = array(CURLOPT_USERPWD => “$Token:x”,
CURLOPT_HTTPHEADER => array(‘Content-Type: application/xml’),
CURLOPT_HEADER => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => $myxml
);
curl_setopt_array($ch, $options);
// Do the POST and collect the response for future printing etc then close the session
$response = curl_exec($ch);
$responseInfo = curl_getinfo($ch);
curl_close($ch);
echo $responseInfo;
echo $response;
?>

Have fun

 

Categories
Handsets

Digium Handsets

The Only Phones Built Specifically For Asterisk

  • asteriskEasy provisioning from Asterisk or AsteriskNOW
  • Integrated with Asterisk voicemail, directory, parking, call recordings, call queues and more
  • Build custom phone apps with a simple JavaScript API

Digium’s family of IP Phones are the first on the market built specifically for use with Asterisk and Asterisk-based systems. All models include HD audio and plug-and-play deployment at a price that fits any budget. With multiple line appearances, context-aware soft keys, and advanced applications that integrate directly with Asterisk features, the Digium phones offer a better user experience than any other phone on the market.

Asterisk Phone Features

Smart Software

Access to information is the key to productivity in today’s business environment. The integrated applications that come standard with all Digium phones put critical information at your fingertips. With voicemail, call log, contacts, phone status, user presence, parking, call recording and call queue interface, the Digium phones provide simple, intuitive access to a wealth of information, saving valuable time.

 Simplified Provisioning

Standards-based IP phones have a reputation for being difficult to install and configure. Most systems require changes to network configurations or additional components to facilitate deployment. Digium phones support plug-and-play provisioning. Simply plug in the phone and it will automatically discover Asterisk systems on the network. Select the user you want to assign to the phone and the proper configuration is instantly loaded. For larger deployments you can pre-assign phones by tying a MAC address to an Asterisk user. It’s that simple.

Custom Applications

Most desktop phones come with a fixed feature-set that is determined exclusively by the manufacturer. Digium phones are different. All models include the Digium app engine, an innovative feature that makes it remarkably simple to build and deploy custom apps. All of the productivity apps that ship with a Digium Phone are written with the JavaScript API that is used by the app engine. A BETA version of the phone firmware with app development tools is available at phones.digium.com, along with documentation for developing your custom apps.

Getting Started With Digium Phones

Get AsteriskDigium phones will work with any version of Asterisk. However, we’ve added some compelling features that are only available today in Asterisk 11 or in special branches of Asterisk 1.8 (seeCertified Asterisk) and Asterisk 10 (the -digiumphones branch). To take advantage of simple provisioning, integrated applications and the app engine, you will need to use one of these versions

Call or email for sales enquiries