[asterisk-users] MeetMe() and dahdi_dummy on an embedded system

Gordon Henderson gordon+asterisk at drogon.net
Thu Feb 25 13:52:09 CST 2010


On Thu, 25 Feb 2010, Vinícius Fontes wrote:

> ----- "Shaun Ruffell" <sruffell at digium.com> escreveu:
>
>> On 02/25/2010 11:19 AM, Vinícius Fontes wrote:
>>> I'm playing around with an ALIX 2D2 board
>> (http://www.pcengines.ch/alix2d2.htm). It's a fanless, x86 system
>> using an AMD Geode processor with 256MB of RAM. Also available are two
>> network interfaces, two USB ports and one serial port (no keyboard or
>> VGA). I'm using the Voyage Linux distro, which basically is Debian
>> Lenny optimized for this board.
>>>
>>> Asterisk 1.6.1.12 runs fine on the system. The only issue I'm having
>> is with MeetMe(). As there's no DAHDI devices attached, I'm running
>> dahdi_dummy. Audio gets all choppy on MeetMe(), but works fine for
>> other applications such as Playback(). SIP calls also work fine.
>>>
>>> Most probably it's a timing issue. I connected an Astribank unit
>> with 16 FXS in order to provide timing, and after that I get crystal
>> clear audio on MeetMe().
>>>
>>> Of course I wouldn't like to have an expensive Astribank attached to
>> the ALIX board just to provide timing. So my question is: is there any
>> way to improve dahdi_dummy's performance, or maybe some other way to
>> get this to work without the need for a physical DAHDI device?
>>
>> What version of DAHDI are you using?  As long as the host kernel is
>> able to accurately keep accurate wall time, I'm not aware of any
>> conditions that would prevent dahdi_dummy in dahdi-linux 2.2.1 from
>> working fine, so I'm very curious if this isn't the case.  In fact, in
>> the trunk of dahdi-linux dahdi_dummy.ko is off by default and dahdi.ko
>> will be able to keep time regardless of whether there are any physical
>> spans connected or configured.
>
> Sorry, forgot to include the DAHDI version.
>
> voyage:~# dahdi_cfg -tv
> DAHDI Tools Version - 2.2.1
>
> DAHDI Version: 2.2.1
> Echo Canceller(s):
> Configuration
> ======================
>
> I'm almost sure this board's RTC is not very accurate. Is there any way 
> to measure the RTC's accuracy?

I use these boards too. Brilliant little things. 5 watts and 80+ 
concurrent calls handling media before they fall over! Not much good for 
transcoding though...

   http://unicorn.drogon.net/cutie.jpg

However I have a slightly different approach in that I have my own 
semi-custom Linux for them which runs entirely in RAM. I also 
custom-compile the kernel for the architecture, and have compiled up dhadi 
and asterisk specifically for that CPU too. (Read my earlier whinges about 
it some time back!)

   dsx$ df -h
   Filesystem            Size  Used Avail Use% Mounted on
   /dev/ram0             136M   79M   58M  58% /
   /dev/hda3             189M   95M   95M  50% /data


dahdi_dummy on my systems use the high resolution timer and not RTC:

   dahdi: Telephony Interface Registered on major 196
   dahdi: Version: 2.2.0-rc2
   dahdi_dummy: Trying to load High Resolution Timer
   dahdi_dummy: Initialized High Resolution Timer
   dahdi_dummy: Starting High Resolution Timer
   dahdi_dummy: High Resolution Timer started, good to go

Other than a few quick tests, I've not really run many meetmes on one, but 
I have a few dozen of these out in the world with clients so I don't 
really know what they're doing with them... However they all use IAX 
trunking which I understand requires timing too.

There's a few tweaks you can do to the system even running the distro 
you're using - make sure no extra services are running - make sure logging 
is minimal and not using fsync on every write (see your syslog config 
file), mount partitions with the noatime and nodiratime flags - use as 
fast a CF card as you can get, and so on. (Google for tuning hints for 
systems like the Acer Aspire One and other similar laptops with SSDs and 
so on)

Output of ps ax:

   PID TTY      STAT   TIME COMMAND
     1 ?        Ss     0:01 init [2]
     2 ?        S<     0:00 [kthreadd]
     3 ?        S<     0:00 [ksoftirqd/0]
     4 ?        S<     0:00 [events/0]
     5 ?        S<     0:00 [khelper]
    60 ?        S<     0:00 [kblockd/0]
    67 ?        S<     0:00 [khubd]
   106 ?        S      0:00 [pdflush]
   108 ?        S<     0:00 [kswapd0]
   153 ?        S<     0:00 [aio/0]
   737 ?        S      0:00 [pdflush]
  1006 ?        Ss     0:00 /sbin/syslogd
  1010 ?        Ss     0:00 /sbin/klogd -x
  1021 ?        Ss     0:00 /usr/sbin/sshd
  1028 ?        Ss     0:00 /usr/local/apache2/bin/httpd -k start
  1042 ?        Ss     0:00 /usr/sbin/ntpd -p /var/run/ntpd.pid -g
  1047 ?        Ssl    0:00 /usr/sbin/asterisk -p
  1086 ?        Ss     0:00 /usr/sbin/cron
  1099 ttyS0    Ss     0:00 /bin/login --
  1323 ?        S      0:00 /usr/local/apache2/bin/httpd -k start
  2089 ttyS0    S+     0:00 -bash
  2094 ?        Ss     0:00 sshd: dsx at pts/0
  2098 pts/0    Ss     0:00 login -h yakko.drogon.net -p -f
  2099 pts/0    R      0:00 -bash
  2109 pts/0    R+     0:00 ps ax

Not sure I can get it any more minimal than that!

Gordon


More information about the asterisk-users mailing list