From Electron Cloud
Jump to: navigation, search


I've been playing with Asterisk off and on in my spare time. It's a bit of a bear to configure!

I had tried VOIP service a couple years ago from iConnectHere and gotten a Grandstream BT100 to use with it. The primary goal was for my wife to have a cheap way to call her family in Belarus. Unfortunately that's one of the most expensive countries to call in that part of the world. No doubt the government phone monopoly there is charging 20+ cents/min just to terminate the calls, because I can't find service anywhere for less than 25 cents or so. But it simply wasn't reliable. In several months and many attempts I think we got through once or twice. No doubt you'd have better luck if you are calling different countries, so I'm not saying iConnectHere is so terrible, just that I experienced technical problems which they tried to solve and were ultimately unable. And it worked dandy for just calling within the United States.

So, I want to use the Grandstream with my new router running Asterisk. It's a 600MHz fanless dual-ethernet Epia motherboard mounted in a 1U rack case (with a fan ironically), so far running Gentoo on a laptop hard drive. It runs from 24VDC power from my solar/battery setup. I had it sortof working several months ago but then had some problems with the power supply in this box and had to RMA it. When I got around to getting it running again this last weekend, I saw that Asterisk 1.0.9 was out so decided to upgrade. But I already forgot everything I knew about the config files (and there are too many of them anyway - sheesh!) so I decided to try AMP, which promises to make managing Asterisk much easier. Well, it has a lot of requirements, some of which I didn't really want to install on this box, but I slogged through it all and got AMP working. It still took a while to figure out how to get around in the web management interface which AMP provides, but in the end I was able to get the Grandstream to register itself as extension 200 and I can access voicemail. That's about it. If a call comes in, it answers very quickly, says "goodbye" and hangs up. Despite the configuration I made which is supposed to ring extension 200. As for outgoing calls, I configured that too but it always says "all lines are busy" when I try to make a call. So I think the basic problem is Asterisk is so darn complex that nobody's been able to figure out how to really simplify it for normal home use. It's all about creating the kind of voice-response hell that you nearly always encounter when calling a business of any size. There is still room (and I bet there will be, for many years) for a more dumbed-down system. Preferably one that doesn't depend on both PHP _and_ perl, mysql, apache, various stuff from cpan etc. It should make some reasonable assumptions about what home users want - multiple extensions yes, multiple voicemail maybe (depending on whether you've got kids or roommates), but ring all the phones if the call is within normal hours, and try to ensure there's always a way to place an outgoing call, choosing by priority among the services available. Unless you go out of your way to change any of this.

Also the web interface for AMP has too many text fields which you must fill out (like number-matching rules for instance) and nothing to help you do it. At least they have pop-up help balloons in some of those cases.

It's very good that there are so many asterisk-oriented semi-wholesale VOIP carrier services now. None of that polished Vonage stuff for me, thanks. (They charge too much. I want to pay by the minute, not by the month, because I try to avoid talking on the phone as much as possible anyway.)

A couple years ago I was using vgetty, which is OK as far as it goes, and I had a PHP web interface for checking voicemails too. It was kindof slick. But VOIP makes it obsolete. And I'd really like to get rid of the $50ish phone bill every month, just for basic service. Amazing how taxes and caller ID make it so much more than the price that they advertise.

But the Cox cable 'net service, after many years of reliability (I was one of their first customers in Phoenix back in 1997), quit working about a week ago. A tech came out and replaced all the F connectors on all the cables and it started working again. But now I see that it can temporarily stop and the modem re-trains, and this happens quite often. I wonder if my modem isn't quite working like new. So maybe VOIP isn't going to be very reliable either until this problem gets solved.

I also discovered Limey Linux. It partially realizes a goal I was trying for a year or so ago with this Epia box - I wanted to boot from a CF card, use a ramdisk for the root filesystem, and power up the hard drive only once a day or so to back up the files in case the box goes down. (Running from DC power off a big bank of batteries, it shouldn't ever go down. But the batteries are old and not in as good condition as I hoped. They fade pretty fast when they're not being charged.) That should save some power. I already maxed out the RAM at a full gig (there's only one slot on an Epia). And I wanted to use uclibc and busybox to try to optimize it for space and speed at the same time. (On Via processors, there is not enough processor cache, so smaller code usually ends up being faster, unlike on a typical X86 where you often make space/speed tradeoffs.) But I didn't get very far. It was hard enough to build a kernel that will boot on this box - I've never seen so many problems on any Intel or AMD processor. Then there is the matter of building everything else. Asterisk has some dependencies, and some of those wouldn't build against uclibc, and asterisk itself also had some problems with this.

Well Limey is built using buildroot, an excellent set of makefiles for building embedded systems of all kinds. I've seen it used successfully for other projects, such as the GumStix version of Linux, and the TuxScreen. It uses uclibc. It boots from a CF card. It runs from a ramdisk (only 256M in total necessary though). It can re-update any changed config files onto the CF card. It can compile Asterisk natively. It at least includes the iptables command. So that's getting kindof close to what I want.

But it doesn't include any firewall scripts, mail server, php, and so on and it would probably continue to be a lot of work to compile some of that stuff. I haven't taken the time to learn iptables that well and usually use gshield.

So what I really want is probably more like a uclibc branch of Gentoo, with some mods to do the ramdisk/cf thing. I bet it will happen pretty soon. You can already configure it to use uclibc in make.conf, you just won't succeed in compiling everything if you do so. I like being able to compile anything I suddenly find out that I want, rather than being stuck with "just a router". If I wanted a plain old router I could just use a WRT54GS. Could even put asterisk on it.

In the meantime I think I'll stick with running Gentoo off the hard drive.

Usability; temporal organization

Slashdot linked to an interesting article today. I mostly agree with the points he makes about the big glaring things that are wrong with most of the prevalent computer UI's. Somebody commented about Symphony OS at least getting Fitts's Law right. That looks like an interesting system to try. It's based on Linux and some existing UI packages, just does a couple of new things. Mostly the big idea is to make the desktop useful for finding everything you should reasonably need to find, and try to get rid of extraneous menus and dialogs.

I question using the lower-right corner just for "trash" though. I know it's a venerable tradition but I think I would replace it with "history". Outlook has the Journal - it tracks certain things you have done throughout the day in certain Microsoft programs. I think this idea could be extended to track most of what you have done in most programs on a Linux box - URLs you visited, individual commandlines that you typed, calculations that you did, documents you edited, as well as the obvious email and IM stuff. Well maybe it's all kindof obvious but nobody's done an integrated history like that yet.

As disk space grows, and methods of organization improve, there may not be much of a need for trash anymore. I know I rarely delete things from my home directory. At work I delete much more, because of collaboration. Often you must get a copy of something just to look at it, or to imporve on it, and then you delete it when you're done with it, or upload it to a shared storage space. At home, what I create is stuff I want to keep, and I only download things I really need to use. Anyway I have a separate directory for downloads.

The top level of my home directory is a very disorganized mess because I used to create files directly in it. I've gotten into the habit of using a few subfolders for certain things (projects, letters, documents I downloaded, recipes, source code, pictures, art, etc.) It mostly works but I find more and more that what I want to see is temporal organization rather than alphabetic or hierarchical. I've added a new alias to my bashrc on all my systems and use it more than I ever thought I would:


It shows me the most recent files at the bottom, with dates so I can see when I was working on what. And my memory is getting kindof bad (even though I'm way too young for that) so it helps me remember what I was last doing, which projects I was working on when. But it does not give me a clear picture of everything at once, everything that I was doing at some point in time, just the files in one folder. I'm going to solve this problem some day. But first I have to build a new portable, extensible gui system that I will be comfortable using for the rest of my life, not build on an obsolete thing like X or any existing toolkit that runs on it.

another wiki solution, maybe

I've been playing with Chicken scheme lately, which so far I think is one of the best Schemes I've worked with, nearly as good as Chez (which is commercial and much too expensive for mere mortals, assuming you want the compiler.) There is an extension for it to do wiki processing, just to take wiki-like text and generate HTML. And one thing I don't like about existing wikis is that they tend to use databases (mysql, Berkeley or otherwise). So I'm thinking of just putting .wiki files (which will contain wiki syntax, of course) in a directory and having the file name be the title; I mean you don't really need a full relational db to map names to files (that's something a filesystem is good at). There will have to be some auxiliary indices though, in files, which it will be possible to rebuild at any time from scratch. Or maybe in the future, Reiser4 could be put to good use storing some useful metadata right in the filesystem. And for now, I will probably use something like swish++ to do full-text search on all content. I have used it for MediaWiki already, for a wiki at work, because MW doesn't normally allow searches in uploaded content. With swish you can build an auxiliary index for "images" (which can include PDFs and HTML after all, and anyway you can index the metadata in other kinds of images like JPGs and PNGs).

So maybe I will be able to switch from MediaWiki to a scheme version, and it will be much easier for me to add new features than it has been to hack MediaWiki. Not that I don't know PHP, I just don't know the MW code well enough, and the internationalization (while it is a very good feature) makes it hard to hack because there aren't many identifiable strings in the code, so you can't always immediately tell what you are looking at without a lot of grepping around.

I'd like to call the new one chiki, but I see that's taken already. Geez.


To make a long story short, I've not been so impressed with a product in a very, very long time! This thing is freakin' amazing, and I would recommend it to anybody, high price be damned! It's overpriced, yes, but worth it. Sometimes you just gotta live a little. Ordinarily I'd feel a bit bad that they released the 3d generation version right after I bought the 2d generation one, but apparently there's not any difference other than the looks. (And kudos to them for being so honest as to actually say so right on their web site.) As usual, it's worthwhile to buy better hardware that supports free software properly, and Slim Devices has done quite a good job of that. I'm happy to support them for embodying the very opposite of the greedy, lazy lameness that you find in most "for profit" companies.

Fry's had the Streamium SLA-5500 on sale for $49.95 a couple months ago and I made the mistake of picking one up. I never got it to work at all, not even with the exact setup that should have fit best (XP, with uPNP turned on, using the same wireless network that the Streamium is sitting on). Maybe it was defective, but it didn't seem like it; it managed to get on my WiFi network, do DHCP and get an address, yet after that remain totally deaf and dumb. It couldn't find the Philips Media Manager server, nor could their diagnostic utility find it. And it only supports WMA and MP3 - yuck to both. It is amazing they could sell a wifi device so cheap. It's supposed to be uPNP standards compliant, and therefore perhaps not strictly dependent on their own PMM server. And it does have a nice form factor. But in the end I had to slink back to Fry's and wait 1/2 hour in their stupid returns line while the completely un-empowered minions there kept yelling "password" after every step of the process of everyone in front of me. I might have risked an exchange if it wasn't for this terrible waste of time.

A couple years ago (end of 2002 I think) I got a Rio Receiver and hoped to make it as functional as a SqueezeBox. I still have hope for that, but now I think it might really be best to just make it emulate a SqueezeBox as closely as possible. What I really wanted (and still do, maybe) was to make it simply play an RTP stream containing FLAC encoded audio. The UI was insufficient anyway with their included software (no streaming of any kind - you have to select individual songs or playlists); I'd rather have the server be in complete control of what's next, and remote-control it from a web browser rather than from the little LCD and remote. And I'd like to have it mix that FLAC stream with a secondary channel which could be used for announcements (caller ID, security system warnings, the doorbell, that sort of thing). Doing much more than that is just too taxing for its little slow-poke ARM processor. When I tried to add RTP functionality to Reza's Rio Receiver, it just seemed to push it over the edge - too many threads, and not enough CPU time to get much audio decoding done. (RRR includes an embedded web server though.) The big advantage the Rio Receiver has over all the other network audio players is that it has a little audio amp built in. It doesn't have enough power for your main media-room system but it's just the thing for little auxiliary music systems in the bedroom, kitchen, bathroom etc.

Anyway there just aren't many features that SlimServer doesn't have, that I could want. It's unobtrusive (not requiring me to set up MySQL by hand for example, like so many jukeboxes do), scans the content pretty fast, has most of the jukebox sequencing and organization features that anybody could want, and generally just works. I think I'm going to really like the alarm clock feature. They used such a good DAC for wonderful quality sound, as well as having SPDIF output (not that I have anything to plug it into). The display totally rocks, and it's hackable! In Perl! Even the fonts are hackable! It decodes FLAC right on the SqueezeBox, so that's the obvious choice both for ripping (I was already using FLAC for that) and network streaming.

Well I just got it today, so we'll see, but I haven't found much not to like yet, and I'm usually kindof picky about technology. What I did see:

  • The clock by default display seconds, but the rhythm is off - sometimes they change too fast, sometimes there is a pause and then it skips 2 seconds at once. Better not to display them at all if they are not accurate.
  • It doesn't deal with Unicode metadata or UTF8 filenames, and the fonts only support the Latin-1 charset anyway. But they're already working on it!
  • It crashes sometimes. Random play was making it crash every time for a while, and it was either because I had deleted some files that it still thought existed, or maybe it had to do with the files that have UTF8 filenames. After deleting all of those and re-scanning, it's OK again.
  • It doesn't notice new files quickly enough. You can use the web interface to ask it to re-scan your content, and it can scan automatically once a day, but it should really either scan continuously at low priority, or, if the OS supports it, use some kind of "subscribe for changes" mechanism to be notified when files are written.

I wanted to use it in the bathroom but it's too cool for that, and I think I want to be able to make use of the alarm clock feature. You really don't need an alarm clock if you have this; it can display the time and date as a "screen saver" when it's not playing music, and lets you set a different alarm for every day of the week, playing music you want to hear rather than the radio.

So I'm not sure what I'll put in the bathroom. I got an old Alpine car stereo amp off ebay, so I can run it from 12VDC power (I ran wires for this in anticipation, alongside the ethernet and speaker wires, when I started the bathroom remodeling project last year). I planned to use it with the Streamium if it had worked. Well maybe I could still mod a Rio to run off DC power, have to check into that...

Amplifier for the bedroom SqueezeBox

The SqueezeBox is working like a dream come true. The bleeding-edge server software supports Unicode metadata, so even Russian music results in Russian names scrolling across the display. (It uses a TrueType font and the server does the rendering from text to bitmap in that case, whereas for plain old Latin1 the rendering is done on the SqueezeBox itself, from a bitmap font.)

I have discovered that the second (like mine) and third-generation ones are missing a "geek port" which was in the first-generation ones. That port had an active-low 3.3V pin for the power signal, so when you power off the box via the remote, it goes high. It would be nice to use that to control an external amplifier. So I bought a first-generation box on ebay, and I think I will try to integrate that plus an amplifier in one box, and use it in the bathroom. The disadvantage of the first-generation box is it has a 5x7 character VFD rather than the fancy graphical kind in the new one, so you can only display Latin1 text, and only in one font. I figured in the bathroom I don't care as much - just want to get something playing and hop in the shower, not watch the display.

I could still use a WiFi SqueezeBox. I'd like to mount that and another amplifier in a portable box, with a rechargeable battery and detachable speakers, like a 3-piece boom box. I would leave it in the dining room most of the time, hooked up to good speakers, and use the portable ones when I want to take it outside to the garage or something. The trouble is there isn't a good way to get ethernet into the dining room and keep it concealed, without re-doing some drywall afterwards, so wireless would be great there.

Last weekend I put two TriPath class T amplifiers in a box, for the bedroom SqueezeBox. I'm pretty happy with how it turned out. I think I will use one of these amps in the bathroom as well; the old Alpine would be much less efficient and bulky, too.

"Vacation" and more bathroom progress

I had some vacation time to use up at work (or else lose it at the end of January) and my wife is too busy to do any traveling or other fun stuff together, so I used the time to catch up on the bathroom project a bit.

Letter to Trader Joe's about edamame

I noticed that frozen, shelled edamame disappeared from the store. So I asked one of the associates why, and he said it's because TJ's decided not to import anything from China anymore. My next question: soybeans are grown all over the farming areas of the USA so why do you have to get edamame from Asia? Googled for "American edamame" and found this:

I don't have any reason you should buy from that company, but I wish you would sell some American organically grown beans in the store, either fresh or frozen. They are really great for salads, and now I have to buy them from an Asian market instead, which maybe isn't safe? I'm assuming that's why you stopped carrying them.