Categories
Blog Design FreePBX Knowledge Base

Voice recognition and Asterisk.

This is primarily about Googles new Cloud Speech API and Asterisk recordings.

Having worked on many Voice rec systems including Mitels attendant system, Oranges Wildfire virtual assistance and Lumenvox’s add on for Digium’s Asterisk system one thing none could do was transcribe speech such as voicemails and this is what people want. There was a startup in the UK called Spinvox  but as anyone knows this wasn’t all it seems and when I questioned them while working on a project they clammed up and withdrew our testing account and the rest is history as they say.

So now we are many years on and Google have their second API for this service. The first API was a little flaky to say the least and came up with some amusing translations. The cloud version is much better and does a good job with most voice and also can be localised.

So what have we done. Well we have mixed together some existing code we use and created a “mini voicemail” that records your message converts it to text saves it as a voicemail and emails the resultant Text and recording to you.  In the process we did find a few “gotchas” with the API for example a pause of more than a couple of seconds will result in the translation stopping there, also a big one is that the translation takes as long as the recording is, and the API has a 60 second limit. Both of these can be overcome by limiting the record time in Asterisk to 60 seconds and using sox to remove silence of more than a second.

exten => s,n,Record(catline/${UNIQUEID}.wav,3,60,kaq)
/usr/bin/sox /var/lib/asterisk/sounds/catline/${origdir}.wav ${PATH}${origmailbox}/INBOX/${FILENAME}.flac  lowpass -2 2500 silence -l 1 0.1 1% -1 0.8 1% 

As you can see from these snippits of code above we have used variables where possible to that it can be incorporated easily with existing asterisk systems using GUIs such as Freepbx, We use the voicemail greetings that the user recorded and also use the email address thats linked with their mailbox for simplicity of management.

Now having Voicemails as text is nice but where it comes into its own is with structured mailboxes or simply put questionnaires where the caller is asked a number of predefined questions and these are recorded as one single voicemail. We already do this for some customers but they still have to have some one transcribe teh voicemail to text to input it. The quality of the Google translation means that soon they will be able to just copy the text over. Other applications are only limited by your imagination, Such as automated voice menus for Takeaways or Taxi firms.

To be Continued…HERE

Categories
Blog Knowledge Base

Do you hate having to use Module admin to update Freepbx

One of my pet hates is having to use module admin to update the Freepbx modules via the GUI. Its not a big deal but as we use SSH to connect to servers and then tunnels to connect to the GUI. Which is all fine unless you have multiple SSH sessions open and things get complicated..

So I have written a small “dirty” Bash script to prompt you through the fwconsole method of updating all or just one module of your choice.

#!/bin/bash
echo ssh freepbx update tool. 2016 cyber-cottage.eu
echo "Welcome"
echo "We will check for upgrades"

read -p "Do You want to check upgrade status of freepbx modules? (y/n) " RESP
if [ "$RESP" = "y" ]; then
  echo "Glad to hear it"
 fwconsole ma showupgrades
else
  exit
fi

echo "We will now apply all upgrades"

read -p "Do You want to upgrade all freepbx modules? (y/n) " RESP
if [ "$RESP" = "y" ]; then
  echo "Glad to hear it"
 fwconsole ma upgradeall
else
 echo "OK We will just upgrade the module you choose"
  read -p "Please enter the name of the module you want to upgrade " MODU
  echo "We Will Now Upgrade $MODU"
  fwconsole ma upgrade $MODU 
fi

read -p "Do You want to update permissions? (y/n) " RESP
if [ "$RESP" = "y" ]; then
 echo "Glad to hear it"
fwconsole chown
else
echo "Dont forget to apply changes on GUI then"
fi

read -p "Do You want to apply the changes? (y/n) " RESP
if [ "$RESP" = "y" ]; then
  echo "Glad to hear it"
 fwconsole reload
else
  echo "Dont forget to apply changes on GUI then"
  exit
fi

As I said it was quick and “dirty” but it does work and can save a bit of time.

Categories
Knowledge Base

Resetting the Polycom Soundpoints admin password to default

