OpenWrt Forum Archive

Topic: FreeSWITCH package

The content of this topic has been archived between 30 Mar 2018 and 29 Apr 2018. Unfortunately there are posts – most likely complete pages – missing.

I am under 12.09-rc1 which was working so well, I never bothered t update.

Whats your question?

INSTALLING FREESWITCH & FUSIONPBX ON DOCKSTAR


I just installed FreeSwitch to current stable OpenWRT release Attitude Adjustment 12.09 on Seagate Dockstar (Kirkwood CPU) laying around unused for sometime, and then installed FusionPBX to it - the advanced FreeSwitch WebUI Config Tool.

Original bootloader was replaced with moded Doozan's Uboot installed on Dockstar's flash from a PC via SSH using Putty, and its env params modified via Netconsole to allow boot from a multi-volume Thumb without opening the device's case for JTAG or Serial hack. I mostly followed Mazilo's Guide on Installing OpenWRT (Kirkwood build) on a USB Thumb hooked to Dockstar, while its original firmware on flash was left intact. Finally Gerrit's Guide Installing FreeSwitch & FusionPBX on OpenWRT was used with some changes due to latest FusionPBX release (Rev 5666 at the moment) from SVN:

- opkg update                 - run before installing anything;
- proceed step-by-step with installing and configuring FusionPBX, PHP and FreeSwitch modules with above Gerrit's Guide;
- the step ln –s /usr/bin/php-cli /usr/bin/php is not needed;
- install more required extras (you may need to install more packages later depending on your PBX tasks scope):
         opkg install zoneinfo-core zoneinfo-northamerica
         opkg install php5-mod-json
- using vi text editor, append to /etc/config/uhttpd an extra set of FusionPBX params from this Mazilo's post   (or from Gerrit's Guide instead - they're the same, except FusionPBX installation dir);
- if using uhttpd with multiple package roots (i.e. Luci and FusionPBX are installed in different OpenWRT dirs), ensure in /etc/php.ini parameter 'doc_root ='    has empty value;
- run /etc/init.d/uhttpd stop
       /etc/init.d/uhttpd start
- load OpenWRT webpage at http://device_IP/ in a PC web browser, login and "Enable" php5-fastcgi and freeswitch daemons to run at startup on System-Startup-Initscripts page;
- login to FusionPBX WebUI at http://device_IP:81/ and do initial setup & install;
- once completed, start browsing WebUI options (they reflect default FreeSwitch settings upon its install) and proceed with configuring FreeSwitch via it;


Troubleshooting:
- if you made an error during initial WebUI Setup, can't login into it ("wrong password") or unable to see its options (empty page), you can fully reset FusionPBX - just delete the files (your chosen DB location may vary, and custom settings will be lost unless backed up):
      /usr/share/fusionpbx/resources/config.php
      /usr/share/fusionpbx/secure/fusionpbx.db     (optional)
Then re-open WebUI page at http://device_IP:81/ and redo the initial setup;
- if there're other login errors ("No input file specified", "Fatal error...", etc.):
      SSH to Dockstar with Putty, and run top and ps utilities to check if all required processes are running;
      open Logout page in a browser http://device_IP:81/logout.php, then re-login to FusionPBX WebUI;
- if you hear audio artifacts in recorded calls or voicemail, use faster USB3.0 Thumbs, and record phone calls & voicemail to an EXT4 formatted volume (switch journaling Off). Place OpenWRT boot files on EXT2 Thumb's volume, don't use EXT3;
- Also avoid real time voice transcoding, record calls in WAV. Processing encrypted calls by FreeSwitch may increase CPU load.


Installing FreeSwitch with FusionPBX WebUI to OpenWRT on any other small form-factor device or router is similar. Placing PBX on Dockstar behind a restricted cone router improves security, especially if you don't forward any ports and neither use DMZ. smile


Extras:
- install Kamailio as a SIP proxy server configured via its Siremis WebUI for extra PBX security, so that your entire PBX with all clients is facing the world via a single IP:Port;
- install Midnight Commander for convenient directory browsing and text editing via SSH:
         opkg mc_4.7.5.3-2
