[Pkg-voip-commits] r3386 - in freepbx/trunk/debian: . patches
Diego Iastrubni
elcuco-guest at alioth.debian.org
Thu Apr 12 12:21:24 UTC 2007
Author: elcuco-guest
Date: 2007-04-12 12:21:23 +0000 (Thu, 12 Apr 2007)
New Revision: 3386
Modified:
freepbx/trunk/debian/changelog
freepbx/trunk/debian/patches/fix-module_admin.dpatch
Log:
Fix for upstream http://www.freepbx.org/trac/ticket/1899
When trying to query for the version of asterisk and no manager
connection is available, ask asterisk directly via the console, about the
version (closes upstream 1899, using changest http://www.freepbx.org/trac/changeset/3572)
After this patch, it is possible to install freepbx (using sqlite3 at least) in a chroot:
debtoostrap
chroot
apt-get install freepbx-sqlite3 freepbx
Some parts of this patch are from freepbx's trunk and some will be part of 2.2.2. Ok, lets get all this patch into 2.2.2.
Modified: freepbx/trunk/debian/changelog
===================================================================
--- freepbx/trunk/debian/changelog 2007-04-11 22:14:42 UTC (rev 3385)
+++ freepbx/trunk/debian/changelog 2007-04-12 12:21:23 UTC (rev 3386)
@@ -5,21 +5,23 @@
[ Diego Iastrubni ]
* New upstream release
* SQLite2 is deprecated, SQLite3 and MySQL are supported.
- * Source cleanup: ari and op-panel are no longer on the source tree
+ * Source cleanup: ari and op-panel are no longer on the source tree
(same for cdr code which is not free by dfsg)
* Removed obsolete updates from 1.0.10
* asterisk-sounds-moh-freepbx: files are now *.sln, packaged by upstream
* freepbx-common: renamed freepbx-admin
- * freepbx-admin: apply_conf.sh is now called /usr/sbin/update-freepbx
+ * freepbx-common: apply_conf.sh is now called /usr/sbin/update-freepbx
* freepbx-mysql, freepbx-sqlite3: support for sql "servers" has been
put in separate packages. One package is needed for the configuration.
+ * freepbx-common: fixed patch for module_admin, now it also fixes upstream 1899).
+ Now it is possible to install freepbx-sqlite3 in chroot
[ Chris Halls ]
* Remove fix-recordings.patch - already fixed in a different way upstream
* Remove redundant debconf calls in pre/postinst scripts. Prevents hang
when restarting op-panel from freepbx-panel
- -- Chris Halls <halls at debian.org> Thu, 8 Mar 2007 17:07:33 +0000
+ -- Diego Iastrubni <diego.iastrubni at xorcom.com> Thu, 12 Apr 2007 15:20:43 +0300
freepbx (2.2.0~dfsg-1) UNRELEASED; urgency=low
Modified: freepbx/trunk/debian/patches/fix-module_admin.dpatch
===================================================================
--- freepbx/trunk/debian/patches/fix-module_admin.dpatch 2007-04-11 22:14:42 UTC (rev 3385)
+++ freepbx/trunk/debian/patches/fix-module_admin.dpatch 2007-04-12 12:21:23 UTC (rev 3386)
@@ -3,11 +3,14 @@
##
## DP: Create a connection to the manager in the module_admin
## DP: work around buggy freepbx-modules uninstall script (closes upstream 1731)
+## DP: Howver, when trying to query for the version of asterisk and no manager
+## DP: connection is available, ask asterisk directly via the console, about the
+## DP: version (closes upstream 1899, using changest http://www.freepbx.org/trac/changeset/3572)
@DPATCH@
diff -urNad freepbx-2.2.1~dfsg~/amp_conf/bin/module_admin freepbx-2.2.1~dfsg/amp_conf/bin/module_admin
--- freepbx-2.2.1~dfsg~/amp_conf/bin/module_admin 2007-01-31 10:18:14.000000000 +0200
-+++ freepbx-2.2.1~dfsg/amp_conf/bin/module_admin 2007-03-08 11:45:40.000000000 +0200
++++ freepbx-2.2.1~dfsg/amp_conf/bin/module_admin 2007-04-12 14:55:08.000000000 +0300
@@ -52,7 +52,7 @@
}
@@ -31,7 +34,7 @@
+ $astman= new AGI_AsteriskManager();
+ if (! $res = $astman->connect("127.0.0.1", $amp_conf["AMPMGRUSER"] , $amp_conf["AMPMGRPASS"])) {
-+ unset( $astman );
++ $astman = null;
+ }
+
// connect to database
@@ -46,3 +49,32 @@
switch ($operation ) {
case 'list':
+diff -urNad freepbx-2.2.1~dfsg~/amp_conf/htdocs/admin/functions.inc.php freepbx-2.2.1~dfsg/amp_conf/htdocs/admin/functions.inc.php
+--- freepbx-2.2.1~dfsg~/amp_conf/htdocs/admin/functions.inc.php 2007-01-17 09:56:52.000000000 +0200
++++ freepbx-2.2.1~dfsg/amp_conf/htdocs/admin/functions.inc.php 2007-04-12 14:57:00.000000000 +0300
+@@ -180,13 +180,13 @@
+
+ switch ($amp_conf['AMPENGINE']) {
+ case 'asterisk':
+- if ($astman) {
++ if (isset($astman) && $astman->connected()) {
+ //get version
+ $response = $astman->send_request('Command', array('Command'=>'show version'));
+ $verinfo = $response['data'];
+ } else {
+- // could not connect to asterisk manager
+- return array('engine'=>'ERROR-UNABLE-TO-CONNECT', 'version'=>'0', 'additional' => '0');
++ // could not connect to asterisk manager, try console
++ $verinfo = exec('/usr/sbin/asterisk -V');
+ }
+
+ if (preg_match('/Asterisk SVN.+/', $verinfo)) {
+@@ -195,6 +195,8 @@
+ if (preg_match('/Asterisk (\d+(\.\d+)*)(-?(\S*))/', $verinfo, $matches)) {
+ return array('engine'=>'asterisk', 'version' => $matches[1], 'additional' => $matches[4]);
+ }
++
++ return array('engine'=>'ERROR-UNABLE-TO-CONNECT', 'version'=>'0', 'additional' => '0');
+ break;
+ }
+ return array('engine'=>'ERROR-UNSUPPORTED-ENGINE-'.$amp_conf['AMPENGINE'], 'version'=>'0', 'additional' => '0');
More information about the Pkg-voip-commits
mailing list