Categories
Blog

Sangoma’s Commitment to Open Source software

In January of 2015, the FreePBX project became part of the Sangoma family. Being a commercial entity charged with maintaining an open source project can be a challenging endeavor at times. Furthermore, the fact that major open source projects are normally in the care of commercial organizations is usually not given much thought.

Before Sangoma, FreePBX was overseen by Schmooze Com Inc., before that Bandwidth and before that Coalescent Systems Inc. These companies have all done their parts to ensure the survival of the FreePBX project. Sangoma has been dedicated to the open source community, including FreePBX, for many years. In the last year, the FreePBX project has seen great strides, including the release of FreePBX 13 with accelerated development and bug fixes.

Sangoma has also empowered FreePBX with new open source features such as: synchronizing Active Directory with user manager, a complete rewrite of Sound Recordings, the overhaul of the FreePBX interface, playback of recordings in your browser, the addition of the firewall module, sound languages module and so much more.

More recently they have kicked off development on FreePBX 14, Their next major release. One of the major new open sourced features they are bringing to the table is a calendaring system which will become a replacement for many of the scheduling components you use today, like Time Conditions. But They’ll be able to talk more about that in a few weeks.

FreePBX has historically been funded through professional training, professional support services, and commercial modules. These commercial modules tend to enhance the already provided open source functionality. These modules usually require special development or maintenance considerations, so they become paid modules. Over time, they constantly review our collection of commercial modules to see if any meet the requirements to become open sourced.

Thus, they have decided to release several of these commercial modules under the AGPLv3 as open sourced. Some of these modules have been unmaintained for a few years and will be put into the contributed repository to allow community members to build off of the code and revive or enhance the functions for the open source community.

They have also thrown in a few actively maintained modules such as XMPP, RESTapi and Text-To-Speech Engines that will allow broader use and community contributions. Moving forward these modules will still be maintained by Sangoma. In the coming months, They hope to have some great new features regarding RESTapi.

It is  hoped that the release of this code will inspire users to take FreePBX to the next level!

 

Categories
IPPBXs Sangoma

The FreePBX Appliance

Introducing the FreePBX appliance! 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!

appliances-header

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 power 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!

Current Models and System capacity:

The full datasheet can be downloaded from here

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
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
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.

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

Nagios check_asterisk change for Asterisk 13

We noticed to day after a Asterisk server upgrade the Nagios check_asterisk plugin we use was reporting a”unknown”

It seems there is a minor change in response to the status request.

It was:

[root@elastix24 ~]# ./check_asterisk -h 127.0.0.1 -m mgr -u user -p secret  -vvvv
Running in Manager mode
Connecting to 127.0.0.1:5038
Connected to 127.0.0.1:5038
Asterisk Call Manager/1.1
Action: Login
Username: user
Secret: secret

Response: Success
Message: Authentication accepted
Action: Status

Response: Success
Message: Channel status will follow

Event: StatusComplete
OK  (idle) 

Its now with ami 2.7

[root@aubpbx1 ~]# ./check_asterisk -h 127.0.0.1 -m mgr -u user -p secret -vvvv
Running in Manager mode
Connecting to 127.0.0.1:5038
Connected to 127.0.0.1:5038
Asterisk Call Manager/2.7.0
Action: Login
Username: user
Secret: secret

Response: Success
Message: Authentication accepted

Action: Status
Response: Success

EventList: start
Message: Channel status will follow

Event: StatusComplete
OK  (idle)

So the plugin code need a small change to reflect this

diff check_asterisk check_asterisk_old 
162,163c162,163
< &unknown("Unknown answer $response (wanted Message: something)") unless ($message =~ m/^EventList:\s+(.*)$/i);
< &unknown("didn't understand message $message") unless ($1 =~ m/start/i);
---
> &unknown("Unknown answer $response (wanted Message: something)") unless ($message =~ m/^Message:\s+(.*)$/i);
> &unknown("didn't understand message $message") unless ($1 =~ m/Channel status will follow/i);

Once this is made seems to be reporting OK.

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.