GithubHelp home page GithubHelp logo

freepbx / framework Goto Github PK

View Code? Open in Web Editor NEW
62.0 14.0 56.0 670.13 MB

This module provides a facility to install bug fixes to the framework code that is not otherwise housed in a module

Home Page: http://www.freepbx.org

License: GNU General Public License v3.0

PHP 76.03% Shell 0.41% CSS 1.10% JavaScript 19.06% Hack 0.01% Less 3.40%

framework's Introduction

FreePBX

FreePBX is an Open Source GUI (graphical user interface) that controls and manages Asterisk (PBX). Please see the included license file in the module for license information FreePBX is a Registered Trademark of Sangoma Technologies, Inc.

Version

15

Tech

FreePBX uses a number of open source projects to work properly:

Backend

  • Asterisk - Asterisk is a software implementation of a telephone private branch exchange (PBX) (Supported Versions 11 through 13). License GPL
  • Pear Console::Getopt - This is a PHP implementation of "getopt" supporting both short and long options. License PHP License
  • PHP Data Objects - The PHP Data Objects (PDO) extension defines a lightweight, consistent interface for accessing databases in PHP. License PHP License
  • dialparties.agi - Ported to PHP by the FreePBX community, Originally by Zac Sprackett. License GPL
  • CDR (Call Detail Records) Application - Originally by Arezqui Belaid, License GPL (depends on JPGraph which is QPL)
  • CssMin - A (simple) css minifier with benefits. By Joe Scylla, Copyright (c) 2008 - 2010. License MIT
  • Codeigniter helpers/librarires - Copyright (c) 2008 - 2011, EllisLab, Inc., All rights reserved. License GPL

Frontend

  • Chosen - Chosen is a jQuery plugin that makes long, unwieldy select boxes much more user-friendly. License MIT
  • Class.js - Simple JavaScript Inheritance. License MIT
  • HTML5-History-API - HTML5 History API expansion for browsers not supporting pushState, replaceState. License GPL or MIT
  • html5shiv - This script is the defacto way to enable use of HTML5 sectioning elements in legacy Internet Explorer. License GPL or MIT
  • jed - Gettext Style i18n for Modern JavaScript Apps. License WTFPL
  • Bootstrap Table - An extended Bootstrap table with radio, checkbox, sort, pagination, and other added features. License MIT
  • modernizer - Modernizr tells you what HTML, CSS and JavaScript features the user’s browser has to offer. License MIT
  • Outdated Browser - A time saving tool for developers. It detects outdated browsers and advises users to upgrade to a new version. License MIT
  • Respond JS - A fast & lightweight polyfill for min/max-width CSS3 Media Queries (for IE 6-8, and more). License MIT
  • Progress JS - Polyfill for the HTML5 element. License MIT
  • Sortable - a minimalist JavaScript library for reorder-able drag-and-drop lists on modern browsers and touch devices. No jQuery. Supports Meteor, AngularJS, React and any CSS library, e.g. Bootstrap. License MIT
  • toastr - Simple javascript toast notifications. License MIT
  • Typeahead - a flexible JavaScript library that provides a strong foundation for building robust typeaheads. License MIT
  • zxcvbn - Realistic password strength estimation - Dan Wheeler (Dropbox). License MIT
jQuery Specific
  • jQuery - A multi-browser JavaScript library designed to simplify the client-side scripting of HTML. License MIT
  • jQueryUI - jQuery UI is a JavaScript library that provides abstractions for low-level interaction and animation, advanced effects and high-level, themeable widgets, built on top of the jQuery JavaScript library, that can be used to build interactive web applications. License MIT
  • jQuery UI Bootstrap - Some work based off of this project which was started to bring the beauty and ease-of-use of Twitter Bootstrap to jQuery UI widgets. License MIT
  • jQuery Migrate - This plugin can be used to detect and restore APIs or features that have been deprecated in jQuery and removed as of version 1.9. License MIT
  • jQuery Autosize - A small, stand-alone script to automatically adjust textarea height. License MIT
  • jQuery Cookie - A simple, lightweight jQuery plugin for reading, writing and deleting cookies. License MIT
  • jQuery File Upload - File Upload widget with multiple file selection, drag&drop support, progress bar, validation and preview images, audio and video for jQuery. Supports cross-domain, chunked and resumable file uploads. Works with any server-side platform (Google App Engine, PHP, Python, Ruby on Rails, Java, etc.) that supports standard HTML form file uploads. License MIT
  • jQuery Hotkeys - jquery.hotkeys plugin lets you easily add and remove handlers for keyboard events anywhere in your code supporting almost any key combination. It takes one line of code to bind/unbind a hot key combination
  • jPlayer - jPlayer : HTML5 Audio & Video for jQuery
  • jQuery Numeric - Allows only valid characters (i.e. numbers) to be typed into a text box. Can take negative numbers and a decimal point.
  • Selector Set - An efficient data structure for matching and querying elements against a large set of CSS selectors. License MIT
  • jQuery Smart Wizard - flexible jQuery plug-in that gives wizard like interface

