Asterisk box

From Bob's Basement

Jump to: navigation, search

Project Inception: 23rd June, 2007

Status: In design

Project Leader: BOfH

Contents

Introduction

This is another random fun project. The idea is to have an Asterisk server for Bobs Basement and to code some AGI cleverness. I'll give it a PSTN number with SIPgate and also allow access via IAX. I'm thinking of dialing in for listening to project updates, maybe IRC and perhaps conferance calling. If you'd like a SIP or IAX account on the Asterisk server, then ask us *really* nicely.

Features

PSTN access

You can now call the Bob's Basement Asterisk server from the PSTN and a number of VoIP services.

PSTN: +44 (0)845 8679156
SIPgate: 8679156
FWD: 867482

You can also call from other providers using the FWD peerings. The FWD peer list, along with the access numbers can be found here: http://www.freeworlddialup.com/learnmore/?p=features&s=accessnumbers#peering

IVR script

Thank you for calling Bob's Basement. Calls may be recorded for training purposes. Please choose from one of the following one options. For weather forecasts, please press one.

1) Please enter the weather ID, followed by the hash key.

The weather forecast for $day is $weather maximum temperture $maxtempc degrees Celsius and $maxtempf degrees Fahrenheit\, minimum temperature $mintempc degrees Celsius and $mintempf degrees Fahrenheit. The wind speed is $windspeed in direction $direction. Visibility is $visibility\, pressure is $pressure and humidity is $humidity. Sunrise is at $sunrise and sunset is at $sunset.

Weather

Enter the BBC weather ID from http://www.bbc.co.uk/weather to get a weather report for the next three days.

IRC access

This feature is currently undergoing redevelopment.

At the moment the phone number connects to the Asterisk server on Hopper. This calls an AGI script which connects to a bot in #hvr. Long story short, the agi script reads out the IRC channel over the phone. A talking IRC channel! The bot reads the channel and writes it to a named pipe. The AGI script opens the other end of the named pipe and feeds the data through the Festival voice synthesis system.

Observers will notice that this is a really crap way to do this, since if the named pipe does not have the agi script connected to it (ie nobody is calling the number at this time) then the IRC bot freezes and eventually times out. Furthermore, only one process can read from the named pipe. If anyone knows how to do this properly, answers on a postcard, please.

My current plan for addresses the issues with the talking IRC server is to put the bot in a conference call and let users call in. I am currently waiting for the hosting company to provide the kernel modules needed to build the zaptel drivers for conference calling.

The third incarnation of this plan is to use a Flumotion streaming server with the IRC channel being read into a stream via Festival. AGI will then connect to the stream.

The code is available from subversion.

Useful info

Creating IVR files

To create IVR files with Festival, use the following commands:

echo "<message>" | text2wave -o <outputfile>.wav

sox <wavefile>.wav -r 8000 <gsmfile>.gsm resample -ql

This converts text to a wave file and then converts the wave file into a GSM file that can be used by Asterisk.

Wish list

For more information on the design and implementation, see here

FWD access
Wiki stats
Project updates
Dial in IRC
Find my weather ID
News
Talking clock
Remind me
Naught's and Crosses
Subnet calculator

Personal tools