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.

changed the patch against the packages_8.09 branch based on tusc's verson; crash is now solved, improved packaging and scripts: https://dev.openwrt.org/ticket/4891

zandbelt wrote:

changed the patch against the packages_8.09 branch based on tusc's verson; crash is now solved, improved packaging and scripts: https://dev.openwrt.org/ticket/4891

Hans,

Many thanks for the update. I compiled and flashed it on my FON2100. Looks like it runs, except I need to make some necessary changes to its configurations. Here is the output of the execution:

root@OpenWrt:/# /etc/init.d/freeswitch start
Error: stacksize 240 is too large: run ulimit -s 240 or run /usr/bin/freeswitch -waste.                                                                         
auto-adjusting stack size for optimal performance....                           
Cannot open pid file /opt/freeswitch/usr/log/freeswitch.pid.                    
root@OpenWrt:/#
mazilo wrote:

Many thanks for the update. I compiled and flashed it on my FON2100. Looks like it runs, except I need to make some necessary changes to its configurations.

yes, I noticed too; there are some remains of a local setup
just edit /etc/default/freeswitch (and perhaps /etc/init.d/freeswitch) and you should be fine
I will include changes in a next update

Hans.

zandbelt wrote:

updated patch to 1.0.4pre4: https://dev.openwrt.org/ticket/4891

Thanks for the update.

Does anyone notice FreeSwitch source code in a compressed tarred file is a 49+ MB in size and is about 4x asterisk-1.6.x source code in a compressed tarred file. Have a look below:

-rw-r--r-- 1 mazilo users 13198345 2009-04-06 13:55 asterisk-1.6.0.9.tar.gz
-rw-r--r-- 1 mazilo users 51113613 2009-04-14 16:36 freeswitch-1.0.4pre4.tar.gz

It's getting larger as the day goes by!

I finally managed to compile/install/run freeswitch on my FON2100. However, due to limitation of 16MB RAM, feeswitch crashes after a few minutes of running due to increasing logging file size that I configured on /var/log (RAM). Does anyone know if the log can be turned off.

Here is the screen capture on my FON2100 console that shows the process and system crash (in case anyone is interested):

Mem: 12568K used, 936K free, 0K shrd, 352K buff, 2728K cached
CPU:  27% usr  47% sys   0% nice   0% idle   0% io   0% irq  25% softirq
Load average: 3.62 1.12 0.39                                            
  PID  PPID USER     STAT   VSZ %MEM %CPU COMMAND                       
  428   427 root     R    24652 182%  28% /usr/bin/freeswitch -conf /etc/freesw
   76     2 root     SW<      0   0%  25% [mtdblockd]                          
  451   430 root     R    24652 182%  12% /usr/bin/freeswitch -conf /etc/freesw
  485   430 root     R    24652 182%   9% /usr/bin/freeswitch -conf /etc/freesw
  484   430 root     R    24652 182%   8% /usr/bin/freeswitch -conf /etc/freesw
  488   430 root     S    24652 182%   8% /usr/bin/freeswitch -conf /etc/freesw
  448   430 root     S    24652 182%   2% /usr/bin/freeswitch -conf /etc/freesw
  279   275 root     S     1320  10%   2% logger -s -p 6 -t sysinit            
  447   278 root     R     1320  10%   2% top                                  
  440   430 root     S    24652 182%   1% /usr/bin/freeswitch -conf /etc/freesw
  441   430 root     S    24652 182%   1% /usr/bin/freeswitch -conf /etc/freesw
  300     1 root     S     1332  10%   1% syslogd -C16                         
   56     2 root     DW<      0   0%   0% [kswapd0]                            
  470   430 root     S    24652 182%   0% /usr/bin/freeswitch -conf /etc/freesw
  468   430 root     S    24652 182%   0% /usr/bin/freeswitch -conf /etc/freesw
  473   430 root     S    24652 182%   0% /usr/bin/freeswitch -conf /etc/freesw
  474   430 root     S    24652 182%   0% /usr/bin/freeswitch -conf /etc/freesw
  452   430 root     S    24652 182%   0% /usr/bin/freeswitch -conf /etc/freesw
  431   430 root     S    24652 182%   0% /usr/bin/freeswitch -conf /etc/freesw
