Categories
IPPBXs Software

FreePBX

With over 1 MILLION production systems worldwide and 20,000 new systems installed monthly, the FreePBX community continues to out-perform the industry’s commercial efforts. The FreePBX EcoSystem has developed over the past decade to be the most widely deployed open source PBX platform in use across the world. The openness of the project allows users, resellers, enthusiasts and Partners to utilize the FreePBX EcoSystem to build robust communications solutions that are powerful but at the same time easy to implement and support. Sangoma is proud to be the sponsor of FreePBX project. If you are new to FreePBX you can get started quickly by downloading and installing the FreePBX Distro. The FreePBX Distro is an all in one platform that installs everything you need to build a phone system. Once You have a basic PBX in place you can add commercial modules to add advanced features to an already feature rich base install of FreePBX.

 

As an open source GPL, web-based PBX solution, FreePBX is easy to customize and adapt to your changing needs. FreePBX can run in the cloud or on-site, and is currently being used to manage communications of all sizes and types of environments from small one person SOHO (Small Home, Small Office) businesses, to multi-location corporations and call centers. The FreePBX ecosystem provides you with the freedom and flexibility to custom design business communications around your needs.

FreePBX Commercial Modules are add-ons that enhance the already feature rich base install of FreePBX! These modules are not Open Source GPL and are only designed to work with CentOS or RHEL systems. The FreePBX Distro is already preconfigured to work with these modules. For custom installations please see: Install Commercial Modules on CentOS and RHEL based systems

The FreePBX appliance is a purpose-built, high-performance PBX solution. Designed and rigorously tested for optimal performance, this is the only officially supported hardware solution for FreePBX. The appliance comes preloaded with the FreePBX Distro and includes a one-year warranty!

Featuring the FreePBX Distro, this appliance is an ideal fit for businesses looking to get more from a PBX. With millions of deployments throughout the world, FreePBX is relied upon daily by everyone from enterprises to startups. Leveraging the powappliances-headerer of FreePBX has enabled businesses to grow while keeping communication expenses minimal. The FreePBX Distro has made deploying, configuring and using a PBX system easier than ever! With an easy-to-use GUI (Graphical User Interface), getting started is a breeze!

Sangoma IP Phones Designed Exclusively for FreePBX are Designed to work with FreePBX, Sangoma IP phones are so smart you can quickly and easily use them right out of the box. Each phone in the series features industry standard Power over Ethernet, so no power cable or outlets required. They have full duplex speakerphones, dual Ethernet Ports, multi-way conference calling, high definition voice quality, and they’re Virtual Private Network (VPN) capable.

Full Integration with FreePBX, FreePBX phone apps are available right on the phone, straight out of the box with no requirement for additional licenses. Users can control complicated features directly from their phones. There’s no need to remember feature codes. User applications include: Call Parking, Follow Me, Do Not Disturb, Conference Rooms, Call Forwarding, Time Conditions, Presence, Queues, Transfer to Voice Mail, Visual Voice Mail, and Log in/out.

Why is Sangoma Zero Touch Better? VoIP telephones can be complex to install, and manually configuring many different parameters and hundreds of extensions can take hours. When you buy and install your Sangoma IP phones, the redirection server automatically points the phone to the Sangoma FreePBX for configuration. Other vendors have redirection servers, but they have to be programmed with the details of the IP PBX. Only Sangoma can provide Zero Touch provisioning with FreePBX.

EndPoint Manager Included When using a Sangoma phone, EndPoint Manager software inside FreePBX is automatically enabled. This lets your users control global settings, program their phone keys, map extensions, upload images, download new firmware, and much more.

 

 

Categories
FreePBX Knowledge Base

Post call emailing of Call Recordings in Freepbx

In freepbx there is a feature that is quite well hidden but actually does a very useful job.

In The “Advanced Settings” page if you enable both “Post Call Recording Script” As the name suggests this is a script that run after a recorded call has ended. We created a script called postrecord.sh and in the text field on the menu we have put as below. This emails both inbound and outbound calls.