If the default Polycom password of 456 does not work, or if someone has changed the admin password on the phone, please do the following:

  1. Find and write down the MAC address (serial number) of the phone you want to reset. It should be twelve characters, and look something like ‘0004F2ABCDEF’.  If you can’t read the back label, you can find the MAC address by pressing Menu, Status, Network, Ethernet.
  2. Power down the phone.
  3. Power up the phone.
  4. While powering up the phone (you have about 6-8 seconds to complete this step):
    • For SoundPoint IP 320, 321, 330. 331, 335, 430, and 450 press and hold the 1, 3, 5, and 7 on the dial pad at the same time.
    • For SoundPoint IP 301, 501, 550, 600, 601, and 650 press and hold the 4, 6, 8, * on the dial pad at the same time.
  5. After holding down the numbers for few second, you will be prompted to enter the admin password.  Enter the MAC address of the phone. No colons and the alpha characters must be entered as lowercase letters
  6. The Set will restart. You may need to restart again to get access to the menus with 456 password.

 

Categories
Knowledge Base Sangoma

Building FreePBX CallCenters

Leo D’Alessandro, Product Marketing Manager at Sangoma, and Frederic Dickey, VP of Product Management at Sangoma, will in this webinar explain how to build an efficient contact center cost-effectively with Sangoma’s FreePBX / PBXact UC.

In this webinar, you’ll learn how the many ways FreePBX / PBXact UC can solve your contact center requirements:

• How calls are best routed using call queues
• Maximizing Agent Productivity and Customer Satisfaction with automated Queue Callbacks
• Integration with desktop and CRM
• Monitoring live call metrics
• Reporting tools to analyze overall performance

WEBINAR: Building Your Contact Center with FreePBX / PBXact UC from Sangoma on Vimeo.

Categories
Knowledge Base Technical

Changing the root or any other mysql password

MySQL stores username and passwords in the user table inside MySQL database. You can directly update or change the password using the following method:

Login to your server, type the following command at prompt:

$ mysql -u root -p

Use the mysql database;

mysql> use mysql;

Change password for user root, enter:

mysql> update user set password=PASSWORD("NEW-PASSWORD") where User='root';

Finally, you need to reload the privileges:

mysql> flush privileges;


mysql> quit
Categories
Asterisk Support Knowledge Base Security

Catching the IP of anonymous callers on Asterisk servers

Hi just sharing a simple bit of dialplan to catch anon callers ip addresses when using freepbx and Anonymous callers is set to yes, which is needed for some suppliers.

Normally I would say lock your firewall to only known IPs, but in some cases this isn’t possible

Im sure if you have a Asterisk server with a public IP you will have seen calls on the console screen where the call is to a destination but the callers are exten@yourserver . Well this little bit of dialplan at the end of you default sip context should catch them and log them with the ip of the originating server

In extensions_custom.conf add the dialplan below

[catchall]
exten => s,1,Noop(Dead calls rising)
exten => s,n,Set(uri=${SIPCHANINFO(uri)})
exten => s,n,Verbose(3,Unknown call from ${uri} to ${EXTEN})
exten => s,n,System(echo "[${STRFTIME(${EPOCH},,%b %d %H:%M:%S)}] SECURITY[] Unknown Call from ${CALLERIDNUM} to ${FROM_DID} IPdetails ${uri}" >> /var/log/asterisk/sipsec.log)
exten => s,n,Hangup()

Then in Custom Destinations add a destination as  catchall,s,1

so you now get in your logs

[May 1 00:11:06] SECURITY[] Unknown Call from  to 900441516014742 IPdetails sip:101@37.75.209.113:21896

 I hope this is some help to you, It allows other scripts to pick up this address and add it to your firewall.
Categories
Blog Knowledge Base System Status

Telehouse outage 21st July 2016

Again today at 8am we started to see alarms coming in from customer sites. The effect seemed more widespread today with Zen inially posting they had issues and some ITSPs posting that they also had issues.

The outage appeared to have started at around ‘7am'(we saw first alarm at 8am , with at least one network at Telehouse North falling over due to a reported loss of power. The situation had mostly been resolved by around 11am, though are still seeing some flapping of services.

Like Wednesday’s outage, it appears that BT has a significant amount of networking equipment at Telehouse North. The has affected an unknown number of BT and Plusnet broadband subscribers, plus other smaller ISPs and services such as Zen Internet that make significant use of BT’s backhaul network.

We can confirm though we have slowly seen all customer alarms clearing. As many customers are aware that we operate a 24×7 monitoring platform so saw this issue start and checked that there was nothing we could do in most cases but also contacted key customers to warn them that they might be issues.
Therefore, any issues that Customers have experienced this morning when connecting to services using BT connectivity (including quality issues) should now be resolved. In the event that issues are still occurring, please reboot equipment on the BT line such as Firewalls or Routers and retest. Nagios monitor screen

