Scripted message line - is Asterisk the one for me?

I would like to provide some kind of scripted message/service/info line which will be used by charities providing recorded information for those without internet access. Yes, you’d be surprised at how many older people there are without the internet, and in the UK, almost all landline call packages give free evening and weekend calls. Perfect fit, right?

There will be NO need for outgoing calls, switching, indeed anything above and beyond scripting up to 9 audio files to be selected from a menu 1 or 2 levels deep. There does not need to be any GUI as the linux box is a VPS I’ll be ssh-ing into to configure it.

I’ve been googling and reading FAQs for just over half a week and I’m slightly more confused than before!

The idea is that audio files of possibly up to 45 minutes duration will be loaded onto a server; a user (perhaps a few concurrently) will dial in and will be able to select which file to listen to, and, most importantly, be able to select other info recordings, return to a main menu at any point, and to skip back and forth in increments (a minute/5 minutes at a time, like mobile voicemail does for example). Possibly, as a bonus, the caller may be able to leave feedback about the message they’ve just heard, but that’s less important right now.

I’ve got a Digitalocean Ubuntu droplet, I’m happy spinning up an Amazon instance if that’s better, and I’m reasonably comfortable with scripting, compiling and installing packages etc.

I’m particularly interested to see wiki.freepbx.org/display/HTGS/In … rver+14.10

This is particularly useful as all the “hosted” providers I’ve tried so far insist on WAV files and don’t provide transport control, which is a non-starter really.

Ultimately, what I need is something for the charity producing the information to be as simple as “upload/ftp 10 numbered mp3 files to this location, press the button and you’ll be live” (I can take care of the upload bit).

I’m still a bit confused about how I terminate a “real” number into a an IP address in the UK; I think I can eventually work that one out with some more Googling.

I’m happy to put the learning time in if someone can confirm that this is all going to be able to do what I think it is. Suggestions or pointers to FAQ’s for the cheapest flat rate incoming UK PSTN>VOIP (terminology?!?) provider and most minimal setup for a 512Mb VPS also appreciated :smile:

Hope that all makes sense - thanks!

To pre-empt the obvious suggestion of “why not just hire someone to build it”, well:
1: They’re a small local charity.
2: It would be an interesting project to learn with, and I enjoy learning new things.
3: If I spent the time learning it well, I could possibly even add Asterisk to my skills list.

This is quite doable with asterisk.

You should be able to even do it all in the asterisk extensions.conf dialplan using the wiki.asterisk.org/wiki/display/ … olPlayback ControlPlayback application

Read through the extensions.conf section for the Demo, That shows how to play a file using Playback, ControlPlayback is similar in nature.

If you don’t specify a path to ControlPlayback it’ll use the default sounds directory, Since you want to upload files via FTP you could set the paths to something like

Exten => MENU,1,Background(menu-message)
same => n,Waitexten(10)

Exten => 1,1,ControlPlayback(/home/charity/file1,300000)
same => n,Goto(MENU,1)

Exten => 2,1,ControlPlayback(/home/charity/file2,300000)
same => n,Goto(MENU,1)

And as long as your files are in a format Asterisk can play you’d have a ‘Press 1 for file1, Press 2 for File 2’ setup in just a few lines of code.

I would caution against the MP3 codec, I think format_mp3 is limited to 8khz files which you likely won’t have.

Find a sip provider, Setup your trunk into your server and go from there.

[quote=“johnkiniston”]This is quite doable with asterisk.

And as long as your files are in a format Asterisk can play you’d have a ‘Press 1 for file1, Press 2 for File 2’ setup in just a few lines of code.

I would caution against the MP3 codec, I think format_mp3 is limited to 8khz files which you likely won’t have. [/quote]

Thank you SO much - and apologies for the late acknowledgment, I thought I’d subscribed to the thread but evidently not.

Format conversion not a problem - I can put sox and or indeed any other command line audio conversion tool on the vps. Better still, if I could persuade the person uploading to pre-convert at their end, it would speed the upload up, too.

Anyway, you’ve filled me with confidence and enthusiasm. Now I just need to put some learning time in :smile:

I’m going to start by following this to get it installed as it applies specifically to the OS I’m familiar with - someone stop me if you think it’s a bad tutorial!
wiki.freepbx.org/display/HTGS/In … rver+14.10

Although that tutorial is for FreePBX, as far as I understand it, FreePBX is just a web gateway gui front end to Asterisk, therefore I can ignore the part about “Install and Configure FreePBX”, correct?

FreePBX use the GUI to configure asterisk, if you want to use text file do not use FreePBX.

OK, some months on and it looks like this is getting a little interest. Not much, but enough to have to keep track of 10 incoming “lines”, each with about 5 weekly recordings (ie:tracks).

It looks like I don’t need that FreePBX thing at all, as navaismo mentioned.

Given that funds and time are limited, automation is the key here, so I’m thinking I could provide ftp upload facilities - each organisation has a private folder, numbered 1…2…3 etc, and within that structure:

0.mp3 is menu (key 0)
1.mp3 is track one (key 1)
2.mp3 is track two (key 2)

Key 9 is “leave a message/feedback”.

I’ve also learnt that Asterisk has a database interface, but given a nice fixed structure, is that even necessary? The simpler the better. And given that there are NO outgoing calls, and ALL incoming traffic will be via one SIP provider, I can basically lock the server down to their originating IP range, which should block drive-by hacking attempts, yes?

I’ve tested it with two “lines” and it seems OK, so someone correct me if I’ve got this all massively wrong, but I basically need a standalone Asterisk 13 install, a few tweaks to a couple of conf files, the configuration to send any left messages as email attachments, and, er… that’s about it, right?

This all seems so (too?!) easy. What am I missing?!