If using Putty for SSH login from PC, select "Use font encoding" in Window-Translation-Remote Character Set, and choose Terminal 11-point font with ClearType in Window-Appearance for correct line drawing and nice looking text in MC;
- install htop for better processes control;
- add Linux SWAP volume or file to your Thumb, and swapon it in OpenWRT. Add it to Fstab for automount at each reboot, or install block-mount.


Enjoy your PBX! smile

(Last edited by zamarac25 on 4 Apr 2014, 18:51)

Excellent!

Has anyone tested the latest package on 14.07?
I configured a TL-WR1043ND last night with block-mount (ext4 and swap) and figured out how to install everything, but then ended up with an error trying to launch FreeSWITCH. I'll post the error tonight when I'm back from work, just curious if anyone else has had any luck.

Here's where it errors out. Am I doing something wrong, or is there an issue with the current build?

root@OpenWrt:/# freeswitch 
2015-01-28 23:32:01.720084 [INFO] switch_event.c:670 Activate Eventing Engine.
2015-01-28 23:32:01.722079 [WARNING] switch_event.c:652 Create additional event dispatch thread 0
Cannot Initialize [[error near line 1016]: unclosed <!--]
root@OpenWrt:/# opkg list-installed | grep free
freeswitch - 1.5.13b-5173471
freeswitch-collection-minimal - 1.5.13b-5173471
freeswitch-config-minimal - 1.5.13b-5173471
freeswitch-example-config - 1.5.13b-5173471
freeswitch-mod-cdr-csv - 1.5.13b-5173471
freeswitch-mod-codec2 - 1.5.13b-5173471
freeswitch-mod-commands - 1.5.13b-5173471
freeswitch-mod-dialplan-xml - 1.5.13b-5173471
freeswitch-mod-dptools - 1.5.13b-5173471
freeswitch-mod-event-socket - 1.5.13b-5173471
freeswitch-mod-hash - 1.5.13b-5173471
freeswitch-mod-local-stream - 1.5.13b-5173471
freeswitch-mod-logfile - 1.5.13b-5173471
freeswitch-mod-loopback - 1.5.13b-5173471
freeswitch-mod-lua - 1.5.13b-5173471
freeswitch-mod-say-en - 1.5.13b-5173471
freeswitch-mod-sndfile - 1.5.13b-5173471
freeswitch-mod-sofia - 1.5.13b-5173471
freeswitch-mod-syslog - 1.5.13b-5173471
freeswitch-mod-tone-stream - 1.5.13b-5173471
freeswitch-mod-valet-parking - 1.5.13b-5173471
freeswitch-mod-voicemail - 1.5.13b-5173471
freeswitch-mod-xml-cdr - 1.5.13b-5173471
freeswitch-sounds-en-08KHz - 1.5.13b-5173471
freeswitch-sounds-moh-08KHz - 1.5.13b-5173471
freeswitch-tools - 1.5.13b-5173471

Well, that was quite an easy fix.

/etc/freeswitch/autoload_configs/sofia.conf.xml

Line 216
--- <!-- Send an OPTIONS packet to NATed registered endpoints. Can be 'true' or 'udp-only
+++ <!-- Send an OPTIONS packet to NATed registered endpoints. Can be 'true' or 'udp-only -->

EDIT:
P.S. Great work on maintaining this package guys. I can't believe the size of the Makefile! That must taken a tonne of work!

(Last edited by KillaB on 29 Jan 2015, 00:53)

OFFTOPIC: just started researching freeswitch, are there any good online guides for transitioning from * to freeswitch?

currently trying to build this on a raspberry pi, pi 2 and a pogo plug.

doing a make menuconfig for all relevant packages, and building,

hecatae wrote:

currently trying to build this on a raspberry pi, pi 2 and a pogo plug.

doing a make menuconfig for all relevant packages, and building,

I hope you have better luck than I did. I suspect that Mazi Lo (FreeSWITCH package maintainer) is on vacation as there haven't been any updates since April 23rd.
https://github.com/openwrt/telephony/co … freeswitch

I tested both 15.05 RC x86 builds in VirtualBox tonight and they also failed with the Aborted message when trying to run FreeSWITCH. I then installed 15.05-rc2 and changed the telephony line in opkg.conf to point to the 14.07 download branch, however the FreeSWITCH packages appear to be missing for the x86 target. Next, I plan to try the same approach on the WNDR3700v4 since the pre-built packages do exist for the ar71xx target. At least the 14.07 package set works.