freeswitch invoked oom-killer: gfp_mask=0x1201d2, order=0, oomkilladj=0c/freesw
Call Trace:[<8006dfa4>] 0x8006dfa4                                             
[<80049488>] 0x80049488                                                        
[<80049488>] 0x80049488                                                        
[<800a44d0>] 0x800a44d0                                                        
[<8008b534>] 0x8008b534                                                        
[<8008cac8>] 0x8008cac8                                                        
[<800a4b7c>] 0x800a4b7c                                                        
[<800a8318>] 0x800a8318                                                        
[<800a7780>] 0x800a7780                                                        
[<800ab0f0>] 0x800ab0f0                                                        
[<800db61c>] 0x800db61c                                                        
[<800ab320>] 0x800ab320                                                        
[<800a0a98>] 0x800a0a98                                                        
[<800a1704>] 0x800a1704                                                        
[<800e0a20>] 0x800e0a20                                                        
[<800b3ec4>] 0x800b3ec4                                                        
[<80067648>] 0x80067648                                                        
[<800b63f4>] 0x800b63f4                                                        
[<80067c08>] 0x80067c08                                                        
[<800560c4>] 0x800560c4                                                        
[<8008b534>] 0x8008b534                                                        
[<8008b534>] 0x8008b534                                                        
[<80067190>] 0x80067190                                                        
[<80067270>] 0x80067270                                                        
[<800e0ef4>] 0x800e0ef4                                                        
[<80049e24>] 0x80049e24                                                        
[<80041420>] 0x80041420                                                        

Mem-Info:
Normal per-cpu:
CPU    0: hi:    0, btch:   1 usd:   0
Active_anon:1120 active_file:3 inactive_anon:1130
 inactive_file:9 dirty:0 writeback:0 unstable:0  
 free:127 slab:574 mapped:0 pagetables:53 bounce:0
Normal free:508kB min:508kB low:632kB high:760kB active_anon:4480kB inactive_anon:4520kB active_file:12kB inactive_file:36kB present:16256kB pages_scanned:9322 all_unreclaimable? no                                                           
lowmem_reserve[]: 0 0                                                           
Normal: 1*4kB 1*8kB 1*16kB 1*32kB 1*64kB 1*128kB 1*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 508kB                                                             
142 total pagecache pages                                                       
0 pages in swap cache                                                           
Swap cache stats: add 0, delete 0, find 0/0                                     
Free swap  = 0kB                                                                
Total swap = 0kB                                                                
4096 pages RAM                                                                  
720 pages reserved                                                              
19 pages shared                                                                 
3109 pages non-shared                                                           
Out of memory: kill process 428 (freeswitch) score 422 or a child               
Killed process 428 (freeswitch)                                                 
S50freeswitch invoked oom-killer: gfp_mask=0x1201d2, order=0, oomkilladj=0      
Call Trace:[<8006dfa4>] 0x8006dfa4                                              
[<80049488>] 0x80049488                                                         
[<80049488>] 0x80049488                                                         
[<800a44d0>] 0x800a44d0                                                         
[<8008b534>] 0x8008b534                                                         
[<8008cac8>] 0x8008cac8                                                         
[<800a4b7c>] 0x800a4b7c                                                         
[<800a8318>] 0x800a8318                                                         
[<800a7fe0>] 0x800a7fe0                                                         
[<800ab0f0>] 0x800ab0f0                                                         
[<800a7fe0>] 0x800a7fe0                                                         
[<800ab320>] 0x800ab320                                                         
[<800a0a98>] 0x800a0a98                                                         
[<800e3b64>] 0x800e3b64                                                         
[<800a1704>] 0x800a1704                                                         
[<80114c78>] 0x80114c78                                                         
[<800b3ec4>] 0x800b3ec4                                                         
[<800b63f4>] 0x800b63f4                                                         
[<8007047c>] 0x8007047c                                                         
[<80240000>] 0x80240000                                                         
[<800560c4>] 0x800560c4                                                         
[<80070970>] 0x80070970                                                         
[<80067c48>] 0x80067c48                                                         
[<80067270>] 0x80067270                                                         
[<80070ca4>] 0x80070ca4                                                         
[<80041420>] 0x80041420                                                         

Mem-Info:
Normal per-cpu:
CPU    0: hi:    0, btch:   1 usd:   0
Active_anon:1120 active_file:3 inactive_anon:1131
 inactive_file:9 dirty:0 writeback:0 unstable:0
 free:127 slab:570 mapped:0 pagetables:53 bounce:0
Normal free:508kB min:508kB low:632kB high:760kB active_anon:4480kB inactive_anon:4524kB active_file:12kB inactive_file:36kB present:16256kB pages_scanned:4826all_unreclaimable? no
lowmem_reserve[]: 0 0
Normal: 1*4kB 1*8kB 1*16kB 1*32kB 1*64kB 1*128kB 1*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 508kB
142 total pagecache pages
0 pages in swap cache
Swap cache stats: add 0, delete 0, find 0/0
Free swap  = 0kB
Total swap = 0kB
4096 pages RAM
720 pages reserved
19 pages shared
3109 pages non-shared
Out of memory: kill process 431 (freeswitch) score 422 or a child
Killed process 431 (freeswitch)
mazilo wrote:
zandbelt wrote:

changed the patch against the packages_8.09 branch based on tusc's verson; crash is now solved, improved packaging and scripts: https://dev.openwrt.org/ticket/4891

Hans,

Many thanks for the update. I compiled and flashed it on my FON2100. Looks like it runs, except I need to make some necessary changes to its configurations. Here is the output of the execution:

root@OpenWrt:/# /etc/init.d/freeswitch start
Error: stacksize 240 is too large: run ulimit -s 240 or run /usr/bin/freeswitch -waste.                                                                         
auto-adjusting stack size for optimal performance....                           
Cannot open pid file /opt/freeswitch/usr/log/freeswitch.pid.                    
root@OpenWrt:/#

If you will set ulimit -s 240 before you start FreeSWITCH it will be fine.  Also any patches or changes you think we need please report them to http://jira.freeswitch.org

Thanks,
Brian West
brian@freeswitch.org
http://www.cluecon.com

mazilo wrote:
zandbelt wrote:

updated patch to 1.0.4pre4: https://dev.openwrt.org/ticket/4891

Thanks for the update.

Does anyone notice FreeSwitch source code in a compressed tarred file is a 49+ MB in size and is about 4x asterisk-1.6.x source code in a compressed tarred file. Have a look below:

-rw-r--r-- 1 mazilo users 13198345 2009-04-06 13:55 asterisk-1.6.0.9.tar.gz
-rw-r--r-- 1 mazilo users 51113613 2009-04-14 16:36 freeswitch-1.0.4pre4.tar.gz

It's getting larger as the day goes by!

You also have to realize for stability we bring many of our own dependancies with us.  For example you can't trust the system libs for apr, sqlite, sofia and may more due to the fact we are on unreleased or bleeding edge releases with custom patches pending upstream integration so to limit the bug reports and various headaches associated with that we choose to bring with everything that is needed.

Thanks,
Brian West
FreeSWITCH.org
http://www.freeswitch.org

mazilo wrote:

I finally managed to compile/install/run freeswitch on my FON2100. However, due to limitation of 16MB RAM, feeswitch crashes after a few minutes of running due to increasing logging file size that I configured on /var/log (RAM). Does anyone know if the log can be turned off.

I would try not loading mod_logfile.

Thanks,
Brian West
brian@freeswitch.org
http://www.cluecon.com

Hello Brian,

Welcome onboard.

Question for you: what are the minimum mod_* required to run freeswitch? Can you list them if possible?

to run it you don't need ANY mods... tongue  But for basics you'll want mod_commands, mod_dptools, mod_sofia and mod_console I suspect.

/b

Ah thanks for your quick reply

that list was off the top of my head so if you need more just add them to the list but as far as I can recall for basics it should be all you need.

/b

Hans,

Many thanks for the upgrade. I compiled/uploaded to my FON2100 and so far freeswitch-1.0.4pre7 still runs on it. Just wanted to let you know that when I tried to execute /etc/init.d/freeswitch stop, it doesn't kill freeswitch processes.

With the recent uClibc updates, I'm just curious which you guys recommend running on.... 8.09 or trunk?

Also, 1.0.4pre8 is out wink
Really looking forward to testing zrtp:  http://wiki.freeswitch.org/wiki/ZRTP

(Last edited by KillaB on 28 May 2009, 08:08)

Tried compiling with --enable-zrtp, but ran into the following error as expected:

checking for zrtp_init in -lzrtp... no
configure: error: Cannot locate zrtp libraries

Where should I move the libraries to to get it to compile?  or will there need to be separate zrtp package and makefile?

Make a package for the library zrtp and point freeswitch Makefile configure section to invoke path to the said library

ratbug wrote:

Make a package for the library zrtp and point freeswitch Makefile configure section to invoke path to the said library

I couldn't find any zrtp package on the OpenWRT SVN source. Anyone?

mazilo wrote:

I couldn't find any zrtp package on the OpenWRT SVN source. Anyone?

There's a license involved, so you'll need to register for the download.
I'm unsure if the package can be offered by OpenWrt.

It apparently works with Asterisk as well.
http://zfoneproject.com/getstarted.html

KillaB wrote:

Tried compiling with --enable-zrtp, but ran into the following error as expected:

checking for zrtp_init in -lzrtp... no
configure: error: Cannot locate zrtp libraries

Where should I move the libraries to to get it to compile?  or will there need to be separate zrtp package and makefile?

things are a little bit different since one needs to register to download the libzrtp source
I put up compiled binaries for 1.04pre8, static zrtp support included, at:
http://members.home.nl/hans.zandbelt/op … mipsel.ipk

let me know how that works for you

Hans.

Thanks Hans,

I would try it, but it looks like in uncompressed form it's 6.0MB, which will most likely require external USB storage.
Any chance you could post your makefile?  I registered and was working on a makefile, but you beat me to it.

Is it only necessary to have libzrtp, or is zfoned also required?

here's the patch against the packages tree for building the zrtp library; you'll need to manually
download the source code of the libzrtp-0.81.514 library as part of the zfone distribution, and put it in the "dl" directory
before building it:

http://zandbelt.dyndns.org/openwrt-pack … .514.patch

Hans.

Hans,

As always, thanks for a nice job. It compiled smoothly. BTW, do you have a patch to compile this zrtp library agains freeswitch as well as asterisk?