If you have any questions whatsoever please do not hesitate to contact us, Also if you are a
Asterisk / Freepbx reseller or user and would like affordable monitoring please get in touch as we provide Asterisk Monitoring from £25 per year.

 

UPDATE ON 20th July issue

Tt looks like a power failure at Telecity Harbour Exchange, where BT and some other ISPs join the LINX peer exchange, is at least partially to blame for the major outage on Wednesday morning.

Service disruption as a result of the Telecity outage lasted for about an hour, from just before 8am until 9:15am, when full connectivity was restored.

LINX said in a statement:

This morning between 07:55 BS and 08:17 BST, one of the datacentres that houses equipment for The London Internet Exchange (LINX) experienced a partial power outage. This affected only one of a number of Internet peering nodes that LINX operates at the facility, and service was fully restored on the LINX network at 09:15 BST.

Several reports claim that this outage affected British Telecom and their services at LINX. While several networks connected to LINX were indeed affected, BT was not one of them. LINX provide two fully redundant platforms to offer better resilience to the UK’s Internet infrastructure, the second platform was not affected by this power outage.

 

 

Categories
Blog Knowledge Base

BT outage on 20th July 2016

BT have confirmed that their recent outage has been ‘resolved and services restored’.

We can also confirm this as we have slowly seen all customer alarms clearing. As many customers are aware that we operate a 24×7 monitoring platform so saw this issue start and checked that there was nothing we could do in most cases but also contacted key customers to warn them that they might be issues.
Therefore, any issues that Customers have experienced this morning when connecting to services using BT connectivity (including quality issues) should now be resolved. In the event that issues are still occurring, please reboot equipment on the BT line such as Firewalls or Routers and retest. Nagios monitor screen

If you have any questions whatsoever please do not hesitate to contact us, Also if you are a
Asterisk / Freepbx reseller or user and would like affordable monitoring please get in touch as we provide Asterisk Monitoring from £25 per year.

Categories
Knowledge Base Technical

Fortigate issues such as one way audio on Call Pickup With Hosted Asterisk and other problems.

We have noted that with some Fortigate routers and firewalls come with SIP helpers enabled by default.

The customer may initially not think that there is any issue and inbound and outbound calls work as expected, But we had noted on one customer site that when they did a call pickup on another phone that was ringing in the office they would not be able to hear the caller. The caller could hear them and if they put the call on and off hold they could speak normally.

On further  investigation with wireshark we noted that the RTP port changed when the pickup took place. We tested this on other sites not using the Fortigate hardware and did not have this issue.

Below are listed the commands to clear the SIP helper settings from the Fortigate hardware.

  1. Open the Fortigate CLI from the dashboard.
  2. Enter the following commands in FortiGate’s CLI:
    • config system settings
    • set sip-helper disable
    • set sip-nat-trace disable
    • reboot the device
  3. Reopen CLI and enter the following commands – do not enter the text after //:
    • config system session-helper
    • show    //locate the SIP entry, usually 12, but can vary.
    • delete 12     //or the number that you identified from the previous command.
  4. Disable RTP processing as follows:
    • config voip profile
    • edit default
    • config sip
    • set rtp disable
  5. And finally:
    • config system settings
    • set default-voip-alg-mode kernel-helper based
    • End

on a fortigate 200D the following is the method to use

Step 1) Removing the session helper.

Run the following commands:

config system session-helper
  show

Amongst the displayed settings will be one similar to the following example:

    edit 13
        set name sip
        set protocol 17
        set port 5060

In this example the next commands would be:

delete 13
end
Step 2) Change the default –voip –alg-mode.

Run the following commands:

config system settings
set default-voip-alg-mode kernel-helper based
end
Step 3) Either clear sessions or reboot to make sure changes take effect

a) To clear sessions

The command to clear sessions applies to ALL sessions unless a filter is applied, and therefore will interrupt traffic.

diagnose system session clear

Taken from

http://kb.fortinet.com/kb/documentLink.do?externalID=FD36405

Categories
Blog Knowledge Base

Planning for a Successful VoIP deployment

Before you deploy voice-over-IP or a Hosted PBX service in your office there are a few considerations you must first address.  Switching from traditional telephone service to voice-over-IP (VoIP) requires sufficient bandwidth, a proper switch and router, and a good battery backup solution to protect you from power failures.

The key voice-over-IP requirements discussed in this article are:

Bandwidth – Determining how much bandwidth you will need for voice-over-IP in your office is your first step.

