[Asterisk-Dev] Embedded Asterisk

Lars Boegild Thomsen lth at cow.dk
Sun Oct 26 19:40:09 MST 2003


Hi Andy,

I won't argue with your point of view.  That one you're of course completely
entitled to have :)  I will however try to elaborate a little to see if I
can change it.

Currently this isn't really a commercial venture (in my view).  It was
spawned off from a many year interest in playing with embedded Linux.  I've
been playing rather a lot with that out of pure fun and interest, and while
I have done a few commercial projects based on some of this work, it hasn't
really been the driving factor.  Same with embedding Asterisk.  I don't do
this for a company - neither do I have any investors putting money into
this.  I started playing with it because 1. It was fun an 2. I could see a
commercial interrest for the resulting product (a solid-state hybrid
soft-switch in non-marketing terms).

Unfortunately turning this into any kind of "product" (commercial or open
source) require some kind of funding since there is quite a large hardware
cost (different phones/gateways and even boxes for the actual embedding), so
as long as it is not commercial I can't spend as much time on it as I would
like.  Currently I must admit I am toying with different ideas on how to
turn it into a full-time project.  One could of course be some injection of
VC, but that's not very likely these days.  A more interesting approach I am
taking currently is working on a couple of projects for service providers
here in Malaysia.  Now these guys would LOVE a box like this they could put
at their customer premisis (sme's).  You know - give them an internet
connection and bundle voip AND a PBX into this package (and while we're at
it - make it a firewall too since the box already have that based on
previous projects).  Anyway - I will know more about this approach later
this week.

So - to sum up.  Currently I don't really mind sharing what I've done so
far.  Nothing is secret about it and I do respect the fact that it's based
on Open Source.  It is however not nearly clean enough to be generally
published.  What I've got so far is a bunch of makefiles.  These makefiles
will pull off the source for individual packages from the Internet and
compile everything into a single image - directly from source (or local
cache).  This is losely based on gar (see http://www.lnx-bbc.org) which in
turn is heavily inspired by BSD's ports (and gentoo uses somewhat the same
procedure).  Right now it is however pretty messy and it still depends on a
shitload of things in the build-environment (Debian Testing).

Speaking of hardware - currently I am using an Allwell STB-1030N - which is
a 233MHz (easily tuned to 266MHz) with 16 MB of flash (plenty!!!) and 64 MB
of memory (sofar PLENTY too) and a HiSax ISDN card for testing.  That box
runs Asterisk just fine (since it's not really disturbed by anything else)
as long as there's not too much codec translation involved.  Codec
translation kills the performance.  This box is quite old now and I reckon a
production system would use their 800 MHz boxes instead but right now I
can't be bothered (read: not prepare to spend the money) getting one of
those.

That's all I can think of right now.  The conclusion I guess is that in my
eyes this isn't really a commercial project - even though personally I
wouldn't mind if it became one (of course using the Digium PCI cards in this
box for interfacing telephony technologies).  I am not really protective of
anything I've done and I don't mind sharing ideas and even work with others
with a similar interest.

Oh by the way - you asked about boot time - hang on - measuring - ok here's
the numbers

 From off to asterisk ready all in all	: 65 seconds
 From off to Linux load (BIOS POST)		: 15 seconds

The rest is spend on first creating the root file system in RAM (would be
faster to run off the flash - but my view is that RAM is cheaper than flash
so why bother), configuring the network (fast), starting dhcpd, sshd,
mini_httpd (with SSL encryption) and asterisk.  So - I guess 50 seconds
currently (I refuse to take responsibility for slow post in allwell boxes -
they spend time displaying their logo).  I think I could shape that down to
around 35 or so by starting all the stuff in the background (currently I
wait for each process to start).  Some more numbers before you ask :)

~ # df
Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/shm                 47800     12324     35476  26% /
/dev/flashdevice         15934      6342      9592  40% /mnt/flash

