Recently we had a request from a customer that was not the normal request to be able to start and stop recordings. They wanted to just mute it but keep the recording intact duration wise, also the ability to just mute the caller was required.
Asterisk has a manager command ‘MixMonitorMute’ that does just this on all legs of a recording or just the caller / callee legs.
[Description] This action may be used to mute a MixMonitor recording.
[Arguments] ActionID ActionID for this transaction. Will be returned. Channel Used to specify the channel to mute. Direction Which part of the recording to mute: read, write or both (from channel, to channel or both channels). State Turn mute on or off : 1 to turn on, 0 to turn off.
So as the customer wanted the simplest interface possible we provided a simple login form which uses the freepbx user module users to log them in and pass their extension number over to the muteing form, with an icon showing the mute state as well as some text confirmation.
We split the code as this will mean in the future they can incorporate it into their CRM or dashboard with a simple post command if they so wanted.
How it works is by making a manager request to find variable RECORD_ID this is channel that what we need to pass in the AMI request to mute the recording and is best retrieved by running the ‘core show channel’ command and retrieving the variable from it, this is then passed in another AMI command to set the (un)mute.
For three times more space: Gigaset N670 IP PRO becomes a mini-multicell
When a company grows and extends its floor space, the professional phone systems from Gigaset grow with it. The Gigaset N670 IP PRO presented last year offers cordless telephony for up to 20 DECT handsets and eight simultaneous connections. Up to three N670 IP PRO can now be combined into a mini-multicell system. Availability in the extended DECT range is always guaranteed, no matter where the employees happen to be. From February 2021, the mini-multicell function is available free of charge via an update.
Perfect cordless communication for small and medium-sized offices
90% of companies in Europe have a maximum of 20 employees – Gigaset has developed the N670 IP PRO for this segment. The DECT system supports 20 users, SIP accounts and handsets, and allows eight simultaneous calls. The base station is compatible with numerous on-premise and cloud-based telephone systems and supports all handsets from Gigaset’s Professional series. If a company extends its floor space, or there is no availability, for example, in the warehouse or outdoors, it needs a communication solution that grows with it.
Beats any DECT repeater: The new multicell function of the N670 IP PRO
After a free software update the N670 IP PRO can become part of a multicell system, if required. Up to three N670 IP PRO then work together. Eight simultaneous calls with a maximum of 20 handsets are still possible in the extended DECT range. That’s a clear advantage over the DECT repeaters available on the market, which can extend the range, but the performance is halved. The existing hardware from Gigaset can still be used, also making the N670 IP PRO a future-proof investment for companies with dynamic growth. What’s more, the mini-multicell function is easy to configure – in “Base” mode, the N670 IP PROs can be added via the web configurator of the central N670.
From a mini-multicell to a fully-grown multicell – the N670 IP PRO stays
And even if the company’s needs grow even more, for example, through the number of extensions or more frequent calls, the N670 IP PRO already purchased can continue to be used. The multicell expansion via a license enables additional DECT base stations and a greater range: An upgrade turns the central N670 into the DECT manager of a multicell and can then be expanded with N870 base stations – the expansion level of a DECT manager zone is 60 base stations and 250 handsets. Integrator software can be used to combine up to 100 such zones into one large handover and roaming domain. Even if they are at different locations, for example, in a branch office network, they can be managed centrally.
The company grows, the telecommunications hardware stays the same: The Gigaset N760 IP PRO as a single cell for smaller offices, a mini-multicell for larger spaces, and integrated into a multicell system for up to 20,000 handsets
The communication module for business success
The N670 IP PRO is the ideal entry into the DECT IP world for SMEs, and also remains part of the communications infrastructure even with rapid growth – with seamless scalability from 20 to 20,000 handsets. The new mini-multicell function enables a cost-effective and powerful expansion of the DECT range that is also easy to install.
Companies benefit from seamless telephony with the handsets from the Business DECT market leader Gigaset, tailored to the high demands of everyday business life. Employees often know the strengths of the devices from Gigaset from the private sphere and appreciate their robustness, the design and the ease of use. The Professional products are sold exclusively through certified vendors of IT, telecommunications and enterprise systems. For more details on pricing and availability please get in touch
In the fast-paced world of small to medium-sized enterprises, communication is the lifeblood of every operation. As businesses transition away from legacy analogue lines, the need for a robust, flexible, and high-performance IP-based solution becomes paramount. The Gigaset N530 IP PRO enters the market as the definitive answer for teams that demand mobility without compromising on security or audio quality. This single-cell DECT IP base station is meticulously crafted to bridge the gap between professional-grade features and ease of use, making it the ideal cornerstone for any modern office, medical practice, or retail environment.
N530OIP Pro
The N530 IP PRO is designed specifically for small businesses that require a reliable, high-capacity cordless solution. It serves as the central hub for your telephony, allowing your team to move freely throughout the office while staying connected to a secure, crystal-clear network. With its sleek, compact design, it can be mounted on a wall or placed on a desktop, fitting seamlessly into any professional aesthetic. The primary advantage of the N530 lies in its ability to handle high call volumes effortlessly, ensuring that no customer query goes unanswered and no internal collaboration is delayed.
How does the N530 IP PRO differ from its predecessor, the N510IP?
The N530 IP PRO is more than just a minor update, it is a significant leap forward in capacity and security compared to the legacy N510IP. While the N510IP was a staple for many years, the N530 addresses the growing needs of modern offices by doubling the parallel call capacity. Where the N510IP supported 4 simultaneous calls and 6 handsets, the N530 supports 8 parallel calls and 8 handsets. This makes the N530 twice as powerful for busy teams. Furthermore, the N530 introduces superior security protocols, including TLS 1.3 and enhanced SRTP encryption, providing end-to-end protection that the older N510IP simply cannot match in today’s cyber-security landscape.
To get the most out of your N530 base station, it is essential to pair it with the right handsets. The N530 is fully compatible with the entire range of Gigaset Professional DECT handsets, ensuring you have access to features like corporate directories, HD audio, and advanced call handling.
Gigaset S700H PRO: The premium all-rounder with a large colour display and Bluetooth for headsets.
Gigaset SL800H PRO: A slim, smartphone-style handset that offers executive aesthetics with professional durability.
Gigaset R700H PRO: A ruggedised, IP65-rated handset designed for tougher environments like warehouses or workshops.
Gigaset Comfort 550HX / 500HX: Excellent value handsets for standard office use, providing a familiar interface and great battery life.
Legacy Pro Handsets: The N530 also maintains backward compatibility with the S650H PRO, R650H PRO, and SL750H PRO, allowing you to retain your existing hardware while upgrading your base station.
The N530 IP PRO is built to handle the rigours of a professional environment with ease. It supports up to 8 SIP accounts, allowing you to assign individual numbers to each of your 8 handsets or manage multiple lines through a single device. Its coverage is equally impressive, reaching up to 50 metres indoors and 300 metres outdoors, which can be further extended by registering up to 6 Gigaset DECT repeaters. Connectivity is handled via a 10/100 Mbps Ethernet port, and the device fully supports Power over Ethernet (PoE), meaning you can power the unit and provide data through a single cable, reducing clutter and simplifying installation.
Professional communication should not require a degree in IT. The N530 IP PRO features zero-touch auto-provisioning, allowing it to be configured remotely by your service provider or through a simple web-based interface. This ensures a “plug-and-play” experience for most users. For administrators, the web UI provides deep control over call routing, security settings, and handset management. Additionally, the N530 supports Software Update Over the Air (SUOTA), ensuring that your handsets and base station always have the latest features and security patches without needing a physical connection to a PC.
Security is a core pillar of the N530 IP PRO design. DECT technology itself is inherently secure due to its digital encryption, making wireless eavesdropping virtually impossible. However, Gigaset goes further by adding SIPS and SRTP encryption to the SIP signalling and voice data. This means that your conversations are encrypted from the moment they leave the handset until they reach your IP provider or PBX. With the inclusion of LDAPS for secure directory access and HTTPS for the management interface, the N530 meets the highest professional security standards, protecting your sensitive business data from unauthorised access.
Don’t let your business communication be throttled by outdated hardware. The Gigaset N530 IP PRO offers the capacity, security, and flexibility your team needs to thrive in a competitive market. Whether you are replacing an old N510IP or building a new office from scratch, the N530 is the professional choice for reliability and performance.
The new all-in-one phone system for modern offices.
The Gigaset Fusion in dark titanium is available as part of the FX800W PRO bundle. This professional all-in-one telephone system in a timelessly elegant design is a desk phone, DECT base station and mini telephone system all in one device. All settings and functions can be individually configured via a web-based UI and be set intuitively via the newly developed user interface on the bright touch-and-swipe display. The Gigaset Fusion makes day-to-day work easier and is the ideal solution for small offices, medical practices, law firms, agencies and sophisticated home offices.
An elegant attention-getter in every office
The perfect combination of form and function: The 12.7 cm (5″) large, bright HD touch-and-swipe display of this smart all-in-one system makes it easier for you to access all phone functions and ensures that caller information is always at your fingertips – regardless of where the phone is located. High-quality materials, a stable high-gloss finish metal base and metal dome keyboard make the Gigaset Fusion an eye-catcher in any office.
Ideal for new hygiene concepts
High-quality materials such as the disinfectant-resistant surface and UV-hardened finish, as well as exclusive design elements such as the easy-to-clean, bright touch-and-swipe display give the new Gigaset Fusion a wide range of flexible positioning/use options. This all-round high-end equipment allows you to simply and easily keep the cord phone clean, even in hygienically sensitive areas.
Broad connectivity provides flexibility
The Fusion’s extensive connectivity options ensure maximum flexibility. USB-C and Bluetooth make it easy to connect external devices such as your headset your favourite way, while the flexible dual-band 5GHz/2.4GHz WiFi module enables hassle-free connection to the internet and lets you seamlessly integrate the Fusion with your existing network. The 2-port gigabit switch ensures fast LAN connection and power supply (PoE) for the device.
DECT base station functionality
When functioning as a DECT base station, the Gigaset Fusion allows you to connect up to eight Gigaset PRO handsets. This translates into a maximum of flexibility and problem-free connection when equipping your company’s overall work area. This also provides the huge advantage that you can be reached by your customers at all times with up to four parallel calls, even at peak times with high call volumes.
Easy contact management
The Gigaset Fusion’s central phone book gives you up to 500 entries and lets you easily synchronize and manage all of your customer contacts. This also includes your existing mobile phone contacts, which are a snap to import via Bluetooth, as well as your native Google and Microsoft 365 and LDAP contacts.
A large number of convenient features are available to you when doing so. The Gigaset Fusion offers up to 72 programmable display keys and widgets that allow you to optimize the device to your needs. Coloured BLF buttons indicate whether a line is free. And, the display night mode helps you save energy.
Environmentally friendly & radiation-free thanks to ECO DECT
The DECT eco mode and DECT eco mode+ functions are a paragon of an environmentally friendly solution. The two functions offer a significant 80% reduction in transmission power and energy-efficient transmission deactivation when in an idle state. The Fusion also features a proximity sensor that automatically wakes the device from sleep mode when the user gets close to it.
Another resource-saving function is the secure, DECT-encrypted range increase via HX repeater. This makes you future-proof for any further expansion of your company.
The Fusion bundle with two DECT handsets
The new Gigaset Fusion is not available as an individual product, but rather as part of the FX800W PRO bundle. This exclusive bundle includes a Gigaset Fusion plus two SL800H PRO. This smallest and lightest cordless phone in the professional Gigaset portfolio features an impressive large colour display, brilliant sound quality and an excellent battery.
Detailed information on the SL800H PRO can be found here
Over the last few weeks and possibly going on for a few more Gamma Telecom are migrating users from their MSX SBCs to their ‘new’ SWe SBCs, and as side effect of this change is that they now do not support non-symetrical nat translation of RTP traffic
Their previous SBCs and like many other carriers do not have an issue with this and in the words of Twilio’s notes below they support both methods
** When Symmetric RTP is enabled Twilio will detect where the remote RTP stream is coming from and start sending RTP to that destination instead of the one negotiated in the SDP. Please note that this setting is more vulnerable to RTP attacks.
When Symmetric RTP is disabled, Twilio will send RTP to the destination negotiated in the SDP. This setting is considered to be more secure and therefore recommended.
On making support calls to Gamma initially they just seem to tell users that the RTP is being sent from a port that isn’t specified in the SDP, and yes that is correct, But Gamma being Gamma and even though they will have had numerous calls they don’t go any further
It seems the problem is with the customer firewalls in particular pfSense:
By default, pfSense software rewrites the source port on all outgoing connections except for UDP port 500. Some operating systems do a poor job of source port randomization, if they do it at all. This makes IP address spoofing easier and makes it possible to fingerprint hosts behind the firewall from their outbound traffic. Rewriting the source port eliminates these potential (but unlikely) security vulnerabilities. Outbound NAT rules, including the automatic rules, will show in the Static Port column on rules set to randomize the source port.
Source port randomization breaks some rare applications. The default Automatic Outbound NAT ruleset disables source port randomization for UDP 500 because it will almost always be broken by rewriting the source port. Outbound NAT rules which preserve the original source port are called Static Port rules and have on the rule in the Static Port column. All other traffic has the source port rewritten by default.
To add a rule for a device which requires static source ports:
Navigate to Firewall > NAT, Outbound tab
Select Hybrid Outbound NAT rule generation
Click Save
Click to add a new NAT rule to the top of the list
Configure the rule to match the traffic that requires static port, such as a source address of a PBX.
Check Static Port in the Translation section of the page
Click Save
Click Apply Changes
After making that change, the source port on outgoing traffic matching the rule will be preserved. **The best practice is to use strict rules when utilizing static port to avoid any potential conflict if two local hosts use the same source port to talk to the same remote server and port using the same external IP address.**
Personally I would just make this change for the UDP port range and not all UDP ports as this could cause problem with traffic such a port 5060 when multiple servers or phones are on a site.
We have also been made aware of another issue with respect to call diversion to external numbers. By deafault Asterisk and many other IP PBXs set a diversion header in the 181 message giving the device that diverted the call and reason. in most cases this will be the extension number so the header will look like:
This seems to cause issues at Gamma and they reject the call as it seems they are setting the callerid from this info.
To overcome this issue for chan_sip set ‘send_diversion = no’ in the general setting of sip.conf or in the “Other SIP Settings” fields in the Advanced sip setting menu. For PJSIP add it to the pjsip.endpoint_custom_post.conf file as below.
To be honest we have only seen the problem with Gamma trunks and having tested with other suppliers and found they are not affected.
Gammas reson for this is as follows: “After reviewing the divert packet, I can see in the message header that the Diversion header is set to divert to “477”. I would recommend to change this to the full CLI you wish to forward the call to as I believe the system is trying to call “477” which wouldn’t be classed as a valid number. The 603 error you are seeing from your side would be in relation to OFCOMS national number length violation.”
See the Packet below
Session Initiation Protocol (181)
Status-Line: SIP/2.0 181 Call is being forwarded
Status-Code: 181
[Resent Packet: False]
[Request Frame: 22149]
[Response Time (ms): 187]
Message Header
Via: SIP/2.0/UDP xxx.yyy.aaa.zzz:5060;branch=z9hG4bK04B82da620259a59a1a;received=xxx.yyy.aaa.zzz;rport=5060
Transport: UDP
Sent-by Address: xxx.yyy.aaa.zzz
Sent-by port: 5060
Branch: z9hG4bK04B82da620259a59a1a
Received: xxx.yyy.aaa.zzz
RPort: 5060
From: <sip:01234567890@xxx.yyy.aaa.zzz>;tag=gK0441ee4f
SIP from address: sip:01234567890@xxx.yyy.aaa.zzz
SIP from tag: gK0441ee4f
To: <sip:07890123456@aaa.bbb.ccc.ddd>;tag=as24643c1b
SIP to address: sip:07890123456@aaa.bbb.ccc.ddd
SIP to tag: as24643c1b
Call-ID: 71571273_130153708@xxx.yyy.aaa.zzz
[Generated Call-ID: 71571273_130153708@xxx.yyy.aaa.zzz]
CSeq: 321899 INVITE
Sequence Number: 321899
Method: INVITE
Server: FPBX-16.0.40.7(18.9)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Session-Expires: 1800;refresher=uas
Contact: <sip:07890123456@aaa.bbb.ccc.ddd:5060>
Contact URI: sip:07890123456@aaa.bbb.ccc.ddd:5060
Contact URI User Part: 07890123456
Contact URI Host Part: aaa.bbb.ccc.ddd
Contact URI Host Port: 5060
Diversion: <sip:477@aaa.bbb.ccc.ddd>;reason=unconditional
Content-Length: 0
Now the RFC says :
“When a diversion occurs, a Diversion header SHOULD be added to the forwarded request or forwarded 3xx response. The Diversion header MUST contain the Request-URI of the request prior to the diversion. The Diversion header SHOULD contain a reason that the diversion occurred.”
Which is what happens, Gamma seem to have confused what the diversion header does as they seem to assume its setting the diversion destination or outbound caller ID, Neither of which are the uses for the Diversion header.
‘I will add updates here as and when they become available.’
It’s the biggest and most important modernisation of the public phone network ever, and your business needs to check and may need to make changes to ensure a smooth transition
In 2017 BT announced it intended to Switch Off ISDN and PSTN by the end of 2025. From September 2023 new ISDN lines will not be available for purchase. Businesses must make alternative plans and migrate all ISDN / PSTN channels or they will be without a telephony service. All equipment that currently uses the PSTN will stop working: such as alarms, elevator phones, EPOS machines, door entry systems etc
There are four options, all suitable for businesses ranging in size from as few as 3 employees to many thousands of employees. All you have to do is decide which is the best fit for you
Option 1: Adapt What You Have
Extend the life of your current phone system by connecting it to the internet. This is simply done by adding hardware known as a VoIP Gateway and a link known as a SIP Trunk, which uses your existing Internet connection. It’s easy, affordable, and users notice no difference – no new cables, no new handsets, no new training.
Option 2: Blend It All Together
Mix options 1, 2, and 3 to suit your needs. For example, an on-premise system at your head office, and a cloud-based system serving your remote sites. Or connect a cloud-based unified communications platform to an on-premise VoIP Gateway or SIP Trunk-powered system. Whatever the blend, enjoy the same seamlessly-integrated user experience.
Option 3: Upgrade What You Have
Replace your installed on-premise system with the latest feature-rich digital technology known as a Unified Communications (UC) Platform; this can be installed on your site as hardware or software, fully under your control. All your telephony now on the internet, but also seamlessly aligned with your email, messaging, and chat applications via an easy-to-use, easily accessible user interface. Plus, it can all be replicated on employees’ desktop computers, laptops and mobile devices for super-convenience.
Option 4: Migrate To The Cloud
Follow hundreds of millions of organisations worldwide by replacing your on-premise system with a powerful, cloud-powered Unified Communications (UC) solution. All your calls, email, chat, and messaging now via the internet; limitless ability to add the latest new features at will; and pay monthly, only for the services you use.
Sangoma have produced a useful Webinar: “How To Prepare For The Great British ISDN Switch Off”Webinar Recording: “How To Prepare For The Great British ISDN Switch Off”
If you have any questions or need advice email or call us.
Before diving into the installation and configuration, it’s better to know some terms used in LDAP.
Attribute
An attribute is a characteristic of an object. For example, an email of an account.
Object Class
An object class defines what attributes that object can have. For example, we define an object class, InetOrgPerson, it may contain displayName and mail attributes. Depends on the definition of object class, the attributes specified can be mandatory or optional.
Distinguished Name (DN)
Distinguished Name lets us uniquely identify the object. It is similar to the file path in a reverse order. For example, uid=JohnDoe,OU=People,DC=abc,DC=local is a DN
Entry
An entry is just an object. You define what object class this entry belongs to & each object class defines what attributes this object has. Each entry can belong to multiple object classes and need to have all mandatory attributes specified in all object classes it belongs to.
Schema
A schema contains the definitions of various attributes and object classes.
Domain Component (DC) & Organizational Unit (OU)
They are containers, contains object & let you manage objects in a hierarchy manner. People use them commonly.
OpenLDAP Installation
Install OpenLDAP related packages
sudo yum install openldap* -y
sudo systemctl start slapd
sudo systemctl enable slapd
sudo systemctl status slapd # Check service is started & enabled
● slapd.service - OpenLDAP Server Daemon
Loaded: loaded (/usr/lib/systemd/system/slapd.service; enabled; vendor preset: disabled)
Active: active (running) since Tue 2023-10-17 11:20:41 BST; 1 weeks 0 days ago
Docs: man:slapd
man:slapd-config
man:slapd-hdb
man:slapd-mdb
file:///usr/share/doc/openldap-servers/guide.html
Main PID: 1922 (slapd)
CGroup: /system.slice/slapd.service
└─1922 /usr/sbin/slapd -u ldap -h ldapi:/// ldap:///
Oct 24 16:46:06 testsystem.myserver.co.uk slapd[1922]: conn=1604 fd=22 ACCEPT from IP=192.168.1.202:45777 (IP=0.0.0.0:389)
Oct 24 16:46:06 testsystem.myserver.co.uk slapd[1922]: conn=1604 op=0 BIND dn="" method=128
Oct 24 16:46:06 testsystem.myserver.co.uk slapd[1922]: conn=1604 op=0 RESULT tag=97 err=0 text=
Oct 24 16:46:06 testsystem.myserver.co.uk slapd[1922]: conn=1604 op=1 SRCH base="dc=abc,dc=local" scope=2 deref=0 filter="(|(cn=*)(sn=*))"
Oct 24 16:46:06 testsystem.myserver.co.uk slapd[1922]: conn=1604 op=1 SEARCH RESULT tag=101 err=0 nentries=13 text=
Oct 24 16:46:06 testsystem.myserver.co.uk slapd[1922]: conn=1604 op=2 UNBIND
Oct 24 16:46:06 testsystem.myserver.co.uk slapd[1922]: conn=1604 fd=22 closed
Oct 24 16:46:49 testsystem.myserver.co.uk slapd[1922]: conn=1530 op=21 SRCH base="dc=abc,dc=local" scope=2 deref=0 filter="(cn=*)"
Oct 24 16:46:49 testsystem.myserver.co.uk slapd[1922]: conn=1530 op=21 SRCH attr=givenName title wWWHomePage telephoneNumber
Oct 24 16:46:49 testsystem.myserver.co.uk slapd[1922]: conn=1530 op=21 SEARCH RESULT tag=101 err=0 nentries=13 text=
OpenLDAP Configuration
Generate OpenLDAP password and save it
sudo slappasswd
Then, we will use ldapmodify to update /etc/openldap/slapd.d/cn=config/olcDatabase={2}hdb.ldif, which is our database config fileWe will create a file & customize and paste content below
vi db.ldif
Content you should paste: You should replace with your customized values
olcSuffix (should be replaced by your domain, e.g. example.com -> dc=example,dc=com)
olcRootDN (should be replaced by your domain admin name, can be any name you prefer, e.g. admin -> cn=admin,dc=abc,dc=local)
olcRootPW (should be the password you generate above)
Apply some commonly used schema. The 2nd & 3rd schema allow us to create an object with InetOrgPerson & ShadowAccount which we will use to create an user
Now the code. I accept no responsibility for it, Its a mess but it does what it says. There is bound to be a better way but with the timescale I had i needed something quick and as such its dirty. each section is distinct so shouldnt be hard to clean up.
The file fpbxldap.sh
#!/bin/bash
#Script file to add delete and modify ladp database for freeepbx contact manager
#Copyright (C) 2023 Ian Plain Cyber-cottage.co.uk
#
#This program is free software; you can redistribute it and/or
#modify it under the terms of the GNU General Public License
#as published by the Free Software Foundation; either version 2
#of the License, or (at your option) any later version.
#
#This program is distributed in the hope that it will be useful,
#but WITHOUT ANY WARRANTY; without even the implied warranty of
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
source fldapconfig.sh
# LDAP Entry Details
#BASE_DN="dc=abc,dc=local"
#BASE_OU="ou=People"
# Search for the LDAP entries ad file them
CURRENT_TELEPHONE_NUMBER=$(ldapsearch -x -D "$LDAP_BINDDN" -w "$LDAP_BINDPW" -H "$LDAP_SERVER" -b "$BASE_OU,$BASE_DN" telephoneNumber | awk -F ',|=|: ' '/dn:/ {print $3}')
echo "$CURRENT_TELEPHONE_NUMBER" |grep -w -v "People" > /tmp/ldapdb.txt
# Query to execute
QUERY="SELECT asterisk.contactmanager_entry_numbers.number as 'telephoneNumber', asterisk.contactmanager_group_entries.displayname as 'cn', asterisk.contactmanager_group_entries.fname as 'givenName', COALESCE(NULLIF(asterisk.contactmanager_group_entries.lname, ''), '-') AS 'sn', asterisk.contactmanager_entry_numbers.type as 'o', asterisk.contactmanager_groups.name as 'dir'
FROM asterisk.contactmanager_entry_numbers
INNER JOIN asterisk.contactmanager_group_entries ON asterisk.contactmanager_entry_numbers.entryid=asterisk.contactmanager_group_entries.id
INNER JOIN asterisk.contactmanager_groups ON asterisk.contactmanager_groups.id=asterisk.contactmanager_group_entries.groupid
WHERE asterisk.contactmanager_entry_numbers.number REGEXP '^[0-9]*$' AND asterisk.contactmanager_group_entries.displayname REGEXP '[:alpha:]'
;"
# Output file
OUTPUT_FILE="/tmp/fpbxdb.txt"
# Run the MySQL query and save the result to the output file
mysql -h "$DB_HOST" -u "$DB_USER" -p"$DB_PASSWORD" "$DB_NAME" -N -e "$QUERY" | sed 's/\t/,/g' > "$OUTPUT_FILE"
#Split out just the names
cat /tmp/fpbxdb.txt |awk -F ',' '{print $2" - "$5}' > /tmp/fpxname.txt
cat /tmp/fpbxdb.txt |awk -F ',' '{print $2" - "$5","$1}' > /tmp/fpxnumna.txt
# Assign filenames to variables
listB_file="/tmp/ldapdb.txt"
listA_file="/tmp/fpxname.txt"
# Check if the files exist
if [ ! -f "$listA_file" ]; then
echo "File $listA_file does not exist."
exit 1
fi
if [ ! -f "$listB_file" ]; then
echo "File $listB_file does not exist."
exit 1
fi
#Bit of a hack here that adds an entry to empty file, as AWK doesnt like empty files.. Thsi was quick a fix
if [ -s "$listA_file" ]; then
echo "The file is not empty."
else
echo "foobar" > /tmp/fpxname.txt
fi
if [ -s "$listB_file" ]; then
echo "The file is not empty."
else
echo "barfoo" > /tmp/ldapdb.txt
fi
# Compare the two files and echo names in List A but not in List B
awk 'NR==FNR{a[$0]++; next} !a[$0]' "$listB_file" "$listA_file" > /tmp/add.txt
awk 'NR==FNR{a[$0]++; next} !a[$0]' "$listA_file" "$listB_file" > /tmp/rem.txt
#lets delete the entries
# Loop through each line in the input file and run the command
while IFS= read -r REM_FILTER; do
# Run the specified command on each line
echo "$REM_FILTER deleted from Ldap" >> /tmp/remlog.txt
ldapdelete -x -D "$LDAP_BINDDN" -w "$LDAP_BINDPW" -H "$LDAP_SERVER" "cn=$REM_FILTER,$BASE_OU,$BASE_DN"
done < "$rem_file"
echo "Done-------" >> /tmp/remlog.txt
#delete the previous ldif files
rm -f /tmp/adding.ldif
rm -f /tmp/modify.ldif
#lets add the entries
# Loop through each line in the input file and run the command
while IFS= read -r ADD_FILTER; do
# Run the specified command on each line
# echo $ADD_FILTER |awk -F ' - ' '{print $1; print $2}'
ms_cn="$(echo $ADD_FILTER |awk -F ' - ' '{print $1}')"
ms_o="$(echo $ADD_FILTER |awk -F ' - ' '{print $2}')"
# Query to execute
QUERY="SELECT asterisk.contactmanager_entry_numbers.number as 'telephoneNumber', COALESCE(NULLIF(asterisk.contactmanager_group_entries.lname, ''), '-') AS 'sn'
FROM asterisk.contactmanager_entry_numbers
INNER JOIN asterisk.contactmanager_group_entries ON asterisk.contactmanager_entry_numbers.entryid=asterisk.contactmanager_group_entries.id
INNER JOIN asterisk.contactmanager_groups ON asterisk.contactmanager_groups.id=asterisk.contactmanager_group_entries.groupid
WHERE asterisk.contactmanager_entry_numbers.type = '$ms_o' AND asterisk.contactmanager_group_entries.displayname = '$ms_cn'
;"
# Run the MySQL query and save the result to the output file
ms_query=$(mysql -h "$DB_HOST" -u "$DB_USER" -p"$DB_PASSWORD" "$DB_NAME" -N -e "$QUERY")
ms_telephoneNumber=$(echo $ms_query | awk '{print $1}')
ms_sn=$(echo $ms_query | awk '{print $2}')
echo "dn: cn=$ms_cn - $ms_o,ou=People,dc=abc,dc=local" >> /tmp/adding.ldif
echo "cn: $ms_cn - $ms_o" >> /tmp/adding.ldif
echo "givenName: $ms_cn - $ms_o" >> /tmp/adding.ldif
echo "sn: $ms_sn" >> /tmp/adding.ldif
echo "telephonenumber: $ms_telephoneNumber" >> /tmp/adding.ldif
echo "objectclass: inetOrgPerson" >> /tmp/adding.ldif
echo "objectclass: top" >> /tmp/adding.ldif
echo "" >> /tmp/adding.ldif
echo "cn: $ms_cn - $ms_o , $ms_telephoneNumber added to Ldap" >> /tmp/addlog.txt
done < "$add_file"
#Lets run the ldif command
ldapadd -x -D "$LDAP_BINDDN" -w "$LDAP_BINDPW" -H "$LDAP_SERVER" -f /tmp/adding.ldif >> /tmp/addlog.txt
echo "Done-------" >> /tmp/addlog.txt
#OK now we are going to compare freepbx and ldap entries and update as required.
#lets get the current ldap names and numbers
ldapsearch -x -D "cn=admin,dc=abc,dc=local" -w "r1v3rp1g5" -b "ou=People,dc=abc,dc=local" | awk -v OFS=',' '{split($0,a,": ")} /^cn:/{cn=a[2]} /^telephoneNumber:/{telephoneNumber=a[2]; print cn,telephoneNumber}' > /tmp/ldapcsv.txt
awk 'NR==FNR{a[$0]++; next} !a[$0]' /tmp/ldapcsv.txt /tmp/fpxnumna.txt > /tmp/chg.txt
chg_file="/tmp/chg.txt"
# Loop through each line in the input file and run the command
while IFS= read -r CHG_FILTER; do
# Run the specified command on each line
# echo $CHG_FILTER |awk -F ',' '{print $1; print $2}'
ms_cn="$(echo $CHG_FILTER |awk -F ',' '{print $1}')"
ms_telephoneNumber="$(echo $CHG_FILTER |awk -F ',' '{print $2}')"
echo "Changing telephoneNumber to $ms_telephoneNumber"
echo "dn: cn=$ms_cn,$BASE_OU,$BASE_DN" >> /tmp/modify.ldif
echo "changetype: modify" >> /tmp/modify.ldif
echo "replace: telephoneNumber" >> /tmp/modify.ldif
echo "telephoneNumber: $ms_telephoneNumber" >> /tmp/modify.ldif
echo "" >> /tmp/modify.ldif
echo "$CHG_FILTER changed in Ldap" >> /tmp/chglog.txt
done < "$chg_file"
ldapmodify -x -D "$LDAP_BINDDN" -w "$LDAP_BINDPW" -H "$LDAP_SERVER" -f /tmp/modify.ldif >> /tmp/modify.ldif
echo "Done-------" >> /tmp/chglog.txt
Example phone configurations for Sangoma S series and Gigaset.
Gigaset example
Sangoma S Series example
Im sure this will work with other systems that support Ldap directories
UK regulators have implemented changes to help reduce smishing and SMS fraud incidents.
As a reminder, effective immediately, application-to-person (A2P) SMS messages sent to the UK from Alphanumeric Sender IDs that contain special characters will be blocked.
The following characters are allowed:
A to Z (upper and lowercase)
0 to 9
– (dash)
_ (underscore)
‘ ‘ (space)
& (ampersand)
Any special characters outside of the list above will be blocked (example: “+” or “@”).
Effective October 31, 2023, application-to-person (A2P) SMS messages sent to the UK from the following list of generic Alphanumeric Sender IDs will be blocked.
Note: Combinations of these generic Alphanumeric Sender IDs are allowed (for example, “Smith Bank” or “Border Control” are both allowed.
1TimePin
2FA
Accept
Access
Account
Active
Admin
Advise
Alert
Allow
Allowance
App
Appointment
Approve
Approved
Auth
AuthMSG
Authorise
AuthSMS
Aware
Bank
Banking
Bill
Billing
Call
Card
Caution
Certify
Check
CloudOTP
Code
Collect
Collection
Confirm
Contact
Control
Courier
Delay
Deliver
Delivery
Discount
Energy
Fraud
Help
Info
InfoSMS
ISA
Key
Loan
Login
Logistics
LogMeIn
Logon
Malware
Message
Mobile
Mortgage
MSG
MsgAuth
Network
NoReply
Notify
OneTimePin
Order
OTP
OTPSMS
Package
Parcel
Pay
Payment
Pin
PinCode
Post
Protocol
Purchase
Ratify
Rebate
Receipt
Refund
Reminder
Repayment
Reply
Respond
Save
Saving
Savings
Scam
Schedule
Secure
Security
Service
Shipping
Sign
Signin
Signon
SMS
SMSAuth
SMSCode
SMSInfo
SMSOTP
SMSVerify
Support
System
Text
Trace
Track
Tracking
Trust
TXT
Update
Updates
Validate
Verify
VerifySMS
VerifyMe
Virus
Warn
Warning
Winner
What do you need to do?
Avoid using special characters in your Alphanumeric Sender IDs and use a non-generic Alphanumeric Sender ID to send messages in the UK to avoid message disruption following the steps below:
If you’re using a Messaging Service, update your generic Alphanumeric Sender ID by reviewing your suppliers guide on Using Alphanumeric Sender ID with Messaging Services.
If you’re specifying your Alphanumeric Sender ID directly in your API request, update the “From” parameter in your application code with a non-generic Alphanumeric Sender ID.
What if you don’t take action?
There’s no action for you to take. SMS messages sent to the UK from generic Alphanumeric Sender IDs or Sender IDs that contain special characters will be blocked and return an error code.
For this project we are going to use the Amazon AWS Transcribe service, AWS Transcribe is a cloud-based speech recognition service that converts audio recordings into accurate text transcripts. It uses advanced machine learning algorithms to identify different speakers and punctuation, while also supporting a variety of audio formats and languages. AWS Transcribe can transcribe audio from sources such as phone calls, video recordings, and live streams, making it a versatile tool thats idealy suited for voicemail transcription, The service is highly scalable and cost-effective.
We will say that we used to use Google’s Text to speech engine for thsi but over time I would have expected quality of transcription to have improved, But with Google this is not the case, and I expect this is because they possibly use “predictive” text to speech and not sample all the words as this example below shows, This is the same audio fed to Google and AWS
Amazon AWS Transcribe
Um, this is Ian. I’d like to order some pizza for tomorrow, please. We would like to order a pepperoni pizza and a mozzarella pizza that’s for tomorrow at five PM. Thank you.
Google Speech to Text
like to order some pizza for tomorrow please would like to order a pepperoni pizza and a mozzarella Pizza Hut for tomorrow at 5 a.m. thank you
As can be seen google misses words and adds others, As you can imagine this isnt what you want with speech transcription.
So we have switched out old script to use AWS.
For this project on Freepbx you need a few extra applications added and a amazon aws account, setting this up is not covered here as you should already have knowledge of this if you are here.
The extra apps are , aws , jq , sox
to get aws :
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip -qq awscliv2.zip
./aws/install
Then you need to configure as 'root' and as 'asterisk', so:
aws configure
fill out your aws key and token as well as the region your bucket is in
Then repeat as 'asterisk' so
su asteriskaws configure
and fill out same details.
for jq and sox, just yum install xxx as you would for any other program.
Next you need the asterisk dialplan added to the extensions_custom.conf
as can be seen this dialplan records a file and then runs the vmailprox.sh script. This script collects the variables and passes them over to the main script and exits after doing so, this is so channels aren’t held while transcription takes place. (Thats the plan anyway)
#!/bin/sh
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
S3_BUCKET="YOURS3BUCKET"
DIRPATH=/var/spool/asterisk/voicemail/default/
#callerchan=$1
#callerid=$2
#origdate=$3
#origtime=$4
#origmailbox=$5
#origdir=$6
#duration=$7
counter=1
sleep 4
FILENUM=$(/bin/ls ${DIRPATH}${origmailbox}/INBOX |/bin/grep txt | /usr/bin/wc -l)
##Added to allow 999 messages
if (( $FILENUM <= 9 ));
then
FILENAME=msg000${FILENUM}
elif (( $FILENUM <= 99 ));
then
FILENAME=msg00${FILENUM}
else
FILENAME=msg0${FILENUM}
fi
IN=$(/bin/grep "${origmailbox}=" /etc/asterisk/voicemail.conf)
set -- "$IN"
IFS=","; declare -a Array=($*)
email=${Array[2]}
/bin/echo "[message]" >> ${DIRPATH}${origmailbox}/INBOX/${FILENAME}.txt
/bin/echo origmailbox=${origmailbox} >> ${DIRPATH}${origmailbox}/INBOX/${FILENAME}.txt
/bin/echo "context=demo" >> ${DIRPATH}${origmailbox}/INBOX/${FILENAME}.txt
/bin/echo "macrocontext=" >> ${DIRPATH}${origmailbox}/INBOX/${FILENAME}.txt
/bin/echo "exten=s" >> ${DIRPATH}${origmailbox}/INBOX/${FILENAME}.txt
/bin/echo "priority=11" >> ${DIRPATH}${origmailbox}/INBOX/${FILENAME}.txt
/bin/echo callerchan=${callerchan} >> ${DIRPATH}${origmailbox}/INBOX/${FILENAME}.txt
/bin/echo callerid=${callerid} >> ${DIRPATH}${origmailbox}/INBOX/${FILENAME}.txt
/bin/echo origdate=${origdate} >> ${DIRPATH}${origmailbox}/INBOX/${FILENAME}.txt
/bin/echo origtime=${origtime} >> ${DIRPATH}${origmailbox}/INBOX/${FILENAME}.txt
/bin/echo msg_id=${origtime}-00000001 >> ${DIRPATH}${origmailbox}/INBOX/${FILENAME}.txt
/bin/echo "flag=" >> ${DIRPATH}${origmailbox}/INBOX/${FILENAME}.txt
/bin/echo "category=" >> ${DIRPATH}${origmailbox}/INBOX/${FILENAME}.txt
/bin/echo "duration=${duration}" >> ${DIRPATH}${origmailbox}/INBOX/${FILENAME}.txt
/bin/nice /usr/bin/lame -b 16 -m m -q 9-resample /var/lib/asterisk/sounds/catline/${origdir}.wav /tmp/${origdir}.mp3
# Create a string based on the current date and time
current_date_time="$(date +%Y-%m-%d_%H-%M-%S)"
# Upload to the S3 Bucket
aws --debug --profile default s3 cp /tmp/${origdir}.mp3 s3://$S3_BUCKET/$current_date_time
# Start the transcription job
output=$(aws --profile default transcribe start-transcription-job \
--transcription-job-name $current_date_time \
--language-code en-GB \
--media-format mp3 \
--media MediaFileUri=s3://$S3_BUCKET/$current_date_time \
--output-bucket-name $S3_BUCKET)
# Wait for the transcription to finish
JOB_COMPLETED=false
while [ "$JOB_COMPLETED" = false ]; do
JOB_STATUS=$(aws --profile default transcribe get-transcription-job \
--transcription-job-name $current_date_time \
--query 'TranscriptionJob.TranscriptionJobStatus' \
--output text)
if [ "$JOB_STATUS" = "FAILED" ]; then
JOB_COMPLETED=true
SHORT_CALL=yes
/bin/echo "$JOB_STATUS" >> /tmp/logfile.txt
break
fi
if [ "$JOB_STATUS" = "COMPLETED" ]; then
/bin/echo "$JOB_STATUS" >> /tmp/logfile.txt
JOB_COMPLETED=true
else
((counter++))
sleep 5
echo $counter >> /tmp/logfile.txt
/bin/echo "$JOB_STATUS" >> /tmp/logfile.txt
if [ "$counter" -eq "15" ]; then
JOB_STAUS=COMPLETED
JOB_COMPLETED=true
SHORT_CALL=yes
break
fi
fi
done
# Get the transcription result
aws s3 --profile default cp s3://$S3_BUCKET/$current_date_time.json /tmp/$current_date_time.json
# Get the transcription result
FILTERED=$(jq -r '.results.transcripts[].transcript' /tmp/$current_date_time.json)
# append result of transcription
if [ -z "$FILTERED" ]
then
echo "(AWS was unable to recognize any speech in audio data.)" >> /tmp/${origdir}.txt
else
echo "$FILTERED" >> /tmp/${origdir}.txt
sed -i 's/ Um,/ /gI' /tmp/${origdir}.txt
fi
voicemailbody=$(cat "/tmp/${origdir}.txt")
# echo "body ${voicemailbody}"
/bin/cp /var/lib/asterisk/sounds/catline/${origdir}.wav ${DIRPATH}${origmailbox}/INBOX/${FILENAME}.wav
echo -e "You have a new voicemail from ${callerid} it was left on ${origdate} and is ${duration} seconds long,\nThe message left,\n\n${voicemailbody}\n\nTranscribed by the Amazon AWS Transcribe service\n" | /bin/mail -s "A new voicemail has arrived from ${callerid}" -a "/tmp/${origdir}.mp3" "$email"
/bin/rm -f /tmp/${origdir}.mp3
/bin/rm -f /tmp/${origdir}.txt
aws --profile default transcribe delete-transcription-job --transcription-job-name $current_date_time
Then to pass calls to this and not normal voicemail, In Freepbx create a Custom Destination as “vmail2text,s,1” and if you require certain queues to go to specific mailboxes for example 2000 one like “vmail2text,2000,1” so calls will be sent to mailbox 2000 and teh transcriptions will be sent to the email address linked to that extension
Then in extensions that want to use transcription set the “Optional Destinations” in the advanced tab to the custom destination.
Users also can listen to voicemail normally from their handset or the ucp.
These scripts arent only useful for voicemail then can be used fro questionnaire lines and booking lines, anywhere you want to speed up the handling of voice messages. We will soon be looking at ways of integrating this with Whatsapp so transcriptions can be sent to your mobile.
This new module does what it says, Users get an email notification of a missed call on their handset. With this module, either the PBX admin or the user can configure email notifications for whenever they miss a call.
A new menu entry will appear in the Applications menu which lists the Missed Call status for all the users on the system that have an email address defined in User Management.
This free module allows the sending of Missed call notifications to the user’s configured email address, on following events –
Missed Internal call
Missed External call
Missed from Queue call
Missed from Ring Group call.
To change notifications types, the Admin can use User Management where they can edit users notification settings:
Or the user can do this themselves using the UCP, or once set up,
There are also dialable feature codes to enable or disable notifications on a per-extension basis, by default these are set to: Missed Call Notification Activate *56 Missed Call Notification Deactivate *57 Missed Call Notification Toggle *58
This is a useful addition to FreePBX and can see situations where this would be really useful. Hotel reception desks for example.
This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish.AcceptRejectRead More
Privacy & Cookies Policy
Privacy Overview
This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.