Project

General

Profile

Feature #617

FreeSWITCH 1.0.6 Tracking bug

Added by maniro about 10 years ago. Updated over 9 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
08/23/2010
Due date:
% Done:

0%


Description

Details for building the RPM and installing FreeSWITCH for Amahi

freeswitch-amahi.spec - first spec file (928 Bytes) maniro, 08/23/2010 06:34 PM

download-freeswitch (1.72 KB) maniro, 08/25/2010 05:06 PM

download-freeswitch (1.72 KB) maniro, 08/25/2010 05:08 PM

download-freeswitch-amahi (2.16 KB) maniro, 08/25/2010 07:03 PM

History

#1 Updated by maniro about 10 years ago

Testing and building using the Amahi Express CD Install:

Following info from the following:
http://www.ibm.com/developerworks/library/l-rpm1/
yum install required lists off www.freeswitch.org, www.fusionpbx.com, and the bot in #freeswitch on FreeNode when you type "~whatis redhat_rpms" in the channel. I have taken 3 lists and combined them. This gives a FreeSWITCH with the most features. (Why do it half-ass, eh?) This will be pruned later for actual things need to run FreeSWITCH vs building the rpm or compiling.

1. login as root
2. in ~,

yum -y installs subversion autoconf automake libtool gcc-c++ ncurses-devel make expat-devel zlib zlib-devel nano unixODBC-devel openssl-devel gnutls-devel libogg-devel libvorbis-devel curl-devel db4-devel gdbm-devel wget  libjpeg-devel rpmdevtools <- should be unneeded if I create a proper .spec file.
rpmdev-setuptree
rpmdev-newspec rpmbuild/SPEC/freeswitch.spec
cd rpmbuild/SOURCES
wget http://files.freeswitch.org/freeswitch-1.0.6.tar.gz
cd ..

-will followup after I create spec file and it will be attached here.

#2 Updated by maniro about 10 years ago

attached spec file

dont use this was a crap file. will update to a nice proper when after some testing.

#3 Updated by maniro about 10 years ago

Below commands install fusionpbx to /usr/local/freeswitch as per http://wiki.freeswitch.org/wiki/Installation_Guide . This does not install many of the 'extras' that you may want. There are other lists of required RPMs on FusionPBX and from FreeSWITCH's IRC channel but this is what worked for me. I also did this as root to 'try' it out and I know that isn't the safest or recommended; but it does work.

$ yum install subversion autoconf automake libtool gcc-c++ ncurses-devel make
$ wget http://files.freeswitch.org/freeswitch-1.0.6.tar.gz
$ tar xvfz freeswitch-1.0.6.tar.gz
$ cd freeswitch
$ ./configure
$ make
$ make install

If you do this as root, you need to make apache own the files so FusionPBX can write the configs etc.

$ chown -R apache /usr/local/freeswitch

Since this is likely running as root if you were lazy like me, you likely need to change the persmission of /var/hda/web-apps/fusionpbx because FreeSWITCH needs access to those files too. (This should be tweaked!)

$ chmod -R 777 /var/hda/web-apps/fusionpbx

Run freeswitch from the command line.
$ ./usr/local/freeswitch/bin/freeswitch

Once FreeSWITCH is running, you can install FusionPBX. I have successfully registered both an extension (snom 300) and to an ITSP (voip.ms) with this config. As I am new to FusionPBX and FreeSWITCH, I believe my dialplan is not correct.

#4 Updated by maniro about 10 years ago

Here is the rpms as per c888 in #freeswitch

~whatis redhat_rpms
yum -y install unixODBC-devel gcc-c++ autoconf automake db4-devel gdbm-devel ncurses-devel wget e2fsprogs-devel e2fsprogs libtool libjpeg-devel

