From: <abe...@us...> - 2015-01-06 16:48:28
|
Revision: 6910 http://sourceforge.net/p/astlinux/code/6910 Author: abelbeck Date: 2015-01-06 16:48:26 +0000 (Tue, 06 Jan 2015) Log Message: ----------- web interface, ConfBridge tab, added Asterisk 13 support Modified Paths: -------------- branches/1.0/package/webinterface/altweb/admin/confbridge.php branches/1.0/package/webinterface/altweb/common/license-astlinux.txt branches/1.0/package/webinterface/altweb/common/license-packages.txt Modified: branches/1.0/package/webinterface/altweb/admin/confbridge.php =================================================================== --- branches/1.0/package/webinterface/altweb/admin/confbridge.php 2015-01-05 22:15:42 UTC (rev 6909) +++ branches/1.0/package/webinterface/altweb/admin/confbridge.php 2015-01-06 16:48:26 UTC (rev 6910) @@ -1,6 +1,6 @@ <?php -// Copyright (C) 2012-2013 Lonnie Abelbeck +// Copyright (C) 2012-2015 Lonnie Abelbeck // This is free software, licensed under the GNU General Public License // version 3 as published by the Free Software Foundation; you can // redistribute it and/or modify it under the terms of the GNU @@ -8,13 +8,14 @@ // confbridge.php for AstLinux // 04-09-2013 +// 01-06-2015, Added Asterisk 13 support // $myself = $_SERVER['PHP_SELF']; require_once '../common/functions.php'; -$isASTERISKv1_x = isASTERISKv1_x(); +$ASTERISKversion = getASTERISKversion(); // Function: getASTERISKversion // @@ -24,15 +25,16 @@ return($list[1]); } -// Function: isASTERISKv1_x +// Function: getDOTtuple // -function isASTERISKv1_x() { +function getDOTtuple($verSTR, $index) { - $list = explode('.', getASTERISKversion()); - if ((int)$list[0] < 10) { - return(TRUE); + if ($index < 1) { // 1 based index + return(FALSE); } - return(FALSE); + $list = explode('.', $verSTR); + + return((int)$list[$index - 1]); } // Function: userRedirect @@ -160,6 +162,10 @@ // Function: parseCONFBRIDGEdata // function parseCONFBRIDGEdata($room_list) { + global $ASTERISKversion; + + $ast13 = (getDOTtuple($ASTERISKversion, 1) == 13); + $id = 0; for ($i = 0; $i < count($room_list); $i++) { @@ -176,14 +182,37 @@ } while (! feof($ph)) { if ($line = trim(fgets($ph, 1024))) { - if (preg_match('/^([^ ]+) +([^ ]+) +([^ ]+) .* ([^ ]+) +([^ ]+) *$/', $line, $ips)) { - $db['data'][$id]['room'] = $room_list[$i]['room']; - $db['data'][$id]['channel'] = $ips[1]; - $db['data'][$id]['user_profile'] = $ips[2]; - $db['data'][$id]['bridge_profile'] = $ips[3]; - $db['data'][$id]['cidnum'] = $ips[4]; - $db['data'][$id]['mute'] = $ips[5]; - $id++; + if ($ast13) { + if (preg_match('/^([^ ]+) .* ([^ ]+) *$/', $line, $ips)) { + $db['data'][$id]['room'] = $room_list[$i]['room']; + $db['data'][$id]['channel'] = $ips[1]; + $db['data'][$id]['cidnum'] = $ips[2]; + $db['data'][$id]['mute'] = 'No'; + $db['data'][$id]['user_profile'] = ''; + $db['data'][$id]['bridge_profile'] = ''; + unset($ips); + if (preg_match('/^([^ ]+) +([AMWEmw]+) +([^ ]+) +([^ ]+).*$/', $line, $ips)) { + if (strpos($ips[2], 'm') !== FALSE) { + $db['data'][$id]['mute'] = 'Yes'; + } + $db['data'][$id]['user_profile'] = $ips[3]; + $db['data'][$id]['bridge_profile'] = $ips[4]; + } elseif (preg_match('/^([^ ]+) +([^ ]+) +([^ ]+).*$/', $line, $ips)) { + $db['data'][$id]['user_profile'] = $ips[2]; + $db['data'][$id]['bridge_profile'] = $ips[3]; + } + $id++; + } + } else { + if (preg_match('/^([^ ]+) +([^ ]+) +([^ ]+) .* ([^ ]+) +([^ ]+) *$/', $line, $ips)) { + $db['data'][$id]['room'] = $room_list[$i]['room']; + $db['data'][$id]['channel'] = $ips[1]; + $db['data'][$id]['user_profile'] = $ips[2]; + $db['data'][$id]['bridge_profile'] = $ips[3]; + $db['data'][$id]['cidnum'] = $ips[4]; + $db['data'][$id]['mute'] = $ips[5]; + $id++; + } } } } @@ -305,7 +334,7 @@ </td></tr> </table> <?php - if ($isASTERISKv1_x) { + if (getDOTtuple($ASTERISKversion, 1) == 1) { $room_list = NULL; $db = NULL; } else { @@ -365,7 +394,7 @@ putHtml("</tr>"); putHtml("</table>"); } - if ($isASTERISKv1_x) { + if (getDOTtuple($ASTERISKversion, 1) == 1) { putHtml('<p style="color: red;">ConfBridge is not available, Asterisk 10 or later is required.</p>'); } elseif (count($room_list) == 0) { putHtml('<p>No active ConfBridge conferences.</p>'); Modified: branches/1.0/package/webinterface/altweb/common/license-astlinux.txt =================================================================== --- branches/1.0/package/webinterface/altweb/common/license-astlinux.txt 2015-01-05 22:15:42 UTC (rev 6909) +++ branches/1.0/package/webinterface/altweb/common/license-astlinux.txt 2015-01-06 16:48:26 UTC (rev 6910) @@ -1,4 +1,4 @@ -AstLinux is Copyright (c) 2004-2014 by Kristian Kielhofner. +AstLinux is Copyright (c) 2004-2015 by Kristian Kielhofner. 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 Modified: branches/1.0/package/webinterface/altweb/common/license-packages.txt =================================================================== --- branches/1.0/package/webinterface/altweb/common/license-packages.txt 2015-01-05 22:15:42 UTC (rev 6909) +++ branches/1.0/package/webinterface/altweb/common/license-packages.txt 2015-01-06 16:48:26 UTC (rev 6910) @@ -6,50 +6,50 @@ ## 3) Lines beginning with a '#' are treated as comments ## ex-vi~Copyright (c) 2001-2002 Caldera International Inc. All rights reserved. -RUNNIX~Copyright (c) 2006-2014 by Kristian Kielhofner. -libSRTP~Copyright (c) 2001-2014 Cisco Systems, Inc. All rights reserved. +RUNNIX~Copyright (c) 2006-2015 by Kristian Kielhofner. +libSRTP~Copyright (c) 2001-2015 Cisco Systems, Inc. All rights reserved. iLBC CODEC~Copyright (c) 2011 The WebRTC project authors. All rights reserved. -Web Interface~Copyright (c) 2008-2014 Lonnie Abelbeck. +Web Interface~Copyright (c) 2008-2015 Lonnie Abelbeck. shellinabox~Copyright (c) 2008-2010 Markus Gutschke. -Asterisk~Copyright (c) 1999-2014 Digium, Inc. -DAHDI~Copyright (c) 2001-2014 Digium, Inc. -libPRI~Copyright (c) 2001-2014 Digium, Inc. -Arno's Firewall~Copyright (c) 2001-2014 by Arno van Amersfoort. -dnsmasq~Copyright (c) 2000-2014 Simon Kelley. -OpenSSL~Copyright (c) 1998-2014 The OpenSSL Project. All rights reserved. -OpenSSH~Copyright (c) 1995-2014 Tatu Ylonen <yl...@cs...>, Espoo, Finland. All rights reserved. -OpenVPN~Copyright (c) 2002-2014 OpenVPN Technologies, Inc. <sa...@op...> -PHP~Copyright (c) 1999-2014 The PHP Group. All rights reserved. -ntpd~Copyright (c) 1992-2009 David L. Mills. +Asterisk~Copyright (c) 1999-2015 Digium, Inc. +DAHDI~Copyright (c) 2001-2015 Digium, Inc. +libPRI~Copyright (c) 2001-2015 Digium, Inc. +Arno's Firewall~Copyright (c) 2001-2015 by Arno van Amersfoort. +dnsmasq~Copyright (c) 2000-2015 Simon Kelley. +OpenSSL~Copyright (c) 1998-2015 The OpenSSL Project. All rights reserved. +OpenSSH~Copyright (c) 1995-2015 Tatu Ylonen <yl...@cs...>, Espoo, Finland. All rights reserved. +OpenVPN~Copyright (c) 2002-2015 OpenVPN Technologies, Inc. <sa...@op...> +PHP~Copyright (c) 1999-2015 The PHP Group. All rights reserved. +ntpd~Copyright (c) 1992-2015 David L. Mills. vsftpd~Copyright (c) 2001-2013 Daniel Jacobowitz. <da...@de...> -lighttpd~Copyright (c) 2004-2014, Jan Kneschke. -radvd~Copyright (c) 1996-2014 by Reuben Hawkins, et al. -msmtp~Copyright (c) 2000-2014 Martin Lambers <ma...@ma...> +lighttpd~Copyright (c) 2004-2015, Jan Kneschke. +radvd~Copyright (c) 1996-2015 by Reuben Hawkins, et al. +msmtp~Copyright (c) 2000-2015 Martin Lambers <ma...@ma...> libxml2~Copyright (c) 1998-2012 Daniel Veillard. All Rights Reserved. libtiff~Copyright (c) 1988-1997 Sam Leffler, Copyright (c) 1991-1997 Silicon Graphics, Inc. libjpeg~Copyright (c) 1991-2014, Thomas G. Lane, Guido Vollbeding. iptables~Copyright (c) 2000-2013 by the netfilter coreteam <cor...@ne...> -curl~Copyright (c) 1996-2014 Daniel Stenberg, <da...@ha...>. +curl~Copyright (c) 1996-2015 Daniel Stenberg, <da...@ha...>. mDNS~Copyright (c) 2002-2004 Apple Computer, Inc. All rights reserved. rp-pppoe~Copyright (c) 2001-2012 Roaring Penguin Software Inc. -zabbix~Copyright (c) 2000-2014 SIA Zabbix. +zabbix~Copyright (c) 2000-2015 SIA Zabbix. zlib~Copyright (c) 1995-2013 Jean-loup Gailly. SILK CODEC~Copyright (c) 2010-2012 Skype and/or Microsoft. All rights reserved. Licensed via Digium, Inc. -SpanDSP~Copyright (c) 2003-2014 Steve Underwood <st...@co...>. All rights reserved. -Prosody~Copyright (c) 2008-2014 Matthew Wild and Waqas Hussain. +SpanDSP~Copyright (c) 2003-2015 Steve Underwood <st...@co...>. All rights reserved. +Prosody~Copyright (c) 2008-2015 Matthew Wild and Waqas Hussain. clix~Copyright (c) 2008-2013 Matthew Wild. Lua~Copyright (c) 1994-2012 Lua.org, PUC-Rio. All rights reserved. perl~Copyright (c) 1987-2013 by Larry Wall, et al. phpliteadmin~Copyright (c) 2011-2013 phpLiteAdmin (http://phpliteadmin.googlecode.com) -FOP2~Copyright (c) 2009-2014 House Internet S.R.L. (http://www.fop2.com) +FOP2~Copyright (c) 2009-2015 House Internet S.R.L. (http://www.fop2.com) ddclient~Copyright (c) 1999-2013 Paul Burry, wimpunk, et al. vCard converter~Copyright (c) 2006-2013 Thomas Bruederli <th...@br...> -OpenLDAP~Copyright (c) 1998-2014 The OpenLDAP Foundation. All rights reserved. -darkstat~Copyright (c) 2001-2014 Emil Mikulic, et al. +OpenLDAP~Copyright (c) 1998-2015 The OpenLDAP Foundation. All rights reserved. +darkstat~Copyright (c) 2001-2015 Emil Mikulic, et al. NUT~Copyright (c) 1999-2013 Russell Kroll, Arnaud Quette, et al. iftop~Copyright (c) 2002-2014 Paul Warren, Chris Lightfoot, et al. -dnscrypt-proxy~Copyright (c) 2011-2014 Frank Denis -libsodium~Copyright (c) 2013-2014 Frank Denis -phoneprov-tools~Copyright (c) 2014 Lonnie Abelbeck and Michael Keuter. -smartmontools~Copyright (c) 2002-2014, Bruce Allen, Christian Franke, et al. -Monit~Copyright (c) 2001-2014, Tildeslash. All rights reserved +dnscrypt-proxy~Copyright (c) 2011-2015 Frank Denis +libsodium~Copyright (c) 2013-2015 Frank Denis +phoneprov-tools~Copyright (c) 2015 Lonnie Abelbeck and Michael Keuter. +smartmontools~Copyright (c) 2002-2015, Bruce Allen, Christian Franke, et al. +Monit~Copyright (c) 2001-2015, Tildeslash. All rights reserved This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |