Ubuntu Asterisk Oddness

I have a virtual machine running Ubuntu 8.10 Server and I’ve been meaning to give VoiceGlue a try to see if I could set up my own completely open source VoiceXML platform,

I found that I was able to run sudo apt-get install asterisk at the command line, and I started to get excited. This was going to be the easiest Asterisk install yet. I was very soon disabused of this foolish notion.

The Asterisk install seemed to go smoothly, as did the basic set up and config. Just to make sure I was doing things by the numbers I set up a couple of extensions and a quick test to have Festival read something back to me. So far, so good. Next it was on to the VoiceGlue install.

Following the instructions in the VoiceGlue Wiki, the install went smoothly. All three VoiceGlue-related services started just fine (the voiceglue service itself barked at me because I had not yet set up call routing in /etc/voiceglue.conf – once I did this, it started up just fine.)

That’s when things got weird. The VoiceGlue Wiki says:

Phoneglue also needs to be contacted via FastAGI for all calls that it will handle, and it needs to use a particular context, extension, and priority to send calls to itself.

OK, no worries there. I set up a new context in /etc/asterisk/extensions.conf and then reloaded the dialplan from the Asterisk console. So far so good. Then, the oddness set in.

I kept seeing an error in the Asterisk logs saying:

res_agi.c:229 launch_netscript: Connect to 'agi://localhost' failed: Connection refused

After banging my head against the wall trying to figure it out I decided to check and see if anything was listening on port 4573 (the default port for FastAGI). No dice.

I tried running the test AGI script comes with Asterisk (agi-test.agi). Again, no dice. In fact, it doesn’t look like there are any directories containing AGI scripts anywhere.

Ubuntu Asterisk seems to be looking in /usr/share/asterisk/agi-bin/ – it doesn’t exist. Neither does the usual directory for AGI scripts (/var/lib/asterisk/agi-bin/). Nor does another common directory – /var/spool/asterisk/outgoing.

Why is all of this missing from the Ubuntu version of Asterisk? Anyone have any thoughts? Did I miss something obvious during the install?

I’m still eager to try VoiceGlue, so it looks like I’ll be building Asterisk from scratch.


4 thoughts on “Ubuntu Asterisk Oddness

  1. Regarding your troubles getting voiceglue working, I suspect
    the problem is not with Asterisk. Voiceglue does not depend
    on any of the client-side AGI configuration from Asterisk.

    Instead, it appears that the phoneglue service is not running.
    Perhaps it can’t log in to the Asterisk Manager or something.

    You can find out for sure by looking in the dynlog logs as
    documented in the wiki’s User Guide.

    Hope this helps,
    Doug Campbell

  2. Doug – you were right. Not sure why the service wasn’t running.

    I restarted the virtual machine and ran a quick pgrep on each of the 3 services. All are now running and I’m able to make test calls to VoiceGlue.

    Thanks for your help!! Looking forward to experimenting with VoiceGlue – hats off to you guys for your great work on the project.

    I do still think its kind of weird about the missing directories in the Ubuntu Asterisk install – guess I’ll dive deeper into that another day.

    Thanks again!

  3. I am not as successful as you were. I get a database error after I install Asterisk on my Ubuntu 10. I have to use a different user and pass but then went with the default and it still did not work. I then have my sql database open without pass to the root just for troubleshooting and still no go. Can you point me to a good installation manual that you used to install yours?

  4. Calvin:

    What exactly are you trying to install?

    If you’re just installing the base Asterisk program on Ubuntu 8.10, then you can do this with a simple sudo apt-get install asterisk – This will install Asterisk 1.4 on your system.

    Since I’m doing pure SIP on my Ubuntu/Asterisk server, I’m not installing or configuring the Zapata telephony drivers or libpri. Once you’ve installed the main Asterisk program, you can edit the config files you need to set up trunks, extensions and your dial plan rules. Then you should be able to just do sudo /etc/init.d/asterisk start to start it up.

    It sounds like you might be trying to install one of the Asterisk GUIs. If so, have a look at https://wiki.ubuntu.com/AsteriskOnUbuntu – this might help you.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s