Categories
Blog Case Studies

An out of the normal Customer request

and how we solved it:

We were approached by one of our customers who provides support services to travellers and global companies who had a client that provides maritime engineering services world wide and required an emergency helpline that “followed the sun” 

Detailed Specification

A single number that called dependant on time the on call support staff.

The calls cannot go to users Voicemail.

The staff members are to be notified by email that the call was taken and who took it.

If the on call staff do not answer the call it is forwarded to our clients call centre.

On completion of the call a copy of the recording in mp3 format is emailed to the on call staff.

Solution.

Our customer uses FreePBX so the core of the project is the use of the Queue application but with some custom dial plan and scripts to exploit and enhance features that are not exposed, 

The inbound numbers destination is a “custom destination” that first sends it to some custom dial plan explained later and then to the “Call Flow Control” application to allow the system to be overridden, It is then sent to the “Time Conditions” application that uses UTC as its time zone to over come issues with daylight saving in different hemispheres, this then send the call to the correct queue depending on time 

To allow an email to be sent to staff we used the qgosub variable that is explained HERE , this sub routine sends the email on answer. this variable is set by a small dial plan snippet that sets the qgosub variable and an additional one to set a channel variable as the callers callerID number, as its lost when the call is made to the staff members by the queue application. 

To make sure calls do not go to voicemail, the queue option “call confirm” this forces the called staff to press 1 to accept a call, This much overlooked option is useful for many queue scenarios.

If the call is unanswered the call has to be passed to the callcenter with the callerID name tagged with the customers Name, We achieve this with the “SetCallerID” application passing the call onto the client call centre.

Finally when the call is complete we need to email the recording to the customer. To do this with the “Post Call Recording Script” option in Advanced options. (You may need to enable “Display Readonly Settings” and “Override Readonly Settings”), This did require a little lateral thinking as we were already using this script to convert recordings to MP3 and save them to AWSS3 storage, But we didn’t want an email sent after all recordings do we included an additional ‘if’ statement to check if the qgosub variable was passed over to the script and if it was email the attachment otherwise do nothing.

I hope this shows the flexibility of FreePBX and asterisk and how fairly complex call routings and requests can be fulfilled in a manner that doesn’t require complex dial plans or require high support overheads.

If you want to achieve similar don’t hesitate to get in touch as by using modules already in FreePBX you’re not paying to reinvent the wheel.

Categories
Knowledge Base

Connecting to Serial console ports with Macs

Many devices and servers still require connection to them with console cables. Sangoma IPPBX and SBCs for example.
I will cover here how to connect to then with a Mac as they do not have a serial port.

First you will need a USB serial console cable. These can be purchased cheaply from Amazon or ebay.
For example the “KUMEED FTDI RS232 USB to RJ45 Serial for Cisco Console Rollover Cable for Cisco Routers” costs £10.99 inc delivery and works with Windows and Macs

To connect to a console port you need a few bits of information, The port speed, in the case of Sangoma SBCs the is 115200. also you need the device address.

To get teh device address open a terminal window and type:

ls /dev/*usb*

you will be returned something like:

/dev/cu.usbserial-DN01YED6 /dev/tty.usbserial-DN01YED6

so now to connect to the console port you need to enter:

screen /dev/tty.usbserial-DN01YED6  115200

you should now be connected, and can interact as if on a ssh session.

to disconnect is not as simple as just closing the terminal window, as a screen session will still be running. to exit a screen session enter the following key combination.

ctrl a \ 

If you do close a terminal you can see if any sessions are active by opening a new terminal and entering:

screen -list

Something like below will be returned if a session is active.

There is a screen on:

5177.ttys000.Ians-MacBook-2 (Detached)

1 Socket in /var/folders/bl/7k0f_2695njbsqwx762kr_380000gn/T/.screen.

to reconnect type

screen -r

and you should reconnect.

then exit as normal with ctrl a \

Categories
Support

Zoiper Account and Server configuration

Enter details below to create Zoiper QR code that can be scanned from your smartphone
On entering you details you will be taken to a page with installation instructions.

Userrname

AuthName (Often same as username)

Password

Server hostname (host.domain.co.uk:5060)

 

You can download and purchase Zoiper Softphones from Here

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
System Status

DNS issues affecting calls and routing

On 21-10-2016 there had been a widespread DDOS attack initially in the USA. This has affected service of some of our key voice and DNS service suppliers.

We monitor many sites and run monitoring ourselves and receive status updates from suppliers.

Below are some of the recent ones and some sites reporting the issue

http://www.diario4v.com/tendencias/2016/10/21/ataque-hacker-afecta-twitter-amazon-spotify-reddit-11816.html (you will need to translate)

http://money.cnn.com/2016/10/21/technology/ddos-attack-popular-sites/

https://www.dynstatus.com/incidents/nlr4yrr162t8

Update
Dyn Managed DNS advanced service monitoring is currently experiencing issues. Customers may notice incorrect probe alerts on their advanced DNS services. Our engineers continue to monitor and investigate the issue.

Customers with questions or concerns are encouraged to reach out to our Technical Support Team.
Posted 4 minutes ago. Oct 21, 2016 - 18:23 UTC
Update
Our engineers continue to investigate and mitigate several attacks aimed against the Dyn Managed DNS infrastructure.
Posted 34 minutes ago. Oct 21, 2016 - 17:53 UTC
Update
This DDoS attack may also be impacting Dyn Managed DNS advanced services with possible delays in monitoring. Our Engineers are continuing to work on mitigating this issue.
Posted about 2 hours ago. Oct 21, 2016 - 16:48 UTC
Investigating
As of 15:52 UTC, we have begun monitoring and mitigating a DDoS attack against our Dyn Managed DNS infrastructure. Our Engineers are continuing to work on mitigating this issue.
Posted about 2 hours ago. Oct 21, 2016 - 16:06 UTC

Gradwell:

Our upstream supplier is investigating a DNS issue, which is believed to be causing the problem.

Magrethea

We are now able to confirm that two nodes on our network where impacted by DNS issues between 17:13 and 17:45 today. As many of you will be aware there have been some major DOS attacks today which impacted a number of key sites at this time so we are attributing this issue to that attack.

We will continue to monitor and apologise for the inconvenience this outage has caused our customers.

As can be seen this is out of our control and is affecting many users worldwide.

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

Converting recordings to MP3 in FreePBX and updating mysql CDR records

In FreePBX users can listen to wav file recordings via the “Call Recordings” tab, This uses a field in the mysql cdr table to say where that recording is and what its called, They are now stored in year/month/day directory structure under /var/spool/asterisk/monitor so if the end user wants the recordings in mp3 format as many do its not just a case of converting them its also a case of updating the database.

Luckily this is fairly straight forward, its just a case of doing a quick query and then converting the file and the updating the database. First you have to install lame, This can be done simply with yum then write a script.

In FreePBX advanced settings, you need to enable “Display” and “Override” readonly settings and then add

/usr/local/sbin/postrecord.sh ^{CDR(linkedid)} to “

The script I use is simple with a bit of basic logging.

#!/bin/bash
. postrecconfig.sh
date >> /var/log/asterisk/mp3.log
pcmwav=$(mysql -u$user -p$secret -s -N -D asteriskcdrdb<<<"select recordingfile from cdr where linkedid LIKE '$1' AND disposition = 'ANSWERED'  ORDER by calldate DESC LIMIT 1");
mp3="$(echo $pcmwav | sed s/".wav"/".mp3"/)"
nice lame -b 16 -m m -q 9-resample  "$path$pcmwav" "$path$mp3" >> /var/log/asterisk/mp3.log
touch -r "$path$pcmwav" "$path$mp3" >> /var/log/asterisk/mp3.log
mysql -u$user -p$secret -s -N -D asteriskcdrdb<<<"UPDATE cdr SET recordingfile='$mp3'  WHERE recordingfile = '$pcmwav'" >> /var/log/asterisk/mp3.log
echo $pcmwav >> /var/log/asterisk/mp3.log
echo "--------||-------" >> /var/log/asterisk/mp3.log
date >> /var/log/asterisk/mp3.log
echo "Done" >> /var/log/asterisk/mp3.log
echo "--------||-------" >> /var/log/asterisk/mp3.log
exit 1

The postrecconfig.sh file looks like

user=freepbxuser
secret=secret
receptemail=info@youremailaddress.com
file_age=35
dy=$(date '+%Y')
dm=$(date '+%m')
dd=$(date '+%d')
path=/var/spool/asterisk/monitor/$dy/$dm/$dd/



As can be seen it steps through entry by entry converting and updating the DB, This example is cron'd to run hourly but does not delete the original wav file, this would be done in a separate script run weekly to remove old files. The reason to keep them is so that a backup of the original is held for a period in case of errors.

Hope this is of help to you and your users