Here is from the FusionPBX wiki ( http://wiki.fusionpbx.com/index.php/Centos_Install )

Basic:
yum install subversion autoconf automake libtool gcc-c++ ncurses-devel make expat-devel zlib zlib-devel
Extra modules:
yum install nano unixODBC-devel openssl-devel gnutls-devel libogg-devel libvorbis-devel curl-devel

And from git source
$ yum -y intstall unixODBC-devel gcc-C++ autoconf automake db4-devel gdbm-devel ncurses-devel wget e2fsprogs-devel e2fsprogs libtool libjpeg-devel
$ yum -y install git # I don't see it above?
$ cd /usr/src
$ git clone git://freeswitch.org/freeswitch.git
$ cd /usr/src/freeswitch
$ ./bootstrap.sh
$ ./configure
$ make install
$ make cd-sounds-install
$ make cd-moh-install

#5 Updated by maniro about 10 years ago

Some more notes:

to run freeswitch in the background, use the option -nc

the option -stop will stop it from running in the background

Todo: get it running this way under apache username or share the same group at least for persmissions on files. we can add to apache cron during install with one-click installs so that might be best however.

#6 Updated by maniro about 10 years ago

Forget all above.

RPM built using OSBS (openSUSE Build Service), it is currently attempting to build armv5el as well.

http://download.opensuse.org/repositories/home:/nlasch/Fedora_12/i386/

Please help test!

#7 Updated by maniro about 10 years ago

rpm -Uvh says I need redhat-rpm-config.

$ yum install -y redhat-rpm-config

I'm the one who added that to the Requires: in the spec so this could be erroneous. (OSBS told me I should do it!) Will attempt rebuild later to verify this.

Also, it built rpms that I don't think have any use. Anything that used CELT, Perl, or Python probably don't have anything usuable in them (maybe .conf?). Will investigate.

After this, I could install the rpms as root. Will have to investigate a little further. I think I should change the spec file to install all to /var/hda/apps. This should allow apache to install with current permission.

The rpm also is supposed to add freeswitch to init.d -> do we want this?

#8 Updated by cpg about 10 years ago

i see no reason it should be needed.

but maybe it needs /usr/lib/rpm/redhat/brp-compress
/usr/lib/rpm/redhat/brp-implant-ident-static
/usr/lib/rpm/redhat/brp-java-repack-jars
/usr/lib/rpm/redhat/brp-python-hardlink
/usr/lib/rpm/redhat/brp-redhat
/usr/lib/rpm/redhat/brp-sparc64-linux
/usr/lib/rpm/redhat/brp-strip
/usr/lib/rpm/redhat/brp-strip-comment-note
/usr/lib/rpm/redhat/brp-strip-shared
/usr/lib/rpm/redhat/brp-strip-static-archive

#9 Updated by maniro about 10 years ago

wget script for downloading rpms above.

#10 Updated by maniro about 10 years ago

cpg wrote:

i see no reason it should be needed.

but maybe it needs /usr/lib/rpm/redhat/brp-compress
/usr/lib/rpm/redhat/brp-implant-ident-static
/usr/lib/rpm/redhat/brp-java-repack-jars
/usr/lib/rpm/redhat/brp-python-hardlink
/usr/lib/rpm/redhat/brp-redhat
/usr/lib/rpm/redhat/brp-sparc64-linux
/usr/lib/rpm/redhat/brp-strip
/usr/lib/rpm/redhat/brp-strip-comment-note
/usr/lib/rpm/redhat/brp-strip-shared
/usr/lib/rpm/redhat/brp-strip-static-archive

I didn't get those reqs on my fedora base install but I was trying to compile on that earlier. I am about to install on a virgin Amahi that was installed from the Express CD.

#11 Updated by maniro about 10 years ago

$ yum install -y alsa-lib unixODBC redhat-rpm-config libogg libvorbis

requirements as per a virgin install of Amahi from Express CD.

#12 Updated by maniro about 10 years ago

script to download branch that permissions are for apache,apache of all files and installed to var/hda/apps/freeswitch

this script also has yum install as per above and rpm Uvh freeswitch*

#13 Updated by maniro about 10 years ago

1. Having both source and RPM in download page for app install is no good. One will fail the SHA1 check. When this happens, the web ui just keeps going and doesn't error out. I tried doing this to just install the main RPM (no extras) with FusionPBX and it still failed.

2. Multiple (or even one large) wget or amahi-download line in the install script doesn't work. The script continues while the files are in the process of downloading. Tried wait but no change. Verified by tail -f /var/log/amahi-app-installer.log . Somehow/sometimes, it would get installed fast enough if the file was in the dl-cache. chown fails with permission errors and the service doesn't start.

3. I created a separate FreeSWITCH install app with JUST the main RPM in the download page. This is similar to above when FreeSWITCH installs. Permission problems: chown fails, starting freeswitch fails with runuser and touch /var/lock/subsys/freeswitch fails.

(The RPM correctly registers the service FreeSWITCH and has it start up automatically at startup. Rebooting Amahi does have FreeSWITCH start up correctly.)

4. Please clarify what directory this should to be installed in. We have conflicting information from numerous sources and precedence. Issues and notes below (also regarding possible permissions issues):
a) Sources of confusion: http://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard and http://fedoraproject.org/wiki/Docs/Drafts/DirectoryStructure dictate that /opt is acceptable and /usr/bin is for commands. It should actually be split up into parts and put in the respective /usr directories but that isn't going to happen. It also states /usr/lib/<appname> is acceptable. This is where a default Fedora install puts all of Firefox; go figure.
b) We have current apps in /var/hda/apps (dlna)
c) The default FreeSWITCH .spec uses /opt/freeswitch. This can be changed easily but it would be one more thing to change. If they were to make official RPMs later on (I wish), this is the directory it would be in.
d) OTOH to point c, we currently are using our own .spec anyway for builds due to mod_python, mod_perl, and mod_celt causing build errors on Fedora. I've also disabled termcap from BuildRequires. In addition, we could have the .spec fix the above permission issue.
e) It would be easier to maintain if we left it. Currently, even in the alt build, the init.d for FreeSWITCH points at the wrong directory and would need to be patched.
f) We could use the install script to mv the /opt/freeswitch dir and patch init.d I am thinking we would need to move it back on the uninstall script before it rpm -e the package. This is (IMHO) rather messy and prone to error but would satisfy the need for less changes and be in an alternate directory.
g) We would still need to patch init.d even for running it under apache as it uses freeswitch as it's user when it starts as a service.
h) Installation is successful with rpm --prefix=whatever but /etc/init.d/freeswitch stills needs to be patched.

5. Based on the (incorrect) assumption that we wanted binary apps in /var/hda/apps, I do have an alternate build that installs freeswitch there with apache,apache as the owner. FreeSWITCH and FusionPBX need to write to each other's directories,

#14 Updated by cpg over 9 years ago

  • Priority changed from High to Normal

Also available in: Atom