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
Asterisk Support Elastix Support Knowledge Base Technical

IAX2 Peers going unreachable.

In the past we have found that IAX@ peers have been reliable and solid.

But lately with the advent of bonded ADSL lines and other forms of aggregated lines we have seen issues where the IAX2 trunk will go down and a simple reload of Asterisk or even a restart doesn’t fix it.

Taken from Voip-info

A report of the problem by another user :

This is something I’ve run into myself and my VOIP IAX2 provider has this issue with many clients running Asterisk on TrixBox or other custom made systems behing a NAT (Linux) router.

If our PPPoE goes down, we have to reboot our Asterisk server to get our IAX2 trunk to re-register otherwise, it will try and just keep timing out. I have the 4569 forwarded internal (Pierre Belanger adds: in many cases, the 4569 port forwarding useless unless your Asterisk server provides service to IAX2 phones from the Internet, i.e. not on your local LAN).

I have a dirty script that avoids having to reboot the TrixBox and restore our service within 2 minutes of a blip automatically, and logs the ‘blips’ so i can see how ‘reliable’ our service is.

We have take the original script posted and made some changes, Notably it checks a defined peer name as we have seen that the problem doesn’t always affect all peers on a system.

======Code follows ======

#!/bin/sh
#We record the status of the IAX2 Trunk
cd /root/ # I have script live in root,
# Set the peer name to monitor here
# ******
peername="YOURIAX2PEERNAME"
# ******
date >> slap.log
echo "Testing $peername peer" >> slap.log
/usr/sbin/asterisk -rx 'iax2 show peers' |grep -i $peername >> slap.log
/usr/sbin/asterisk -rx 'iax2 show peers' |grep -i $peername > reg_status
sleep 1
#We then Scan the Status and see if we're online or not...
TEST="OK"
if grep $TEST reg_status > /dev/null
then
echo "All OK Here" >> slap.log
exit #Abort, we are online, all is well...
fi
#IF we're this far down, we've lost IAX. Log the incident.
echo "we have a problem with $peername, Restarting it" >> slap.log
#Restart the IAX2 trunk. Delay required for some reason.
/usr/sbin/asterisk -rx 'module unload chan_iax2.so' >> slap.log
sleep 90;
/usr/sbin/asterisk -rx 'module load chan_iax2.so' > /dev/null
echo "Restarted it Now lets check status" >> slap.log
sleep 5;
/usr/sbin/asterisk -rx 'iax2 show peers' |grep -i $peername >> slap.log
#We record the status of the IAX2 Trunk
/usr/sbin/asterisk -rx 'iax2 show peers' |grep -i $peername > reg_status
sleep 1
#We then Scan the Status and see if we're online or not...
TEST="OK"
if grep $TEST reg_status > /dev/null
then
echo "All OK Here" >> slap.log
exit #Abort, we are online, all is well...
fi
#IF we're this far down, we've lost IAX. Log the incident.
echo "we have a problem with $peername, Restarting it" >> slap.log
#Restart the IAX2 trunk. Delay required for some reason.
/usr/sbin/asterisk -rx 'module unload chan_iax2.so' >> slap.log
sleep 120;
/usr/sbin/asterisk -rx 'module load chan_iax2.so' > /dev/null
echo "Restarted it Now lets check status" >> slap.log
sleep 5;
/usr/sbin/asterisk -rx 'iax2 show peers' |grep -i $peername >> slap.log
#We record the status of the IAX2 Trunk

======Code ends======

This seems to do the trick and its cronned to run every night or hour in some cases.

UPDATE

on testing and speaking to suppliers. We would advise adding the following settings to your IAX2 peers

 

qualifysmoothing=yes
qualifyfreqnotok=30000
qualifyfreqok=120000
qualify=yes

With this added we have not seen any unexpected unreachables.

 

Categories
Handsets Products

RTX8630 IP DECT Multicell solution

The RTX8630 is complete cordless telephony solution offering a great scalability. The system is expandable and can grow with the business; from 1 to 40 bases and up to 200 users. The RXT8630 offers seamless call handover and repeater support. There is a choice of two different RTX DECT handsets, both with a high quality colour screen and wideband audio.

System features

  • Up to 200 users (200 handsets registered)
  • Scalable from 1 to 40 bases, with seamless handover
  • Allows up to 10 x simultaneous calls per base station (Expandable up to 400 calls per system)
  • Power over Ethernet (PoE): IEEE 802.3af Class 2
  • Range: upto 50m indoor and 300m outdoor per base
  • Repeaters supported
  • Bases are wall mountable using optional mounting kit (RTX8630Mount)
  • Choice of two handsets: RTX8430 and RTX8630
RTX8630 IP DECT Multicell solution
RTX8630 IP DECT Multicell solution
  • RTX8430 Entry level handset
    • 1.44″ TFT display
    • Local phone book with 50 entries (1 number/name)
    • Headset connector (3.5mm)
    • Battery life: Up to 8 hours talk time and up to 75 hours standby
  • RTX8630
    • 2″ TFT display
    • Local phone book with 100 entries (200 central entries)
    • Vibrate mode
    • Headset connector (3.5mm)
    • Battery life: Up to 18 hours talk time and up to 200 hours standby

Pricing:

RTX8630 Base RRP: £189.00+VAT

RTX8430 Handset RRP: £99.00+VAT

RTX8630 Handset RRP: £140.00+VAT

Call for availability and project pricing

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
Cards

Digium Cards

digium_cards

Not only was Digium the first vendor of telephony interface cards built specifically for Asterisk, but it has always been the market leader, with over 50% of the world’s board business.

Analogue Cards

Digium analogue telephony cards are high-performance, highly reliable and cost-effective interfaces for POTS lines to your Asterisk solution. Multiple applications can be created to satisfy the business needs of any organization when using Digium analogue cards in concert with Asterisk software, the Linux® operating system and standard PC/server platforms.

Digital Cards

Digium’s super-reliable digital line cards connect Asterisk-based communication systems to T1, E1, J1 and ISDN-BRI interfaces.

Hybrid Cards

The Digium Hx8 Series are high-performance, cost-effective hybrid analogue and BRI telephony interface cards providing the capability to seamlessly integrate mixed-mode environments in a single device. Use the telephony card selector to identify the card that fits your requirements.

  • RoHS compliant
  • Manufactured in an ISO 9001:2001 certified facility in the United States
  • Maintain an MTBF greater than one (1) million hours
  • 5-year hardware warranty

 

For configuration and pricing please email or call us. We always want to speak to customers buying cards to make sure that it will be compatible with their server hardware.

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>