As you can see I actually "unpack" the prepared root filesystem on a
ramdisk.  It would be more memory and time efficient to put a live cramfs
and mount that directly - but it's so messy to create links to make part of
it read/write - AND it complicates flashing new updates HUGELY.  That and
the fact that memory is cheap but flash expensive lead me to do it this way
instead.  The /dev/flashdevice is a symbolic link created in initrd that
links the real flash device so that I won't have to bother in the root
filesystem (currently it's /dev/nftl/disc0/part1 if that has any interest).

The flash itself is a DiscOnChip Millennium 16 MB device.  The box boot
directly from this device using syslinux (or could be lilo if you prefer to
have it ext2 formattet - there are however a bunch of arguments against that
so currently I use FAT).

~ # free
              total         used         free       shared      buffers
  Mem:        95604        18116        77488            0          120
 Swap:            0            0            0
Total:        95604        18116        77488

Ooops - forgot I put an extra 32 MB into the box after I got it from
Allwell.

~ # ps -efx
  PID  Uid     VmSize Stat Command
    1 root        312 S   init
    2 root            SW  [keventd]
    3 root            SWN [ksoftirqd_CPU0]
    4 root            SW  [kswapd]
    5 root            SW  [bdflush]
    6 root            SW  [kupdated]
  112 root        308 S   syslogd -m 60 -C
  116 root        324 S   inetd
  183 root        912 S   /sbin/sshd
  192 root        952 S   /sbin/mini_httpd -C /etc/httpd.conf
  193 root        328 S   /usr/sbin/udhcpd /etc/dhcpd.conf
  196 root        288 S   /sbin/getty 38400 /dev/vc/1
  197 root       2672 S   asterisk
  198 root       2672 S   asterisk
  199 root       2672 S   asterisk
  200 root       2672 S   asterisk
  201 root       2672 S   asterisk
  202 root       2672 S   asterisk
  203 root       2672 S   asterisk
  204 root       2672 S   asterisk
  205 root       2672 S   asterisk
  206 root       2672 S   asterisk
  208 root       1136 R   /sbin/sshd
  209 root        356 S   -sh
  213 root        292 R   ps -efx

This clearly shows that the single most expensive thing I do in this box is
insisting on encryption.  That was an early design parameter - absolutely NO
unencrypted passwords in and out of this box - so HTTPS and SSH are the only
options.  But those are expensive memory and library wise (the entire C
library is around 300 kB and the openssl library is around 800 kB).  I guess
this could be optimized by limiting the encryption methods included in the
library - but so far I haven't spend time optimizing that part.

What else did you ask - oh yes - logs.  Well - Asterisk unfortunately can't
use syslog, so yes - the asterisk logs goes missing currently.  The syslog
can use the network to log to another server.  Alternatively the log dir
could be mounted from another server - but that's messy.  If putting this
into production ever I would probably go through Asterisk and make it syslog
aware.  Voicemail and CDR's could use SQL.  Another thing I would definietly
include if this was to become a "product" would be an asterisk RADIUS module
that understood the cisco prepaid VSA's.

So - let's hear if I managed to "adjust" your view? :)  And by the way -
wish me luck :)  I'll be demonstrating this box and a couple of SNOM phones
to one of the hottest new service provider startup's in South-East Asia
tomorrow (which explains why I just sacrifised my weekend getting this
running) :)

Regards,

	Lars...