Visuals

FreePBX uses a number of visual graphics packages to render properly:

Music

FreePBX incorporates a number of royalty-free, creative commons licensed music files. These files are distributed under the Creative Commons Attribution-ShareAlike 3.0 license through explicit permission from their authors. The license can be found at: http://creativecommons.org/licenses/by-sa/3.0/

Installation

./install

License

Please see the included license file in the module for license information

Free Software, Hell Yeah!

framework's People

Contributors

akarsh04 avatar akbar-sangoma avatar bolinhtinh avatar daverjorge46 avatar ecasas56 avatar ediamousavi avatar gamegamer43 avatar gregmac avatar jcattan avatar jfinstrom avatar jissphilip avatar julianjm avatar kguptasangoma avatar lidl avatar mbrevda avatar mbrooks avatar meghabm-sangoma avatar miken32 avatar mmishra940 avatar nriendeau avatar prashobkarimbil avatar renatofb avatar rhartmannvcs avatar sasargen avatar stell0 avatar tm1000 avatar vsc55 avatar weblate avatar wmoon2594 avatar xrobau avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

framework's Issues

17 isn't catching the json_decode() exception that is thrown

FreePBX Version

FreePBX 17

Issue Description

If the webserver returns invalid JSON (or say a 404), then the exception thrown by JSON_THROW_ON_ERROR isn't caught.

This is in page.modules.php around line 116

Needs a try ... catch

Operating Environment

Latest 17 version, Asterisk 21

Relevant log output

No response

gpg fails to use next keyserver with FAILURE response

FreePBX Version

FreePBX 17

Issue Description

The required keys were not on the first keyserver attempted, but the return didn't match that expected in code "[GNUPG:] NODATA 1", so the key that had not been received was then validated, which failed.

The checks in GPG.class.php/getKey() need to be extended to check for FAILURE as well as NODATA, and potentially the status return?

Operating Environment

17.0.15.27

Relevant log output

[2024-06-20 09:17:26] [freepbx.INFO]: key result: array (   
	'stdout' => '',   
	'stderr' => 'gpg: keyserver receive failed: No data ',   
	'status' =>    array (     0 => '[GNUPG:] FAILURE recv-keys 167772218',   ),   'exitcode' => 2, )