The Router – Choosing a low quality or under performing router is a costly mistake which will degrade your call quality.

Quality of Service – You must decide whether voice traffic will be separated from regular internet users or if it will share the same network.

VoIP Equipment – There are many digital office phones, soft phones, headsets and telephone adapters on the market to choose from.

Power Failures – Voice over IP does not work when the power goes out so you should install a battery backup system and possibly a Power-over-Ethernet switch if your budget permits it.

How much bandwidth do I need?
Voice over IP needs a certain amount of bandwidth in order to keep your conversations clear and free of disruptions.  Bandwidth is the amount of information which your internet connection can send and receive in a certain period of time.  Your first step should be to use an online speed test to find out what your maximum upload stream and download stream is.  We suggest you do this test using a fixed connection to the internet rather than using your wifi (wireless) connection to get accurate results.  Try to use numerous tests during different times of the day to get a good average of what you can expect from your internet connection.  Bandwidth is normally measured in kbps or kilobits per second.
You will need to have a high speed (broadband) connection to use voice-over-IP.  A typical DSL connection will be rated at 600 kbps for the upload stream and 5000 kbps on the download stream.  You will notice that your upload stream is almost always smaller than your download stream which becomes your limiting factor for using VoIP service.
Your next step is to determine how many people in your office are likely going to be using the phone at the same time.  For instance, having ten people on the phone will require ten times as much bandwidth as having one person on the phone.  Below is a chart which will help you calculate how many people can be on the phone at one time:
Ask your voice-over-IP service provider what audio codecs they offer as there is a trade off between audio quality and bandwidth usage…

Full Quality Audio (G711 Codec)\- Uses 87 kbps for each concurrent phone call (NEB)
Compressed Audio (G729 Codec)\- Uses 33 kbps for each concurrent phone call (NEB)

So the calculation for a typical DSL connection would be:

DSL connection:600 kbps upload / 5000 kbps download
Gives us (Full Quality):600 kbps / 87 kbps = 6 concurrent calls
Gives us (Compressed Quality):600 kbps / 33 kbps = 18 concurrent calls

Notice we used the upload bandwidth in our calculation as this is the limiting factor for voice-over-IP.  You also don’t want to push your connection to the limit as most cable and DSL connections do not have guarantees in terms of how much bandwidth they will deliver.  If you Internet connection drops in bandwidth at some point during the day you don’t want your call quality to be affected.  Other factors affecting voice-over-IP are the latency of your connection and how much packet loss there is on it.

Choosing a router
A router is the device that connects all your computers and network equipment to your Internet connection.  It is an often overlooked piece of the puzzle that can have a major impact on the success or failure of your voice-over-IP implementation.  There are many routers on the market, some are very cheap (less than $40) and others can cost you thousands of dollars.  There is nothing worse than putting a poor quality or underpowered router in your office which could cause an otherwise good VoIP installation to go bad.
Your router needs to be powerful enough to handle the number of phones you will have in your office and should also work flawlessly with voice-over-IP equipment.  A good place to start when deciding on your router is to speak with your voice-over-IP service provider. We also recommend checking to make sure that your router is compatible with voice-over-IP services.
The following is a list items which will help you to determine whether your router is right for voice-over-IP:
How many voice-over-IP phones will you be connecting to the router? The more phones you will be connecting, the more powerful the router needs to be. Don’t use a £40 router to run an office with 10 IP Telephones.
Will your voice-over-IP phones have their own dedicated Internet connection? If not, a router with a quality of service (QoS) setting to prioritize voice traffic over regular traffic is an absolute must. Without QoS you will encounter poor quality telephone calls regularly.
What other functions will the router need to perform? You might need your router to handle VPN connections, allow wifi (wireless) connections or perform other tasks.
Make sure you can bridge your router to your modem. Routers that are not bridged can cause problems with voice-over-IP installations.
Never use more than one router or nat gateway on the network at a time as this will cause problems for IP Telephones when they attempt to do NAT.
Make sure your router is compatible.
It is always best to get a recommendation from your voice-over-IP service provider as some routers are known to perform very poorly with VoIP phones.