> -----Original Message-----
> From: asterisk-dev-admin at lists.digium.com
> [mailto:asterisk-dev-admin at lists.digium.com]On Behalf Of Andy Powell
> Sent: 27 October 2003 02:45
> To: asterisk-dev at lists.digium.com
> Subject: RE: [Asterisk-Dev] Embedded Asterisk
>
>
> Hi Lars,
>
> Very impressive indeed. It's just a shame that it's a commercial
> venture (from my point of view)
> as I'd be interested in getting it installed myself... I couldn't
> see the spec of the box, I assume
> its something like a GT Allwell box....
>
> Just out of interest what are you doing with your logs? I assume
> they vanish on reboot...
>
> What's the boot time of the device?
>
> Good job, and good luck.. :D
>
> Andy
>
>
>
> *********** REPLY SEPARATOR  ***********
>
> On 25/10/2003 at 10:14 Lars Boegild Thomsen wrote:
>
> >Well - building the same source for my embedded environment (using
> >i386-uclibc-gcc) and for the development machine itself (using
> plain gcc -
> >and it's a Debian system by the way) results in the following:
> >
> >Debian:
> >-------
> >dev2:~# ls -ls /usr/sbin/asterisk /usr/lib/asterisk/modules/*
> >  40 -rwxr-xr-x    1 root     root        37852 Oct 25 09:30
> >/usr/lib/asterisk/modules/app_adsiprog.so
> >  40 -rwxr-xr-x    1 root     root        40136 Oct 25 09:30
> >/usr/lib/asterisk/modules/app_agi.so
> >  12 -rwxr-xr-x    1 root     root         8560 Oct 25 09:30
> >/usr/lib/asterisk/modules/app_authenticate.so
> >   8 -rwxr-xr-x    1 root     root         5116 Oct 25 09:30
> >/usr/lib/asterisk/modules/app_cdr.so
> >   8 -rwxr-xr-x    1 root     root         6956 Oct 25 09:30
> >/usr/lib/asterisk/modules/app_chanisavail.so
> >  12 -rwxr-xr-x    1 root     root         8448 Oct 25 09:30
> >/usr/lib/asterisk/modules/app_cut.so
> >   8 -rwxr-xr-x    1 root     root         5740 Oct 25 09:30
> >/usr/lib/asterisk/modules/app_datetime.so
> >  12 -rwxr-xr-x    1 root     root         9404 Oct 25 09:30
> >/usr/lib/asterisk/modules/app_db.so
> >  20 -rwxr-xr-x    1 root     root        19560 Oct 25 09:30
> >/usr/lib/asterisk/modules/app_dial.so
> >  12 -rwxr-xr-x    1 root     root         9480 Oct 25 09:30
> >/usr/lib/asterisk/modules/app_directory.so
> >  16 -rwxr-xr-x    1 root     root        14368 Oct 25 09:30
> >/usr/lib/asterisk/modules/app_disa.so
> >   8 -rwxr-xr-x    1 root     root         6264 Oct 25 09:30
> >/usr/lib/asterisk/modules/app_echo.so
> >  12 -rwxr-xr-x    1 root     root         9036 Oct 25 09:30
> >/usr/lib/asterisk/modules/app_enumlookup.so
> >  16 -rwxr-xr-x    1 root     root        14420 Oct 25 09:30
> >/usr/lib/asterisk/modules/app_festival.so
> >   8 -rwxr-xr-x    1 root     root         6756 Oct 25 09:30
> >/usr/lib/asterisk/modules/app_flash.so
> >   8 -rwxr-xr-x    1 root     root         7580 Oct 25 09:30
> >/usr/lib/asterisk/modules/app_getcpeid.so
> >   8 -rwxr-xr-x    1 root     root         7480 Oct 25 09:30
> >/usr/lib/asterisk/modules/app_hasnewvoicemail.so
> >   8 -rwxr-xr-x    1 root     root         6208 Oct 25 09:30
> >/usr/lib/asterisk/modules/app_image.so
> >   8 -rwxr-xr-x    1 root     root         7896 Oct 25 09:30
> >/usr/lib/asterisk/modules/app_intercom.so
> >   8 -rwxr-xr-x    1 root     root         7096 Oct 25 09:30
> >/usr/lib/asterisk/modules/app_lookupblacklist.so
> >   8 -rwxr-xr-x    1 root     root         6924 Oct 25 09:30
> >/usr/lib/asterisk/modules/app_lookupcidname.so
> >  12 -rwxr-xr-x    1 root     root        10904 Oct 25 09:30
> >/usr/lib/asterisk/modules/app_macro.so
> >  20 -rwxr-xr-x    1 root     root        20392 Oct 25 09:30
> >/usr/lib/asterisk/modules/app_meetme.so
> >   8 -rwxr-xr-x    1 root     root         7032 Oct 25 09:30
> >/usr/lib/asterisk/modules/app_milliwatt.so
> >  12 -rwxr-xr-x    1 root     root         8876 Oct 25 09:30
> >/usr/lib/asterisk/modules/app_mp3.so
> >  12 -rwxr-xr-x    1 root     root        10476 Oct 25 09:30
> >/usr/lib/asterisk/modules/app_parkandannounce.so
> >   8 -rwxr-xr-x    1 root     root         7328 Oct 25 09:30
> >/usr/lib/asterisk/modules/app_playback.so
> >  12 -rwxr-xr-x    1 root     root         8208 Oct 25 09:30
> >/usr/lib/asterisk/modules/app_privacy.so
> >  12 -rwxr-xr-x    1 root     root        11500 Oct 25 09:30
> >/usr/lib/asterisk/modules/app_qcall.so
> >  32 -rwxr-xr-x    1 root     root        28788 Oct 25 09:30
> >/usr/lib/asterisk/modules/app_queue.so
> >  12 -rwxr-xr-x    1 root     root         9912 Oct 25 09:30
> >/usr/lib/asterisk/modules/app_record.so
> >   8 -rwxr-xr-x    1 root     root         6676 Oct 25 09:30
> >/usr/lib/asterisk/modules/app_sayunixtime.so
> >   8 -rwxr-xr-x    1 root     root         6172 Oct 25 09:30
> >/usr/lib/asterisk/modules/app_senddtmf.so
> >   8 -rwxr-xr-x    1 root     root         6220 Oct 25 09:30
> >/usr/lib/asterisk/modules/app_setcallerid.so
> >   8 -rwxr-xr-x    1 root     root         6836 Oct 25 09:30
> >/usr/lib/asterisk/modules/app_setcidname.so
> >   8 -rwxr-xr-x    1 root     root         6836 Oct 25 09:30
> >/usr/lib/asterisk/modules/app_setcidnum.so
> >   8 -rwxr-xr-x    1 root     root         5856 Oct 25 09:30
> >/usr/lib/asterisk/modules/app_softhangup.so
> >   8 -rwxr-xr-x    1 root     root         6276 Oct 25 09:30
> >/usr/lib/asterisk/modules/app_striplsd.so
> >   8 -rwxr-xr-x    1 root     root         7832 Oct 25 09:30
> >/usr/lib/asterisk/modules/app_substring.so
> >   8 -rwxr-xr-x    1 root     root         6256 Oct 25 09:30
> >/usr/lib/asterisk/modules/app_system.so
> >   8 -rwxr-xr-x    1 root     root         6136 Oct 25 09:30
> >/usr/lib/asterisk/modules/app_transfer.so
> >   8 -rwxr-xr-x    1 root     root         7476 Oct 25 09:30
> >/usr/lib/asterisk/modules/app_url.so
> >  64 -rwxr-xr-x    1 root     root        59404 Oct 25 09:30
> >/usr/lib/asterisk/modules/app_voicemail.so
> >  64 -rwxr-xr-x    1 root     root        60908 Oct 25 09:30
> >/usr/lib/asterisk/modules/app_voicemail2.so
> >   8 -rwxr-xr-x    1 root     root         6572 Oct 25 09:30
> >/usr/lib/asterisk/modules/app_waitforring.so
> >   8 -rwxr-xr-x    1 root     root         6880 Oct 25 09:30
> >/usr/lib/asterisk/modules/app_zapateller.so
> >  12 -rwxr-xr-x    1 root     root        10152 Oct 25 09:30
> >/usr/lib/asterisk/modules/app_zapbarge.so
> >  12 -rwxr-xr-x    1 root     root         9280 Oct 25 09:30
> >/usr/lib/asterisk/modules/app_zapras.so
> >  12 -rwxr-xr-x    1 root     root         8224 Oct 25 09:30
> >/usr/lib/asterisk/modules/cdr_csv.so
> >  28 -rwxr-xr-x    1 root     root        27236 Oct 25 09:30
> >/usr/lib/asterisk/modules/chan_agent.so
> > 108 -rwxr-xr-x    1 root     root       102700 Oct 25 09:30
> >/usr/lib/asterisk/modules/chan_iax.so
> > 116 -rwxr-xr-x    1 root     root       112732 Oct 25 09:30
> >/usr/lib/asterisk/modules/chan_iax2.so
> >  12 -rwxr-xr-x    1 root     root        11440 Oct 25 09:30
> >/usr/lib/asterisk/modules/chan_local.so
> >  72 -rwxr-xr-x    1 root     root        68908 Oct 25 09:30
> >/usr/lib/asterisk/modules/chan_mgcp.so
> >  24 -rwxr-xr-x    1 root     root        23072 Oct 25 09:30
> >/usr/lib/asterisk/modules/chan_modem.so
> >  16 -rwxr-xr-x    1 root     root        13420 Oct 25 09:30
> >/usr/lib/asterisk/modules/chan_modem_aopen.so
> >  16 -rwxr-xr-x    1 root     root        15308 Oct 25 09:30
> >/usr/lib/asterisk/modules/chan_modem_bestdata.so
> >  28 -rwxr-xr-x    1 root     root        24964 Oct 25 09:30
> >/usr/lib/asterisk/modules/chan_modem_i4l.so
> >  68 -rwxr-xr-x    1 root     root        64524 Oct 25 09:30
> >/usr/lib/asterisk/modules/chan_oss.so
> >  32 -rwxr-xr-x    1 root     root        29004 Oct 25 09:30
> >/usr/lib/asterisk/modules/chan_phone.so
> > 172 -rwxr-xr-x    1 root     root       168364 Oct 25 09:30
> >/usr/lib/asterisk/modules/chan_sip.so
> >  56 -rwxr-xr-x    1 root     root        52236 Oct 25 09:30
> >/usr/lib/asterisk/modules/chan_skinny.so
> > 116 -rwxr-xr-x    1 root     root       114156 Oct 25 09:30
> >/usr/lib/asterisk/modules/chan_zap.so
> >   8 -rwxr-xr-x    1 root     root         6924 Oct 25 09:30
> >/usr/lib/asterisk/modules/codec_a_mu.so
> >   8 -rwxr-xr-x    1 root     root         8140 Oct 25 09:30
> >/usr/lib/asterisk/modules/codec_adpcm.so
> >   8 -rwxr-xr-x    1 root     root         6764 Oct 25 09:30
> >/usr/lib/asterisk/modules/codec_alaw.so
> >  48 -rwxr-xr-x    1 root     root        45840 Oct 25 09:30
> >/usr/lib/asterisk/modules/codec_gsm.so
> >  60 -rwxr-xr-x    1 root     root        54440 Oct 25 09:30
> >/usr/lib/asterisk/modules/codec_ilbc.so
> >  40 -rwxr-xr-x    1 root     root        39116 Oct 25 09:30
> >/usr/lib/asterisk/modules/codec_lpc10.so
> > 152 -rwxr-xr-x    1 root     root       147664 Oct 25 09:30
> >/usr/lib/asterisk/modules/codec_mp3_d.so
> >   8 -rwxr-xr-x    1 root     root         6764 Oct 25 09:30
> >/usr/lib/asterisk/modules/codec_ulaw.so
> >  12 -rwxr-xr-x    1 root     root         9060 Oct 25 09:30
> >/usr/lib/asterisk/modules/format_g723.so
> >   8 -rwxr-xr-x    1 root     root         7484 Oct 25 09:30
> >/usr/lib/asterisk/modules/format_g729.so
> >  16 -rwxr-xr-x    1 root     root        12764 Oct 25 09:30
> >/usr/lib/asterisk/modules/format_gsm.so
> >   8 -rwxr-xr-x    1 root     root         7836 Oct 25 09:30
> >/usr/lib/asterisk/modules/format_h263.so
> >   8 -rwxr-xr-x    1 root     root         5860 Oct 25 09:30
> >/usr/lib/asterisk/modules/format_jpeg.so
> >   8 -rwxr-xr-x    1 root     root         7976 Oct 25 09:30
> >/usr/lib/asterisk/modules/format_mp3.so
> >   8 -rwxr-xr-x    1 root     root         7356 Oct 25 09:30
> >/usr/lib/asterisk/modules/format_pcm.so
> >   8 -rwxr-xr-x    1 root     root         7324 Oct 25 09:30
> >/usr/lib/asterisk/modules/format_pcm_alaw.so
> >   8 -rwxr-xr-x    1 root     root         8072 Oct 25 09:30
> >/usr/lib/asterisk/modules/format_vox.so
> >  12 -rwxr-xr-x    1 root     root        11400 Oct 25 09:30
> >/usr/lib/asterisk/modules/format_wav.so
> >  24 -rwxr-xr-x    1 root     root        22904 Oct 25 09:30
> >/usr/lib/asterisk/modules/format_wav_gsm.so
> >  36 -rwxr-xr-x    1 root     root        32956 Oct 25 09:30
> >/usr/lib/asterisk/modules/pbx_config.so
> >  16 -rwxr-xr-x    1 root     root        13004 Oct 25 09:30
> >/usr/lib/asterisk/modules/pbx_spool.so
> >  12 -rwxr-xr-x    1 root     root        10316 Oct 25 09:30
> >/usr/lib/asterisk/modules/pbx_wilcalu.so
> >  24 -rwxr-xr-x    1 root     root        22476 Oct 25 09:30
> >/usr/lib/asterisk/modules/res_adsi.so
> >  16 -rwxr-xr-x    1 root     root        14476 Oct 25 09:30
> >/usr/lib/asterisk/modules/res_crypto.so
> >  16 -rwxr-xr-x    1 root     root        13200 Oct 25 09:30
> >/usr/lib/asterisk/modules/res_indications.so
> >  12 -rwxr-xr-x    1 root     root        11820 Oct 25 09:30
> >/usr/lib/asterisk/modules/res_monitor.so
> >  16 -rwxr-xr-x    1 root     root        15368 Oct 25 09:30
> >/usr/lib/asterisk/modules/res_musiconhold.so
> >  20 -rwxr-xr-x    1 root     root        19560 Oct 25 09:30
> >/usr/lib/asterisk/modules/res_parking.so
> > 500 -rwxr-xr-x    1 root     root       506748 Oct 25 09:29
> >/usr/sbin/asterisk
> >
> >The embedded uClibc version (chroot'ed into the build directory):
> >-----------------------------------------------------------------
> >dev2:~# ls -ls /usr/sbin/asterisk /usr/lib/asterisk/modules/*
> >  36 -rwxr-xr-x    1 1000     100         33842 Oct 24 02:52
> >/usr/lib/asterisk/modules/app_adsiprog.so
> >  40 -rwxr-xr-x    1 1000     100         39503 Oct 24 02:52
> >/usr/lib/asterisk/modules/app_agi.so
> >  12 -rwxr-xr-x    1 1000     100          9157 Oct 24 02:52
> >/usr/lib/asterisk/modules/app_authenticate.so
> >   8 -rwxr-xr-x    1 1000     100          5583 Oct 24 02:52
> >/usr/lib/asterisk/modules/app_cdr.so
> >   8 -rwxr-xr-x    1 1000     100          7495 Oct 24 02:52
> >/usr/lib/asterisk/modules/app_chanisavail.so
> >  12 -rwxr-xr-x    1 1000     100          8516 Oct 24 02:52
> >/usr/lib/asterisk/modules/app_cut.so
> >   8 -rwxr-xr-x    1 1000     100          6307 Oct 24 02:52
> >/usr/lib/asterisk/modules/app_datetime.so
> >  12 -rwxr-xr-x    1 1000     100          9673 Oct 24 02:52
> >/usr/lib/asterisk/modules/app_db.so
> >  24 -rwxr-xr-x    1 1000     100         20531 Oct 24 02:52
> >/usr/lib/asterisk/modules/app_dial.so
> >  12 -rwxr-xr-x    1 1000     100         10016 Oct 24 02:52
> >/usr/lib/asterisk/modules/app_directory.so
> >  16 -rwxr-xr-x    1 1000     100         14931 Oct 24 02:52
> >/usr/lib/asterisk/modules/app_disa.so
> >   8 -rwxr-xr-x    1 1000     100          7032 Oct 24 02:52
> >/usr/lib/asterisk/modules/app_echo.so
> >  12 -rwxr-xr-x    1 1000     100          9475 Oct 24 02:52
> >/usr/lib/asterisk/modules/app_enumlookup.so
> >  16 -rwxr-xr-x    1 1000     100         14746 Oct 24 02:52
> >/usr/lib/asterisk/modules/app_festival.so
> >   8 -rwxr-xr-x    1 1000     100          8171 Oct 24 02:52
> >/usr/lib/asterisk/modules/app_getcpeid.so
> >   8 -rwxr-xr-x    1 1000     100          7991 Oct 24 02:52
> >/usr/lib/asterisk/modules/app_hasnewvoicemail.so
> >   8 -rwxr-xr-x    1 1000     100          6910 Oct 24 02:52
> >/usr/lib/asterisk/modules/app_image.so
> >  12 -rwxr-xr-x    1 1000     100          8395 Oct 24 02:52
> >/usr/lib/asterisk/modules/app_intercom.so
> >   8 -rwxr-xr-x    1 1000     100          7675 Oct 24 02:52
> >/usr/lib/asterisk/modules/app_lookupblacklist.so
> >   8 -rwxr-xr-x    1 1000     100          7616 Oct 24 02:52
> >/usr/lib/asterisk/modules/app_lookupcidname.so
> >  12 -rwxr-xr-x    1 1000     100         11328 Oct 24 02:52
> >/usr/lib/asterisk/modules/app_macro.so
> >   8 -rwxr-xr-x    1 1000     100          7657 Oct 24 02:52
> >/usr/lib/asterisk/modules/app_milliwatt.so
> >  12 -rwxr-xr-x    1 1000     100          9223 Oct 24 02:52
> >/usr/lib/asterisk/modules/app_mp3.so
> >  12 -rwxr-xr-x    1 1000     100         10580 Oct 24 02:52
> >/usr/lib/asterisk/modules/app_parkandannounce.so
> >   8 -rwxr-xr-x    1 1000     100          7884 Oct 24 02:52
> >/usr/lib/asterisk/modules/app_playback.so
> >  12 -rwxr-xr-x    1 1000     100          8926 Oct 24 02:52
> >/usr/lib/asterisk/modules/app_privacy.so
> >  16 -rwxr-xr-x    1 1000     100         12885 Oct 24 02:52
> >/usr/lib/asterisk/modules/app_qcall.so
> >  32 -rwxr-xr-x    1 1000     100         29338 Oct 24 02:52
> >/usr/lib/asterisk/modules/app_queue.so
> >  12 -rwxr-xr-x    1 1000     100         10326 Oct 24 02:52
> >/usr/lib/asterisk/modules/app_record.so
> >   8 -rwxr-xr-x    1 1000     100          7173 Oct 24 02:52
> >/usr/lib/asterisk/modules/app_sayunixtime.so
> >   8 -rwxr-xr-x    1 1000     100          6926 Oct 24 02:52
> >/usr/lib/asterisk/modules/app_senddtmf.so
> >   8 -rwxr-xr-x    1 1000     100          6913 Oct 24 02:52
> >/usr/lib/asterisk/modules/app_setcallerid.so
> >   8 -rwxr-xr-x    1 1000     100          7393 Oct 24 02:52
> >/usr/lib/asterisk/modules/app_setcidname.so
> >   8 -rwxr-xr-x    1 1000     100          7393 Oct 24 02:52
> >/usr/lib/asterisk/modules/app_setcidnum.so
> >   8 -rwxr-xr-x    1 1000     100          6374 Oct 24 02:52
> >/usr/lib/asterisk/modules/app_softhangup.so
> >   8 -rwxr-xr-x    1 1000     100          6806 Oct 24 02:52
> >/usr/lib/asterisk/modules/app_striplsd.so
> >   8 -rwxr-xr-x    1 1000     100          8162 Oct 24 02:52
> >/usr/lib/asterisk/modules/app_substring.so
> >   8 -rwxr-xr-x    1 1000     100          6862 Oct 24 02:52
> >/usr/lib/asterisk/modules/app_system.so
> >   8 -rwxr-xr-x    1 1000     100          6868 Oct 24 02:52
> >/usr/lib/asterisk/modules/app_transfer.so
> >   8 -rwxr-xr-x    1 1000     100          8107 Oct 24 02:52
> >/usr/lib/asterisk/modules/app_url.so
> >  60 -rwxr-xr-x    1 1000     100         53544 Oct 24 02:52
> >/usr/lib/asterisk/modules/app_voicemail.so
> >  60 -rwxr-xr-x    1 1000     100         56172 Oct 24 02:52
> >/usr/lib/asterisk/modules/app_voicemail2.so
> >   8 -rwxr-xr-x    1 1000     100          7224 Oct 24 02:52
> >/usr/lib/asterisk/modules/app_waitforring.so
> >   8 -rwxr-xr-x    1 1000     100          7442 Oct 24 02:52
> >/usr/lib/asterisk/modules/app_zapateller.so
> >  12 -rwxr-xr-x    1 1000     100          8694 Oct 24 02:52
> >/usr/lib/asterisk/modules/cdr_csv.so
> >  28 -rwxr-xr-x    1 1000     100         27697 Oct 24 02:52
> >/usr/lib/asterisk/modules/chan_agent.so
> > 100 -rwxr-xr-x    1 1000     100         94478 Oct 24 02:52
> >/usr/lib/asterisk/modules/chan_iax.so
> > 108 -rwxr-xr-x    1 1000     100        106387 Oct 24 02:52
> >/usr/lib/asterisk/modules/chan_iax2.so
> >  12 -rwxr-xr-x    1 1000     100         12058 Oct 24 02:52
> >/usr/lib/asterisk/modules/chan_local.so
> >  72 -rwxr-xr-x    1 1000     100         69141 Oct 24 02:52
> >/usr/lib/asterisk/modules/chan_mgcp.so
> >  24 -rwxr-xr-x    1 1000     100         22531 Oct 24 02:52
> >/usr/lib/asterisk/modules/chan_modem.so
> >  16 -rwxr-xr-x    1 1000     100         13132 Oct 24 02:52
> >/usr/lib/asterisk/modules/chan_modem_aopen.so
> >  16 -rwxr-xr-x    1 1000     100         15151 Oct 24 02:52
> >/usr/lib/asterisk/modules/chan_modem_bestdata.so
> >  24 -rwxr-xr-x    1 1000     100         24354 Oct 24 02:52
> >/usr/lib/asterisk/modules/chan_modem_i4l.so
> >  68 -rwxr-xr-x    1 1000     100         62505 Oct 24 02:52
> >/usr/lib/asterisk/modules/chan_oss.so
> >  28 -rwxr-xr-x    1 1000     100         27107 Oct 24 02:52
> >/usr/lib/asterisk/modules/chan_phone.so
> > 160 -rwxr-xr-x    1 1000     100        157350 Oct 24 02:52
> >/usr/lib/asterisk/modules/chan_sip.so
> >  56 -rwxr-xr-x    1 1000     100         51946 Oct 24 02:52
> >/usr/lib/asterisk/modules/chan_skinny.so
> >   8 -rwxr-xr-x    1 1000     100          7393 Oct 24 02:52
> >/usr/lib/asterisk/modules/codec_a_mu.so
> >  12 -rwxr-xr-x    1 1000     100          8328 Oct 24 02:52
> >/usr/lib/asterisk/modules/codec_adpcm.so
> >   8 -rwxr-xr-x    1 1000     100          7176 Oct 24 02:52
> >/usr/lib/asterisk/modules/codec_alaw.so
> >  56 -rwxr-xr-x    1 1000     100         50394 Oct 24 02:52
> >/usr/lib/asterisk/modules/codec_gsm.so
> >  56 -rwxr-xr-x    1 1000     100         52433 Oct 24 02:52
> >/usr/lib/asterisk/modules/codec_ilbc.so
> >  40 -rwxr-xr-x    1 1000     100         39253 Oct 24 02:52
> >/usr/lib/asterisk/modules/codec_lpc10.so
> > 320 -rwxr-xr-x    1 1000     100        320157 Oct 24 02:52
> >/usr/lib/asterisk/modules/codec_mp3_d.so
> >   8 -rwxr-xr-x    1 1000     100          7178 Oct 24 02:52
> >/usr/lib/asterisk/modules/codec_ulaw.so
> >  12 -rwxr-xr-x    1 1000     100          9746 Oct 23 22:57
> >/usr/lib/asterisk/modules/format_g723.so
> >   8 -rwxr-xr-x    1 1000     100          7620 Oct 24 02:52
> >/usr/lib/asterisk/modules/format_g729.so
> >  16 -rwxr-xr-x    1 1000     100         12772 Oct 24 02:52
> >/usr/lib/asterisk/modules/format_gsm.so
> >   8 -rwxr-xr-x    1 1000     100          7972 Oct 24 02:52
> >/usr/lib/asterisk/modules/format_h263.so
> >   8 -rwxr-xr-x    1 1000     100          6189 Oct 24 02:52
> >/usr/lib/asterisk/modules/format_jpeg.so
> >  12 -rwxr-xr-x    1 1000     100          8196 Oct 24 02:52
> >/usr/lib/asterisk/modules/format_mp3.so
> >   8 -rwxr-xr-x    1 1000     100          7524 Oct 24 02:52
> >/usr/lib/asterisk/modules/format_pcm.so
> >   8 -rwxr-xr-x    1 1000     100          7492 Oct 24 02:52
> >/usr/lib/asterisk/modules/format_pcm_alaw.so
> >   8 -rwxr-xr-x    1 1000     100          8160 Oct 24 02:52
> >/usr/lib/asterisk/modules/format_vox.so
> >  12 -rwxr-xr-x    1 1000     100         11271 Oct 24 02:52
> >/usr/lib/asterisk/modules/format_wav.so
> >  24 -rwxr-xr-x    1 1000     100         23328 Oct 24 02:52
> >/usr/lib/asterisk/modules/format_wav_gsm.so
> >  32 -rwxr-xr-x    1 1000     100         31978 Oct 24 02:52
> >/usr/lib/asterisk/modules/pbx_config.so
> >  24 -rwxr-xr-x    1 1000     100         23428 Oct 24 02:52
> >/usr/lib/asterisk/modules/pbx_gtkconsole.so
> >  16 -rwxr-xr-x    1 1000     100         12994 Oct 24 02:52
> >/usr/lib/asterisk/modules/pbx_spool.so
> >  12 -rwxr-xr-x    1 1000     100         11577 Oct 24 02:52
> >/usr/lib/asterisk/modules/pbx_wilcalu.so
> >  24 -rwxr-xr-x    1 1000     100         22521 Oct 24 02:52
> >/usr/lib/asterisk/modules/res_adsi.so
> >  16 -rwxr-xr-x    1 1000     100         14344 Oct 24 02:52
> >/usr/lib/asterisk/modules/res_crypto.so
> >  16 -rwxr-xr-x    1 1000     100         13540 Oct 24 02:52
> >/usr/lib/asterisk/modules/res_indications.so
> >  12 -rwxr-xr-x    1 1000     100         11885 Oct 24 02:52
> >/usr/lib/asterisk/modules/res_monitor.so
> >  16 -rwxr-xr-x    1 1000     100         16150 Oct 24 02:52
> >/usr/lib/asterisk/modules/res_musiconhold.so
> >  24 -rwxr-xr-x    1 1000     100         21610 Oct 24 02:52
> >/usr/lib/asterisk/modules/res_parking.so
> > 460 -rwxr-xr-x    1 1000     100        465116 Oct 24 02:52
> >/usr/sbin/asterisk
> >
> >These should be fairly comparable - BUT by any event they are NOT what is
> >important!!!  glibc is what - about 1.8 MB or so + all the nss and locale
> >stuff which takes up a huge amount of disk space (that is if that disk is
> >bloody expensive flash memory).  uClibc is comparably around 300 kB or so
> >everything included.  And the beauty is that with extremely few
> exceptions
> >-
> >most things compiles cleanly on uClibc.
> >
> >A filesystem containing uClibc, busybox (for the standard UNIX
> command line
> >tools), openssl (for encryption - this library is actually larger than
> >uClibc), openssh (for encrypted access to the box), mini_https (linked
> >against the openssl to provide https server) and finally
> Asterisk including
> >all sample sounds and modules takes all in all a little less than 5 MB of
> >compressed flash storage.  At boot time that expands into a root
> filesystem
> >at about 10 MB.  Lots could have been saved if I hadn't been really
> >paranoid
> >about ONLY allowing encrypted access to the box - probably half
> of all this
> >is openssl and openssh.
> >
> >The box I am using has got 16 MB of flash (the box would be cheaper if I
> >could do with 8 - so 8 is really my limit in reality) and 64 MB
> of memory,
> >so it's not as tight as most embedded systems.  As it is right
> now - I use
> >about 6 MB of the flash and after startup about 20 MB of the memory (that
> >includes root on ramdisk and everything running - including
> asterisk) - so
> >I
> >still got room around me :)
> >
> >Regards,
> >
> >    Lars...
> >
> >--
> >Lars Boegild Thomsen
> >Technical Director
> >JustIT Sdn. Bhd.
> >Cell Phone (MY): +60 (16) 323 1999
> >ICQ: 6478559
> >Yahoo Chat: lars_boegild_thomsen at yahoo.com
> >MSN Chat: lars_boegild_thomsen at hotmail.com
> >http://www.justit.ws
> >
> >> -----Original Message-----
> >> From: asterisk-dev-admin at lists.digium.com
> >> [mailto:asterisk-dev-admin at lists.digium.com]On Behalf Of Nathan
> >> Littlepage
> >> Sent: 24 October 2003 21:55
> >> To: asterisk-dev at lists.digium.com
> >> Subject: RE: [Asterisk-Dev] Embedded Asterisk
> >>
> >>
> >> How much is the Asterisk using uClibc weighing in at?
> >>
> >> > -----Original Message-----
> >> > From: asterisk-dev-admin at lists.digium.com
> >> > [mailto:asterisk-dev-admin at lists.digium.com] On Behalf Of
> >> > Lars Boegild Thomsen
> >> > Sent: Friday, October 24, 2003 3:20 AM
> >> > To: asterisk-dev at lists.digium.com
> >> > Subject: RE: [Asterisk-Dev] Embedded Asterisk
> >> >
> >> >
> >> > I've done further testing and this is getting interesting.
> >> >
> >> > If using more or less the standard configuration - incoming
> >> > IAX2 works but
> >> > incoming SIP packages are left untouched by asterisk.  So -
> >> > the big question
> >> > is really - in what way is Asterisk handling IAX2 and SIP
> >> > differently when
> >> > pulling packages of the udp stack?
> >> >
> >> > Regards,
> >> >
> >> > 	Lars...
> >> >
> >> > > -----Original Message-----
> >> > > From: asterisk-dev-admin at lists.digium.com
> >> > > [mailto:asterisk-dev-admin at lists.digium.com]On Behalf Of
> >> > Lars Boegild
> >> > > Thomsen
> >> > > Sent: 24 October 2003 16:13
> >> > > To: asterisk-dev at lists.digium.com
> >> > > Subject: [Asterisk-Dev] Embedded Asterisk
> >> > >
> >> > >
> >> > > Hi Mark,
> >> > >
> >> > > Thanx for the assistance on IRC today (nick: lth).  I tried your
> >> > > suggestion
> >> > > (printf in sipsock_read function) and can confirm your
> >> > suspicion - the
> >> > > function is never called when Asterisk is linked with uClibc.
> >> > >
> >> > > A few more pointers:
> >> > >
> >> > > 1. I updated the uClibc library to latest snapshot - since
> >> > it now has
> >> > > dn_expand function built in.  This results in Asterisk
> >> > being able to clean
> >> > > compile with only the following changes:
> >> > >
> >> > > 	1. uClibc does not have the res_nxxxxx functions - so BSD
> >> > > like calls are
> >> > > used in dns.c (basically I changed the #ifdef __Linux__ to #ifdef
> >> > > __xxLinux__)
> >> > >
> >> > > 	2. uClibc does not have res_search - changed that to
> >> > > res_query call for
> >> > > testing
> >> > >
> >> > > 2. Asterisk compiles and start up without any error
> >> > messages at all.  When
> >> > > loading the chan_sip:
> >> > >
> >> > > 	Parsing: '/etc/asterisk/sip.conf': Found
> >> > > 	SIP Listening on 0.0.0.0:5060
> >> > > 	Using TOS bits 0
> >> > > 	Registered channel type 'sip' (Session Initiation
> >> > Protocol (SIP))
> >> > > 	Registered application 'SIPDtmfMode'
> >> > > 	WARNING[1024]: File chan_sip.c, Line 5433
> >> > > (restart_monitor): Cannot kill
> >> > > myself
> >> > >
> >> > > 3. Asterisk definitely "binds" the port.  Netstat -a:
> >> > >
> >> > > 	...
> >> > > 	udp	0	0	*:6060	*:*
> >> > > 	...
> >> > >
> >> > > 4. sipsock_read is never called.  The input buffer on the
> >> > above netstat
> >> > > output grows and grows if I try to connect a sip ua.
> >> > >
> >> > > 5. Absolutely NO hint output is generate from Asterisk.
> >> > >
> >> > > That's all I can think of right now.  It's obvious that Asterisk
> >> > > never poll
> >> > > the incomping packages from the udp stack - but why?  Any other
> >> > > things I can
> >> > > try?
> >> > >
> >> > > Regarding uClibc in general - most applications does run
> >> > flawlessly - so I
> >> > > don't think the networking code is generally flawed.
> >> > >
> >> > > Regards,
> >> > >
> >> > >     Lars...
> >> > >
> >> > > --
> >> > > Lars Boegild Thomsen
> >> > > Technical Director
> >> > > JustIT Sdn. Bhd.
> >> > > Cell Phone (MY): +60 (16) 323 1999
> >> > > ICQ: 6478559
> >> > > Yahoo Chat: lars_boegild_thomsen at yahoo.com
> >> > > MSN Chat: lars_boegild_thomsen at hotmail.com
> >> > > http://www.justit.ws
> >> > >
> >> > > _______________________________________________
> >> > > Asterisk-Dev mailing list
> >> > > Asterisk-Dev at lists.digium.com
> >> > > http://lists.digium.com/mailman/listinfo/asterisk-dev
> >> > >
> >> >
> >> > _______________________________________________
> >> > Asterisk-Dev mailing list
> >> > Asterisk-Dev at lists.digium.com
> >> > http://lists.digium.com/mailman/listinfo/asterisk-dev
> >> >
> >>
> >> _______________________________________________
> >> Asterisk-Dev mailing list
> >> Asterisk-Dev at lists.digium.com
> >> http://lists.digium.com/mailman/listinfo/asterisk-dev
> >>
> >
> >_______________________________________________
> >Asterisk-Dev mailing list
> >Asterisk-Dev at lists.digium.com
> >http://lists.digium.com/mailman/listinfo/asterisk-dev
>
>
> _______________________________________________
> Asterisk-Dev mailing list
> Asterisk-Dev at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-dev
>




More information about the asterisk-dev mailing list