For calls to and from an extension we can pull the email address from the voicemail.conf and send the email to that address.

Its also set to delete the wav file away after a defined number of days.

/usr/local/sbin/postrecord.sh ^{TIMESTR} ^{FROMEXTEN} ^{CALLFILENAME} ^{UNIQUEID} ^{ARG3}

The Script below will first convert the recording then email it to you or your customer.

A couple of prerequisites are required, these are sox and lame. sox is probably already installed, lame maybe not.

Installing Lame is simple for centos as below.

wget http://sourceforge.net/projects/lame/files/lame/3.99/lame-3.99.5.tar.gz tar -zxvf lame-3.99.5.tar.gz
cd lame-3.99.5
./configure
make
make install

The script is fairly simple as below. the main variables are passed to it but we build the directory structure on the fly and file extension is fixed as wav. you can set the file_age variable to delete the wav file messages over that many days old.

  • Be careful if cutting and pasting this scripty as wordpress may have wrapped some lines
#!/bin/bash
#This script emails the recorded call right after the call is hung up. Below are    the variables passed through asterisk
# $1 - Time String
# $2 - Source
# $3 - File
# $4 - unique id
# $5 - Destination
# $dt - Date and Time
/bin/nice /bin/sleep 3
dy=$(date '+%Y')
dm=$(date '+%m')
dd=$(date '+%d')
file_age=35

dtpath=/var/spool/asterisk/monitor/$dy/$dm/$dd/
/bin/nice /usr/local/bin/lame -b 16 -m m -q 9-resample $dtpath$3.wav  $dtpath$3.mp3
/bin/nice /bin/chown  asterisk:asterisk $dtpath$3.mp3
dt=$(date '+%m/%d/%Y %r');
id=$(mysql -uUser -pPassword -s -N -e "SELECT descr from asterisk.queues_config where extension = $5");

email=recordings@yourdomain.com

file=$dtpath$3

if [ "$id" = "" ]; then
     direction=callers 
            id=$(mysql -uUser -pPassword -s -N -e "SELECT name from asterisk.users where extension = $2");

  IN=$(/bin/grep "$2 =>" /etc/asterisk/voicemail.conf)
              echo $IN
               set -- "$IN"
               IFS=","; declare -a Array=($*)
               email=${Array[2]}

            else

            direction=customers    
            fi

echo -e "You have a new call recording to listen to\n\n
 The call date and time was: $dat \n\n 
 The call was from: $2 \n\n The call was to: $5 \n\n
 The $direction name was: $id \n\n
 And the unique call id was: $4 \n\n
 Please see the attached file \n\n" | mail -a $file.mp3 -s "New Recording at $dt" $email 

/bin/nice /usr/bin/find /var/spool/asterisk/monitor/  -type f -mtime +"$file_age" |grep wav | \
while read I; do
              /bin/rm  "$I"
done
Categories
Asterisk Support Elastix Support Knowledge Base Support Technical

One way audio with Yealink T23 and Gamma Sip trunks on Freepbx

We recently had a very puzzling issue with a customer who we supplied some T23 Yealink handsets. When making outgoing calls over Gamma sip trunks on their Elastix server we were getting one way audio, This was not an issue with their existing Snom handsets or a problem for internal or incoming calls over the same trunks. It also wasn’t an issue when using iax2 trunks.

It seems that there is some interoperability issue when using sip trunks and these handsets. and seems to be a little known issue as only affects a few operators.

It seems to addressed in 44.80.0.20 version software that isn’t on the Yealink UK site yet but is available here and should be loaded on all T23 handsets as they are being delivered as 44.80.0.5 firmware at the moment.

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

Categories
Asterisk Support Elastix Support Knowledge Base Support

Multiple Dynamic features with Asterisk Applicationmaps

Dynamic features are very useful for allowing users access to custom features during calls. These can be loaded individually via the dialplan, but in freepbx based solutions this will mean a bit of hacking of the dialplan using overides and making sure all still works afterwards, or as a global varible.