Quality of service
Call quality is a function of your network and the public internet. Some delays and network congestion cannot be avoided due to information traveling over the public internet while other types can be avoided. Good network design is critical to a stable and reliable voice-over-IP implementation.
Quality of service (QoS) refers to the ability for your router to prioritize voice traffic (VoIP) differently than regular internet traffic on your network or the separation of voice traffic.  Voice over ip is a real-time protocol which means that if information is lost or delayed it will result in a noticeable drop in call quality or a complete loss of it. Symptoms of network congestion include garbled audio, dropped calls and echo.   When setting up voice-over-IP in your office there are three possible ways handle voice traffic. Some customers report perfectly good results without any quality of service (especially in a small 1-2 person office) and others report worse results with quality of service enabled on their router as some routers do a poor job of implementing this. Generally speaking however the best way to deliver reliable voice-over-IP service is through a dedicated internet connection that is only used by the voice-over-IP equipment rather than sharing the internet with computers. Below are the different methods of doing quality of service:

No QoS – Voice traffic and regular internet traffic in your office are sharing the same internet connection.  No prioritization of voice traffic over regular traffic is being performed and thus there is the high potential that voice quality could be degraded if there is insufficient bandwidth for both voice and regular traffic. Some customers experience very few problems using this method while others report a high frequency of poor quality calls, dropped calls and garbled voices. It all depends on how much network congestion your office has. Most internet connections are more likely to be upload bound which generally results in people not being able to hear you, because all of your upload bandwidth is being consumed by something on your network.

Router enabled QoS – Voice traffic and regular internet traffic in your office are sharing the same internet connection, but your router is able to distinguish between voice traffic and regular internet traffic and give the voice traffic a higher priority.  The problem with this method is that routers can only prioritize upload bandwidth which means your voice will be clear but the router cannot ensure that download bandwidth will be prioritized. If employees on your network are downloading often this will cause a noticeable drop in call quality but this method is better than no quality of service. Some internet providers can prioritize the download bandwidth using TOS or COS methods from their end which will create an end to end quality of service solution. Most customers find that even prioritising upload bandwidth for voice-over-IP offers a dramatic improvement in call quality because most internet connections are limited by their upload bandwidth and have lots of download bandwidth free.

Separated Traffic – Voice traffic and regular internet traffic are separated onto two different internet connections and networks. This is especially critical for larger offices with 5 or more employees.  Voice traffic is carried on one internet connection and data from computers is carried on the other connection. In this case no prioritization is required by your router because voice traffic has its own dedicated internet connection.  This is the best way to ensure clear voice communications and the method we generally recommend customers whenever possible.

The method you decide on largely depends on how much bandwidth you have, what you are using your internet connection for besides voice-over-IP and the level of call quality desired.  Many offices report perfectly good results without using any QoS, while others find that it makes a major difference in the quality of their calls.

Choosing VoIP phones and equipment
Before deploying voice-over-IP in your office you will need to decide how each employee will be connected to your voice-over-IP provider.  There are many choices on the market today.
Digital IP Telephones – These types of phones look just like regular multi-line business telephones except that they connect directly to your internet connection using a network cable.
Soft Phones – A soft phone is a software program running on your computer that looks and feels just like a real telephone.  This requires you to purchase a USB headset which connects to your desktop or laptop so you can make and receive calls.
Wifi Phones – A wifi phone looks and feels very much like a regular cell phone except that it connects to your wireless router in the office.
Analog Telephone Adapters (ATA) – An ATA is a small box which connects to your router and allows you to plug in regular analog telephones so they can work with voice-over-IP.  ATAs are generally low cost alternatives to digital office phones and are easy to take with you when you travel.
Battery backup and Power-over-Ethernet
With voice-over-IP and most office telephone systems you must consider what happens when the power goes out.  For some offices this can be a regular occurrence and for others it might happen with a very low frequency.  Once of the things you will need to decide is whether or not you will install a battery backup system.
Here are a few important terms your should know:
Power over Ethernet (PoE) – Is a technology that allows VoIP over ip telephones to be powered using regular network cables rather than power adapters which plug into the wall.  This has the advantage that you can power all the phones in your office from a single source and makes installing a battery backup unit much easier.
Uninterruptible Power Supply (UPS) – Is a device that powers your equipment when you lose power at the office.  The system has a built in battery which keeps your network devices operational when the power goes out.
The easiest way to protect your phone system from a power outage is to power all the phones using a Power-over-Ethernet switch that would normally be connected in the back room where your router and cable/DSL modem is located.  This has the advantage that all your phones are drawing power from a single source which you can backup using an uninterruptible power supply (UPS).  All you need to do is plug in your PoE switch, router, and DSL/cable modem into a sufficiently powerful UPS device so that when the power goes out all your phones remain up and running.