[bug]: RPM command errored, Delete /dev/shm/yumwrapper/* and try again. Exit code 2 - see FreePBX log for more info.

FreePBX Version

FreePBX 16

Issue Description

After some days when we try to use module admin, we've got this error.
Need to run; rm -rf /dev/shm/yumwrapper/*
I've got this exception on several systems with the same framework.

Operating Environment

Framework 16.0.40.7

Relevant log output

RPM command errored, Delete /dev/shm/yumwrapper/* and try again. Exit code 2 - see FreePBX log for more info.

[bug]: What's the correct way to request later versions of composer packages be upgraded within framework?

FreePBX Version

FreePBX 16

Issue Description

I've hit issues which are fixed in later versions of packages (for instance, the bug in fightbulc/moment was fixed 6 years ago in 1.28).

Is this a pull request or does it need wider consideration?

Likewise, I've hit an issue in the bootstrap tables, which is also fixed in a newer version of the JavaScript library, so I'd also like to request the most recent version of this?

Looking for guidance!

Operating Environment

FreePBX 16.0.40.8

Relevant log output

No response

[bug]: The version_compare_freepbx() in Moduleadmin.class.php doesn't check for an upgrade, just a difference

FreePBX Version

FreePBX 16

Issue Description

For modules with an "updateurl", the version_compare_freepbx() call in getUpgradableModules() isn't checking that the result is <0, this results in modules downgrading and is different from the same action in the GUI.

Operating Environment

FreePBX 16.0.40.7

Relevant log output

fwconsole ma showupgrades
No repos specified, using: [standard,extended,unsupported,commercial,unknown] from last GUI settings

Upgradable:
+---------------+---------------+----------------+
| Module        | Local Version | Online Version |
+---------------+---------------+----------------+
| threadsclient | 0.3           | 0.2            |
+---------------+---------------+----------------+

[bug]: Cosmetic, Spelling errors in moduleadmin class

FreePBX Version

FreePBX 15

Issue Description

A user pointed out that when doing a module action they noticed the error
The following error(s) occured which is misspelled and should be The following error(s) occurred In doing a code search there is a lot of occured with one r, but this one is end user facing and apparently a mild annoyance :)

Operating Environment

This is in all versions of FreePBX in file amp_conf/htdocs/admin/libraries/modulefunctions.class.php

Relevant log output

No response

[bug]: fwconsole reload error (after Restore attempt)

FreePBX Version

FreePBX 17

Issue Description

When reloading with the following command after a Restore with FreePBX 16 backup data the attached error occurs.
fwconsole reload --verbose

Operating Environment

Fresh Debian 12, FreePBX installation with Beta skript

Relevant log output

fwconsole reload --verbose
Error: Call to undefined method Monolog\Handler\NullHandler::setFormatter() in file /var/www/html/admin/libraries/BMO/Logger.class.php on line 230
Stack trace:
  1. Error->() /var/www/html/admin/libraries/BMO/Logger.class.php:230
  2. FreePBX\Logger->createLogDriver() /var/www/html/admin/libraries/BMO/Logger.class.php:135
  3. FreePBX\Logger->driverChannelLogWrite() /var/www/html/admin/libraries/BMO/Logger.class.php:108
  4. FreePBX\Logger->channelLogWrite() /var/www/html/admin/libraries/BMO/Logger.class.php:96
  5. FreePBX\Logger->logWrite() /var/www/html/admin/libraries/BMO/Logger.class.php:41
  6. FreePBX\Logger->log() /var/lib/asterisk/bin/fwconsole:137

[bug]: Undefined variable $urls in modulefunctions.class.php

FreePBX Version

FreePBX 17

Issue Description

When updating the smsconnector module the error is generated.

Operating Environment

FreePBX 17.0.15.8
Debian 12

Relevant log output

Whoops \ Exception \ ErrorException (E_WARNING)
Undefined variable $urls

Stack frames (4)
3
Whoops\Exception\ErrorException
/var/www/html/admin/libraries/modulefunctions.class.php1552
2
Whoops\Run handleError
/var/www/html/admin/libraries/modulefunctions.class.php1552
1
module_functions download
/var/www/html/admin/page.modules.php280
0
include
/var/www/html/admin/config.php481

[bug]: installing a module doesn't create the symlink to assets

FreePBX Version

FreePBX 16

Issue Description

When a module is installed from the GUI, the symlink in admin/assets/ to modules//assets isn't created.

A number of places assume that the link is valid, so these parts of the module fail until the symlink is created.

It appears that this only happens when fwconsole reload is run (the code is in symlink_assets())

The uninstall code in the GUI does correctly remove the symlink (if it is a link)

Operating Environment

FreePBX 16.0.40.7

Relevant log output

No response

[bug]: Need to replace the yum command with apt.

FreePBX Version

FreePBX 17

Issue Description

When we run the GraphQL API: updateSystemRPM, it tries to run the yum command on the debian system.

We need to update the hook files i.e yum-check-updates, yum-update-system .

Operating Environment

Framework 17.0.15.27

Relevant log output

No response

[bug]: php-asmanager.php Status($channel=null,$actionid=NULL) wont return single channel

FreePBX Version

FreePBX 16

Issue Description

function Status($channel=null,$actionid=NULL) will not be able to pull passed channel because its referencing $queue that isn't event set inside the function.

$parameters['Channel'] = $queue;

$parameters['Channel'] = $queue; should be $parameters['Channel'] = $channel;

Operating Environment

release/17.0.15.14

Relevant log output

I believe the description is enough. Calling it normally gets you all the channels like coreshowchannels if you pass a single channels it will still return all channels because the parameter is not getting set.

[bug]: undefined array key "config" in Moduleadmin.class.php

FreePBX Version

FreePBX 17

Issue Description

Working at the console with fwconsole, commands fwconsole ma list and fwconsole ma listonline produce error,

In Moduleadmin.class.php line 1248:
                                
  Undefined array key "config"  

https://github.com/FreePBX/framework/blob/release/17.0/amp_conf/htdocs/admin/libraries/Console/Moduleadmin.class.php#L1247-L1248

$sig could be false ; code does not check that $sig is an array before referencing array key.

Operating Environment

Deb 12
FreePBX 17.0.15.5

Relevant log output

No response

[improvement]: HTML5 Player

FreePBX Version

FreePBX 17

Improvement Description

Problem: FreePBX's reliance on the outdated JPlayer library for HTML5 streaming leads to limitations in functionality and a potentially subpar user experience due to lack of support for modern browser features and APIs.

Proposed Solution: Replace JPlayer with MediaElement.js, a well-maintained open-source media player, to improve HTML5 streaming compatibility, feature support, and overall user experience within FreePBX.

Benefits:

  • Enhanced browser compatibility: MediaElement.js offers broader cross-browser support ensuring playback consistency.
  • Modern features: Leverages current HTML5 capabilities, potentially enabling features like adaptive streaming, advanced playback controls, and better accessibility.
  • Active development: Regular maintenance brings bug fixes, security updates, and new features.
  • Shims for legacy compatibility: Maintains support for older browsers if needed.

Technical Considerations:

  • Integration: Thoroughly assess how MediaElement.js would be integrated into FreePBX's existing architecture. Determine points of interaction with audio streaming components.
  • Dependency Management: Evaluate how to include MediaElement.js in FreePBX (e.g., package manager, direct download).
  • Configuration: Design user-friendly settings within FreePBX to manage MediaElement.js options (e.g., themes, plugins).
  • Testing: Implement rigorous testing across various browsers and devices to ensure seamless playback and compatibility after the migration.

Call to Action:

I strongly recommend the FreePBX development team evaluate the feasibility of replacing JPlayer with MediaElement.js. This modernization could significantly improve the system's HTML5 streaming capabilities for end-users.

[bug]: openpgp keyserver is invalid

FreePBX Version

FreePBX 16

Issue Description

Hi to all, I recently came up with an issue with some modules containing a public key that isn't on the system were marked as invalid. The problem is this:
The key is trusted but not present on the system so the GPG class (libraries/BMO/GPG.class.php) tries to download the new key (function checkSig()) but this fails because the first keyserver defined is hkp://keys.openpgp.org that does not contain the user-id field (see https://superuser.com/a/1485255). The issue is fixed by changing the order of the servers so the keyserver array looks like this:

private $keyservers = array(
  "hkp://keyserver.ubuntu.com:80",  // This is in case port 11371 is blocked outbound
  "hkp://keys.openpgp.org", 
  "pgp.mit.edu", // Other random keyservers
  "keyserver.pgp.com"  // Other random keyserver
); // Yes. sks is there twice.

As an alternative, opengpg could be moved at the last position, if everything else fails.

Again this affect the file present in /var/www/html/admin/modules/libraries/BMO/GPG.class.php

Operating Environment

FreePBX 16 - CentOS but it really doesn't matter

Relevant log output

No response

Incorrect comment or functionality in amp password creation

//hash password its less than that 40 chars or has anything besides
//a-f and 0-9 (hexadecimal). This isnt foolproof, but its the best we can do
$password = preg_match('/^[a-f0-9]{40}$/', $password)

The comment indicates that it will sha1 any password which is LESS THAN 40 characters that isn't a hex value. However, the preg match is actually looking for anything that is EXACTLY 40 characters, and is a hex value of lower case. Not sure if the comment is incorrect or the functionality.

http://3v4l.org/7Fckv

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.