I really hope Mazi or one of the other devs can update to FreeSWITCH 1.5-final so it can be tested in trunk and/or revert the for-15.05 package to the same revision used in 14.07.

(Last edited by KillaB on 25 Jun 2015, 03:58)

I am aware of the current FS compilation issues.

About three days ago, I noticed FS failed to compile on most platforms with an issue on mod-erlang-event. However, since the erlang package got updated recently (on 6/23/15), I noticed this problem resolved itself. Now, another problem has creep up and it looks like related to libs/apr (probably old problem).

Right now, my immediate concern is trying to get my computer to successfully compile OpenWRT toolchains which fails @ GCC final stage when using the default musl. I am hoping to be able to fix this issue in a few days. Failing that, I will revert to uClibc and see what happens with the libs/apr issue.

KillaB wrote:
hecatae wrote:

currently trying to build this on a raspberry pi, pi 2 and a pogo plug.

doing a make menuconfig for all relevant packages, and building,

I hope you have better luck than I did. I suspect that Mazi Lo (FreeSWITCH package maintainer) is on vacation as there haven't been any updates since April 23rd.
https://github.com/openwrt/telephony/co … freeswitch

compiling freeswitch in a openwrt build fails due to a certificate issue

hecatae wrote:

compiling freeswitch in a openwrt build fails due to a certificate issue

Yes, I ran into this same issue.

For those curious I just loaded 15.05-rc1 onto my WNDR3700v4 and then edited opkg.conf to point to the barrier_breaker repo (telephony only).

#option check_signature 0
src/gz chaos_calmer_base http://downloads.openwrt.org/chaos_calmer/15.05-rc1/ar71xx/nand/packages/base
src/gz chaos_calmer_luci http://downloads.openwrt.org/chaos_calmer/15.05-rc1/ar71xx/nand/packages/luci
src/gz chaos_calmer_packages http://downloads.openwrt.org/chaos_calmer/15.05-rc1/ar71xx/nand/packages/packages
src/gz chaos_calmer_routing http://downloads.openwrt.org/chaos_calmer/15.05-rc1/ar71xx/nand/packages/routing
src/gz chaos_calmer_telephony http://downloads.openwrt.org/barrier_breaker/14.07/ar71xx/nand/packages/telephony
src/gz chaos_calmer_management http://downloads.openwrt.org/chaos_calmer/15.05-rc1/ar71xx/nand/packages/management
#src/gz chaos_calmer_targets http://downloads.openwrt.org/chaos_calmer/15.05-rc1/ar71xx/nand/packages/targets

FreeSWITCH installed without error and appears to load without error (after moving a perl lib and fixing sofia.conf.xml):

cp /usr/lib/perl5/5.20/CORE/libperl.so /lib/

vi /etc/freeswitch/autoload_configs/sofia.conf.xml
Line 215
--- <!-- Send an OPTIONS packet to NATed registered endpoints. Can be 'true' or 'udp-only
+++ <!-- Send an OPTIONS packet to NATed registered endpoints. Can be 'true' or 'udp-only' -->

(Last edited by KillaB on 9 Jul 2015, 00:23)

HI Guys,

Thanks for this forum and I was able to install 14.04 version of freeswitch on 15.05 following your info. However, once I did "/etc/init.d/freeswitch enable", freeswitch doesn't get run when router reboots, even though I see "/etc/rc.d/S90freeswitch" existed.


Is there any other place that I have to modify to make freeswitch boot from power up? I used to have this on 12.09 and previous version and I don't recall having this problem.

I can, however, use rc.local with "/etc/init.d/freeswitch start" to get it run at boot.

thanks in advance.

Peng

(Last edited by openwrt@f2f10.com on 17 Sep 2015, 11:17)

Looks like it didn't make it into Chaos Calmer stable nor trunk yet.
Now that there's a general ISDN->VoIP transition in Germany there should be much more demand and interest for FreeSwitch.

Do you plan to revive the project for the next stable release?

HectoPascal wrote:

Looks like it didn't make it into Chaos Calmer stable nor trunk yet.

It may not compile for the moment. Package definition is present in trunk.
Its split into many modules, some of them do not compile.
You can build from source removing problematic modules

The discussion might have continued from here.