CardDAV Middleware for FreePBX/Incredible PBX/izpbx
About
CardDAV Middleware (formerly PhoneMiddleware) is a module for FreePBX/Incredible PBX/izpbx and similar systems that can read a cardDAV server and return inbound and Outbound CNAM (read: caller ID/name) and a full XML phonebook that your phone (or any other device) can read!
Installation and Usage
- The Module depends on Outbound CNAM. This module is officially available through the "Module Admin" interface by enabling the "Unsupported" repository (in the top row). You can then "Check Online" and install it directly
- Return to the "Module Admin" interface and choose "Upload modules", make sure you select the Download option from the dropdown then copy and paste the URL https://carddavmiddleware.massi-x.dev/carddavmiddleware_latest.tar.gz in the input field, ultimately click "Download (From Web)" to Download the module to your system
- Return to the "Module Admin" interface again and install the just downloaded module (search for CardDAV Middleaware inside the table)
- Go to Applications > CardDAV Middleware and fill the inputs with your data
- Click "Auto Configure" to automagically setup your system for Inbound and Outbound CNAM! (If you have any trouble with Auto Configure you will find all the information to configure your system manually right inside that popup)
Note for FPBX 15 users
- You might need to update PHP manually to a version above 7.2.5
- You must install Outbound CNAM manually by uploading it through "Module Admin" because on these old systems is not available in the repo
Where to find the XML phonebook URL: Open the module interface, you will find a link right at the bottom that you can copy and use on any of your devices!
A note about security: The module does not implement any type of security (like HTTPS or TLS) so please, use it only on internal/trusted networks or behind a Proxy/VPN
Where could I get support for the module? If you have any problem with the module you can reach to me over here, but please first check for similar issues like yours!
Changelog
2.2.0
- Updated UI to version 1.3
- Officially compatible with PBX version 17+
- Implemented new "PASSTHROUGH" type for xml phonebook - this leaves labels intact in the output so that you can parse and use them anywhere!
- You can now request a basic authentication when accessing the XML phonebook (optional)
- Improved stylesheets for better compatibility vith PBX 17+
- Add tutorial button
Older versions
- Updated UI to version 1.2
- Fixed inability to install on v.15 systems
- Updated module icon
- Updated UI to version 1.1.1
- Fixed SSL errors in superfecta
- Use centralized common mail "FROM" field (provided by framework)
- Plus all the great improvements in 2.1.0!
- Updated UI to version 1.1.0
- Officially tested and compatible with Incredible PBX and izpbx!
- Improved logging system to include details for errors that happens in background
- Fixed error "could not interpret numbers after plus sign" and improved handling of malformed numbers
- Fixed inability to load data if cache was set to 0 (no cache)
- Correctly handle toll-free numbers in XML Phonebook (these will not have the national prefix added)
- Automatically extract your country code on installation and apply it (needs an internet connection)
- Allows for custom GET requests to have multiple XML Phonebooks for different phone types (implementation of new UI method). You can now include the phone type inside the request in the format "?type=[TYPE]" to load the appropriate phonebook
- Allows for SSL bypass (implementation of new UI method) to load from you carddav server even if the certificate is not valid (not recommended!)
- Fix for donation notifications sent multiple times
- Updated dependencies and website URLs
- New revolutionary version! Fixes and improvements everywhere, be careful that if you were using previous version you will need to reconfigure your system because of the many ground-breaking changes (this is now so easy thanks to auto configure!)
- Let's start with compatibily notes: This version requires at least PHP 7.2.5, so if you are on FreePBX 15 you will likely need to update it manually (using `pkg updgrade` from shell). You will likely need to update dependent modules too, for this is enough to run an update from the "Module Admin" interface
- Entire UI revamp! All the interface is now better organized and clean, with great explanation for every feature. All the inputs are now easy to manage with guided types and values to reduce the possibility of misconfigurations
- New simple yet advanced CardDAV setup! You don't need to input exact URLs anymore, with the help of the superb Mstilkerich CardDAV Client library they will be resolved automatically!
- New multiple addressbook! You can now have multiple addressbooks (closes issue #2) and even reorder them!
- New "Auto Configure" option! This magic button allows with a simple click to configure your entire FreePBX system for incoming and outcoming CNAM, no more hard manual configure needed!
- New notification section! For any error or info a new section has been added at the top of the UI. Click the bell to find all the notifications waiting for you!
- New Superfecta Compatibility option! Toggling compatibility to "Full" allows Superfecta to correctly work with multiple schemes (so you can have CardDAV Middleware followed by Who Called for example). "Standard" compatibility is useful if you don't mind about multiple schemes and instead you like to have reports of error in the library directly on your phone screen. Requires Superfecta version 15.0.4/16.0.26
- New SPAM option! By adding a category (or tag or label, name depends on the client you are using) named "SPAM" inside the interested vCards you can flag a contact as SPAM. Requires Superfecta version 15.0.4/16.0.26
- New notification via mail! You can choose to receive an email when you get a notification, so in case of an error you will be instantly notified!
- Now the module tries to automatically extract the country code from the number. Only if this is missing it will fallback to the one provided (that should be the one of the country your system is)
- Fixed some issues with SNOM devices (see #11)
- Fixed some issues in the phonebook
- Fixed some issues in CNAM matching and switched to POST based queries to get even the "+" sign if present in the query. Requires Superfecta version 15.0.4/16.0.26
- Removed "sub" options in output construct, they were too hard to maintain and not that useful. You can now choose from a pre-defined list of options
- Update are now delivered through standard FreePBX methods. That's it, you will find the module listed with all the other one. Remember to enable update notifications in the "Module Admin" section
- Implemented search with FreePBX search bar
- Closed issue #10
- Module officially signed with FreePBX key! Now you are sure this comes from me and is not tampered (ported to old versions too)
- Completed #4
- Fixed Uninstall
- Various improvements and UI fixes
- New update notifications via e-mail so you won't miss an update anymore!
- Refactoring of the code
- Completed #8
- Dramatically improved CNAM recognition by switching to regex (up to 10x faster!)
- Implemented #4: Custom display names for incoming calls. Now you can define custom parameters as better described in the interface. For example, you can get the name followed by the nickname or the organization name or the title, reverse them… Powerful! (Still needs to be completed for the xml phonebook)
- Fixed #7: Correctly replacing + with 00
- Fixed #6: Exactly three elements even if empty for Snom phones
- Fixed #5: ‘Office’ tag instead of ‘Other’ for Snom phones
- Now module folder url is case insensitive
- Refactoring of various components and better explanations in the interface
- Fixed issue #3
- Better handling of connection fails on phone screen
- Better update handling and config restore
- Various bugfix
- Fixed preference lost after update
- Added license in the module page
- Added donation links
- Fixed license texts
- Whoa! First module version. Officially compatible with FreePBX distro 15 and up.
License
SPDX-License-Identifier: Proprietary
This work is licensed under a proprietary license.
By using this module you agree to the terms. Licenses for the included libraries are available below, credits go to the original author only.
- Composer
- Giggsey libphonenumber for PHP
- Giggsey Locale
- Guzzle
- Guzzle Promises
- Guzzle Psr7
- Mstilkerich CardDAV Client
- PHP-FIG HTTP Client
- PHP-FIG HTTP Factory
- PHP-FIG HTTP Message
- PHP-FIG Logger
- Ralouphie getallheaders
- Sabre URI
- Sabre vobject
- Sabre XML
- Symfony Deprecation Contracts
- Symfony Polyfill / Mbstring