Tannoy within freepbx?

Hello,

I’m currently setting up a FreePBX system and the customer has asked what they will do about their old tannoy system that worked within their old PBX. I’m going to be using Yealink phones, a mixture of T46G and T32G and was wondering how I would set up the tannoy.

Does anybody have any ideas?

<plaigarism>
compile mpg123 from source

Create MOH category either using the gui 

application=/usr/local/bin/mpg123 -q -s --mono -r 8000 -f 8192 -b 0 http://(radio stream)

Create the following extensions in extensions_custom.conf
exten => 300,1,Answer
exten => 300,2,MusicOnHold((name of MOH catagory))
exten => 300,3,Hangup

exten => 301,1,SoftHangup((tannoy extension eg DAHDI/1-1)|a)
exten => 301,2,Dial((tannoy extension eg DAHDI/1-1))
exten => 301,3,Hangup

exten => 303,1,Answer
exten => 303,2,playback(buzzer_x)
exten => 303,3,playback(buzzer_x)
exten => 303,4,playback(buzzer_x)
exten => 303,5,Hangup

Create a manager in the gui (tools > asterisk API) 

the following script when run ./script.sh|telnet will hang up the 
channel, originate a call from the tanoy to the beep extension. wait 
then originate a call back to music on hold

echo "open localhost 5038"
sleep 2
echo "Action: Login"
echo "Username: test"
echo "Secret: test"
echo
echo
echo "Action: Hangup"
echo "Channel: DAHDI/1-1"
echo
echo
echo "Action: Originate"
echo "Channel: DAHDI/1-1"
echo "Context: from-internal"
echo "Exten: 303"
echo "Priority: 1"
echo
echo
sleep 6
echo "Action: Originate"
echo "Channel: DAHDI/1-1"
echo "Context: from-internal"
echo "Exten: 300"
echo "Priority: 1"
echo
echo
\#echo "Action: Logoff"
echo
echo
sleep 4
At start of day run script (plays tone + starts radio)

run script every time want tones
run a script without the last originate to hang up radio and play a final tone
to talk on tanoy dial 301 and when done transfer to 300. NOTE: the tones will override talking
Should the music stop & exten 300 is silent reloading if freepbx starts it up again 

can start music using radio-only.sh | telnet
can play tone & start music using tone+radio.sh | telnet
can play tone & stop music using tone+noradio.sh | telnet
</plaigarism>

Given that - I’d say it should be relatively easy. With new versions of FreePBX, you’ll not use some of this stuff directly (the extensions_custom.conf stuff, for example) and may end up using the GUI for most of it.

Another important piece - there are literally HUNDREDS of better ways to create the call files that the ‘telnet’ scripts do. I think the toughest part of this is going to be getting the mp3 Music On Hold part going.

Presuming you have an analog input to your Tannoy system and if you have an audio output on your server and you have chan_console built by however you installed Asterisk then set up chan_console (in /etc/asterisk/console.conf) with a small impedance matching transformer if necessary. Just call your autoanswering console extension.