Koozali.org: home of the SME Server
Obsolete Releases => SME VoIP (Asterisk, SAIL etc) => Topic started by: apmuthu on February 28, 2013, 07:00:33 PM
-
Compiled asterisk and dahdi complete along with libpri from scratch on a freshly yummed SME 8 with all the devel libs.
Since a "make install" does not provide any rpms and entries in the rpm database, SAIL fails to install. Only a "--nodeps" forces it to install.
Extension length in the System -> Globals -> Extension Length menu is not being allowed to be edited even when there are no extensions created.
An earlier post (http://forums.contribs.org/index.php/topic,43496.msg207225.html#msg207225) referred to a template expansion from the SME CLI - is that the preferred method?
The actual error is at line 334 in /opt/sark/php/sarkglobal/view.php where the logic is inverted. Lines 333-340:
$this->myPanel->aLabelFor('extlen');
if ( $extensions ) {
$this->myPanel->selected = $global['EXTLEN'];
$this->myPanel->popUp('EXTLEN', array('3','4'));
}
else {
echo '<input type="text" name="EXTLEN" size="1" style = "background-color: lightgrey" readonly="readonly" id="EXTLEN" value="' . $global['EXTLEN'] . '" />' . PHP_EOL;
}
should be
$this->myPanel->aLabelFor('extlen');
if ( ! $extensions ) {
$this->myPanel->selected = $global['EXTLEN'];
$this->myPanel->popUp('EXTLEN', array('3','4'));
}
else {
echo '<input type="text" name="EXTLEN" size="1" style = "background-color: lightgrey" readonly="readonly" id="EXTLEN" value="' . $global['EXTLEN'] . '" />' . PHP_EOL;
}
This problem appears to have come when code was converted from Perl in SAIL v3.1.1-22 (/opt/sark/www/cgi-bin/sarkglobals.pl) to PHP in SAIL v4.0.0-43 (/opt/sark/php/sarkglobal/view.php) with the "unless" Perl Statement being an inverted logic (http://www.misc-perl-info.com/perl-unless.html) of the PHP's "if" statement. The corresponding lines 914-930 in SAIL v3.1.1-22's /opt/sark/www/cgi-bin/sarkglobals.pl that stands correct are:
print SarkSubs::aLabelFor('extlen');
unless (@Extensions) {
print $q->popup_menu (
-name => 'EXTLEN',
-values => ['3','4'],
-default => $extlen,
-style => "Color: $hashColorDefaults{EXTLEN}",
-size => 1);
}
else {
print $q->textfield (
-name => 'EXTLEN',
-default => $extlen,
-readonly =>'readonly',
-style =>'background-color: lightgrey',
-size => 1);
}
It will hence be pertinent to check all conversions from "unless" to "if" from SAIL v3.1.1 to SAIL 4.0.0.
-
Good work Ap.muthu
Yes, you must use --nodeps if you compile asterisk. Don't think there is any alternative to this.
fixed the bug you spotted in svn
Best
S
-
Attempting to compile Asterisk 1.8 on a fully yummed SME8 resulted in a dahdi-complete issue where the following patch had to be applied to the source before compilation succeeded:
--- drivers/dahdi/xpp/xdefs.h (revision 6837)
+++ drivers/dahdi/xpp/xdefs.h (Working Copy)
@@ -145,10 +145,12 @@
#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
-/* Also don't define this for later RHEL >= 5.2 . hex_asc is from the
- * same linux-2.6-net-infrastructure-updates-to-mac80211-iwl4965.patch
- * as is the bool typedef. */
-#if LINUX_VERSION_CODE != KERNEL_VERSION(2,6,18) || ! defined(hex_asc)
+/* Also don't define this for later RHEL >= 5.2. */
+#if defined(RHEL_RELEASE_CODE) && defined(RHEL_RELEASE_VERSION)
+#if RHEL_RELEASE_CODE < RHEL_RELEASE_VERSION(5, 3)
+typedef int bool;
+#endif
+#else
typedef int bool;
#endif
#endif
SME 8 -> fully yummed -> Build RPMs -> DAHDI/LibPRI/Asterisk Sources Compiled with all options needed (any SAIL minimum that is not in the defaults?) -> SAIL 4 RPMS
Please list the sequence that would be necessary for such an install. Currently I am going in an iterative process - it will save the community a lot of time so that we can concentrate on debugging the actual SAIL code.
SME8 kernel is now on 348 whereas SAIL Asterisk DAHDI rpms are at 308-4 and Digium repos are at 308-24. Hence to get to Asterisk 1.8.20-1 with the safest latest kernel we will need to hand compile the dahdi drivers. Digium does not hand out the kmod-dahdi-linux-fw* src rpms to rebuild them for the newer kernel. Using a fake kernel rpm is one soultion besides the --justdb option.
Fake kernel src spec file:
Summary: dummy kernel-archpackage
Name: kernel-%_host_cpu
Version: 2.6.18
Release: 308.24.1.el5
License: public domain
Group: System Environment/kernel
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
Requires: kernel = %version-%release
%description
Dummy package
%prep
%build
%install
%files
%changelog
* Fri Feb 8 2013 Andrew Ford <A.Ford@ford-mason.co.uk>
- Initial build.