The easiest way is to load them as a global as is done with apprecord, But if you want to add lots of features then you will have to use a Application Map group. This is done by editing the features_applicationmap_custom.conf  file so it looks like below for example, at the top are your application maps then your group

testfeature => #9,callee,Playback,tt-monkeys 
calleehangup => #8,callee,Hangup()
callerhangup => #7,caller,Hangup()
[mymapgroup]
testfeature => #9
calleehangup => #8
callerhangup => #7
apprecord => *1

DO NOT FORGET to add the apprecord to your group.

You then need to edit the globals_custom.conf file and add a line like below

DYNAMIC_FEATURES => mymapgroup

Then reload asterisk and issue the command “features show”

Dynamic Feature           Default Current
---------------           ------- -------
callerhangup              no def  #7     
calleehangup              no def  #8     
testfeature               no def  #9     
apprecord                 no def  *1     
Feature Groups:
---------------
===> Group: mymapgroup
===> --> apprecord (*1,caller,Macro,one-touch-record)
===> --> callerhangup (#7)
===> --> calleehangup (#8)

and to check that they are loaded as a global variable do “dialplan show globals” and near or at the top you will see:-

 DYNAMIC_FEATURES=mymapgroup

And thats all there is to it.

Categories
Calls and Lines Connectivity

SIP2SIM Mobile extensions

The SIP2SIM service is a very simple concept which provides you with control of your mobile communications. It is ideal for an office of any size and even for more technical home users.

The service consists of a SIM card, which you put in a mobile phone and it makes that phone appear as if it is a SIP extension (e.g. SIP phone) on a phone system of your choice.

meerkat

Not a SIP application

It is important to realise that we are not talking about a SIP application on a smart phone which then uses mobile data or WiFi. With this service your mobile phone is working as a mobile phone on the GSM mobile network making and receiving proper mobile voice calls. The SIP part is what we do in the back end to pass the calls to and from your SIP server.

An extension on your office phone system

The basic service allows you to specify, on our control pages, the server name, login and password for a SIP server. This could be your office phone system whether an asterisk box, or a FireBrick or whatever. As long as it handles normal UDP SIP with G.711 a-law audio then we will register as a phone and allow calls both ways.

This means your phone can simply be an office extension, like any other.

  • Call office extensions using short extension numbers from your mobile phone.
  • Office policies on callable numbers, such as premium rate, enforced like any other extension.
  • Office voicemail system working, just like any other extension.
  • Office call logging, just like any other extension.
  • Office call recording, just like any other extension.
  • Use in hunt groups, just like any other extension.
  • Even use features like call steal to transfer calls if you want, or in-band DTMF to control call transfer and related features.

Manage costs

The costs are very simple for using the SIM in the UK on O2. Higher costs apply for roaming SIMs, even roaming to other UK networks.

  • £5+VAT to purchase the SIM card.
  • £2+VAT pcm once activated (activates on first use).
  • 2p+VAT per minute for calls either way.
  • 2p+VAT per text either way.
  • 2p+VAT per MB for data usage either way.
  • No minimum term – just monthly rolling contract.

Calls are charged per second, and data per kilobyte. Charges apply to the SIP2SIM service separately from any charges you may have for text or voice calls using your VoIP/SMS provider.

In some cases a SIM will be set up with a free trial which allows some usage without assigning to an account or setting up an account. For these trial SIMs, once assigned to an account an activation fee of 1p+VAT is charged and usage charges commence as normal.

OFCOM call charges

The SIP2SIM service is not a service that allows calls to telephone numbers in the national dialling plan. It allows calls to be passed to a VoIP/SIP gateway of your choice. Any ability to make calls to normal telephone numbers is provided by that VoIP provider (which may be our VoIP service). As such, special rules on costs of 01, 02, 03 numbers, rules on 0800 numbers being free, and rules on charges for other special and premium rate numbers do not apply to the SIP2SIM part of the service. The cost or the SIP2SIM service applies regardless of the number you dial.

Telephone numbers

Just like a SIP handset, the service does not come with any sort of telephone number.

You can, if you wish, have the phone register on a VoIP provider’s service. This would mean you get calls to a number operated by the VoIP provider, and can make calls from that number, just like any other SIP phone. If registered with your own telephone system, it would have internal extension numbering, and even direct dial in numbering as you have chosen to configure on your phone system.

There is no question of porting numbers to or from the service, it has no numbers.

We can, of course, provide telephone numbers as part of our VoIP service if you wish, and we can even pre-configure these to connect with your SIM as part of the order process.

International roaming

The SIMs are available with world wide roaming. Costs are higher when roaming, obviously. The following are charges for use within EU. See full roaming price list for more details.

  • £5+VAT to purchase the SIM card.
  • £2+VAT pcm once activated (activates on first use).
  • 10p+VAT per minute for calls either way.
  • 5p+VAT per text either way.
  • 10p+VAT per MB for data usage either way.
  • No minimum term – just monthly rolling contract.

In the UK and rest of EU, calls are charged per second, and data per kilobyte. Charges apply to the SIP2SIM service separately from any charges you may have for text or voice calls using your VoIP/SMS provider.

UK roaming for the best coverage of the UK

The SIMs can even roam in the UK. This means the SIM can change its identity automatically – being an O2 SIM when O2 is available (at the lowest costs), but switching to a foreign identity (Dutch Vodafone) to roam on to other UK networks. Whist costs are then higher this means you stay in touch even when there is no O2 signal.

When the SIM is using the O2 profile and on O2 in the UK, the UK prices apply. When using the EU profile on any UK network (including O2) or elsewhere in the EU, the EU roaming prices (as above) apply. If on EU profile on O2, it will normally switch back to O2 profile automatically within a few minutes. Currently the SIM will not roam to Three in the UK.

Text

Texts are operated separately. Our text interface using HTTP can send texts to the phone, and texts from the phone can be posted to an HTTP gateway of your choice. If you have an A&A VoIP telephone number then texts can be associated with that number directly (not all of our numbers ranges can handle inbound texts).

Mobile Data

Data currently allows simple NAT, unfiltered, Internet access. We hope to offer data via A&A in the future.

Third Party SIP services

The service involves entering SIP registration details in to our control pages. Where these are the details of your own SIP server such as an office phone system, you can make the decision as to whether or not you trust us with those SIP details in order to provide the SIP2SIM service. We will, of course, use all reasonable skill and care to ensure the details remain confidential and are not disclosed.

We have, however, designed the service so that it can work with a wide variety of third party SIP services, not just in the UK but in various countries. There are a lot of unusual systems out there and we continue to work to ensure that such services operate with SIP2SIM. However, using third party SIP details may well be in breach of your terms with the third party SIP provider as it means giving us your SIP details. It is up to you to check the terms and we would not suggest anyone breaks a contract they have. You may find that the provider is happy to trust us, especially if they do any other work with us, so it is worth asking. We are also happy to discuss contracts with other providers for the SIP2SIM service and we may be able to provide them with branded SIMs to sell to their customers.

Unfortunately we cannot guarantee that the service will always work with all other providers, and whilst we aim to resolve any technical issues (with reference to the standards), if a provider simply will not deal with our service and blocks us there is little we can do.

The Sip2Sim service is provided by Andrews and Arnold Ltd  and can be purchased direct from them or via ourselves where we will assist with setting up the service for you.

Categories
Elastix Support Knowledge Base Technical

Setting the server domain in elastix correct for scripted email

We run many scripts on customer servers to email cdrs, backups etc, one problem with some mail servers is the mail gets rejected as it comes from root@elastixserver.yourdomain.com by default to fix this is simple and only takes a few lines.

Postfix MTA offers smtp_generic_maps parameter. You can specify lookup tables that replace local mail addresses by valid Internet addresses when mail leaves the machine via SMTP.

Open your main.cf file

# vi /etc/postfix/main.cf

Append following parameter

smtp_generic_maps = hash:/etc/postfix/generic

Save and close the file. Open /etc/postfix/generic file:

# vi /etc/postfix/generic

Make sure root@elastixserver.yourdomain.com change to elastixserver@yourdomain.com add :

root@elastixserver.yourdomain.com  elastixserver@yourdomain.com

Save and close the file. Create or update generic postfix table:

# postmap /etc/postfix/generic

Restart postfix:

# /etc/init.d/postfix restart

When mail is sent to a remote host via SMTP this replaces root@elastixserver.yourdomain.com by elastixserver@yourdomain.com mail address. You can use this trick to replace address with your ISP address if you are connected via local SMTP.

To set up gmail for delivery look at this

Categories
Knowledge Base

Simple Script to import Asterisk Database entries

This is a very simple script to add entries in bulk to the asterisk internal database.

You colate your entries in a simple csv file as below

family,key1,val99
family,key2,val98

then this simple script needs to be written and then run to update the astdb

#!/bin/sh
input=db.csv
while read line
do
 fam=$(echo $line | cut -d',' -f1)
 key=$(echo $line | cut -d',' -f2)
 value=$(echo $line | cut -d',' -f3)
 asterisk -rx "database put $fam $key $value"
done < "$input"

As can be seen its short and simple, but as it does what its meant to do and can save lots of time when building or migrating Asterisk  servers.

It could be easily changed to remove entries if required.

 

Categories
Peripherals Products

Algo 8128 SIP/VoIP Strobe light

Algo

The Algo 8128 SIP Strobe light is the ideal solution for visual ringing in such areas as noisy factories, cafeterias, and public areas.

Or alternatively it can also be used as a silent visual alert where loud ringing may be disruptive in areas such as hospitals, theatres and, churches etc.

Other applications include emergency and security notification where the press of a single phone key can be used to activate one or many strobe lights. And it can also be integrated within a Call Centre system to provide visual notification when queues and waiting times are exceeding there maximum thresholds

Algo 8128 SIP Strobe Light Key Features

  • 360° Visibility
    Flash patterns are visible in every direction or may be chosen specifically for ceiling and wall mount applications.
  • PoE SIP Endpoint with Web Interface
    Integrates easily into a VoIP Unified Communications environment, hosted or premise PBX.
  • Auto-Multicast
    Trigger one – trigger many. Multiple strobes may be operated simultaneously and synchronously using just one SIP extension.
  • Colourful Options
    Available blue, red, and amber caps to distinguish events in the workplace.
  • LEDs for High Intensity and Long Life
    The 8 brilliant LEDs splash 198 candela light in all directions with greater efficiency than xenon strobes.

Please call or email for pricing and avalibility

Categories
Asterisk Support Elastix Support Knowledge Base

Sip Config for Aretta CBeyond and Voiceflex with Asterisk

Since Version 1.8 in Asterisk we have seen some issues with DID calls from some suppliers.

The tell tail sign is that even though you have an inbound route that matches the DID it will still say in the verbose screen that nothing matched it in the inbound context, For example:-

Call from 'USERNAME' (XXX.XX.XXX.XX:5060) to extension '01234123412' rejected because extension not found in context 'from‐trunk'

and if you do “dialplan show 01234123412@from-trunk” sure enough there is one.

After much searching and experimentation below is a working freepbx config that has been tested with 1.8 and 11 and proves to be working with the suppliers above.

OUTBOUND

[peername]
username=USERNAME
type=peer
trustrpid=yes
sendrpid=yes
secret=PASSWORD
qualify=no
outboundproxy=sip.hostname.com
nat=yes
insecure=very
host=sip.hostname.com
fromdomain=sip.hostname.com
dtmfmode=auto
disallow=all
context=from-trunk
canreinvite=no
allow=ulaw
allow=alaw

INBOUND

[username]
type=peer
host=sip.hostname.com
dtmfmode=auto
disallow=all
context=from-trunk
canreinvite=no
allow=ulaw
allow=alaw

;registration string
USERNAME:PASSWORD@peername/USERNAME