Phone_User
Guru
- Joined
- Jun 9, 2008
- Messages
- 314
- Reaction score
- 0
Using asterisk v1.4 and setting up overhead paging is fairly simple. Our situation was to have both overhead paging in the Shop as well as have the speaker ring when the shop phone rang. Here are the steps I followed.
First go into modules.conf and change noload => chan_oss.so to load => chan_oss.so . This is around line 34. Then you have to create the oss.conf file. Here is what mine has
[general]
autoanswer=no
context=from-internal
overridecontext=yes
extension=s
playbackonly=yes
I have intentionally left autoanswer=no to make the speaker ring when the phone rings.
Now using your favorite editor create two simple script files in your /etc/asterisk directory and make sure they are owned by asterisk. The first file is ring.txt and it is like this
#bin/sh
asterisk -rx "console autoanswer off"
and create a second file called ringoff.txt
#bin/sh
asterisk -rx "console autoanswer on"
Again make sure they are owned and exacutable by asterisk. I found that even with autoanswer=no in the oss.conf file I sitll had to have the two scripts to make it work right.
Now edit extensions_custom.conf and below [from-internal-custom] place the following
exten => *51,1,system(/etc/asterisk/ringoff.txt)
exten => *51,2,Dial(console/dsp,20,A(beep))
exten => *51,3,Hangup()
This will allow you to dial *51 and page through the external speaker. You can make it any number you wish. I found *51 was the same as our old nortel phones.
Now in FreePBX create a custom extension and give it a number similar to your shop phone. My shop phone has the extension of 10128 so my external speaker I gave it 11128. You can use any numbers you like. In the custom dial string for the new extension put console/dsp.
Now create a ring group that includes your shop phone and your external speaker. Hit the redbar and now you need to reboot your entire system. Make sure you have your sound card installed or you have turned it on in the bios if it is on the motherboard.
Once the system is back up and running go into your extensions_additional.conf file. You may have to do this through webmin or on the command line as extensions_additional.conf is one of the files you should not muck with. Scroll down till you find [ext-group] and copy everything from [ext-group] down to ; end of [ext-group]. Now paste this into extensions_override_freepbx.conf. So you will have this
[ext-group]
include => ext-group-custom
exten => 600,1,Macro(user-callerid,)
exten => 600,n,GotoIf($["foo${BLKVM_OVERRIDE}" = "foo"]?skipdb)
exten => 600,n,GotoIf($["${DB(${BLKVM_OVERRIDE})}" = "TRUE"]?skipov)
exten => 600,n(skipdb),Set(__NODEST=)
exten => 600,n,Set(__BLKVM_OVERRIDE=BLKVM/${EXTEN}/${CHANNEL})
exten => 600,n,Set(__BLKVM_BASE=${EXTEN})
exten => 600,n,Set(DB(${BLKVM_OVERRIDE})=TRUE)
exten => 600,n(skipov),Set(RRNODEST=${NODEST})
exten => 600,n(skipvmblk),Set(__NODEST=${EXTEN})
exten => 600,n,Set(RecordMethod=Group)
exten => 600,n,Macro(record-enable,8000,${RecordMethod})
exten => 600,n,Set(RingGroupMethod=ringall)
exten => 600,n(DIALGRP),Macro(dial,60,${DIAL_OPTIONS},10128-11128)
exten => 600,n,Set(RingGroupMethod=)
exten => 600,n,GotoIf($["foo${RRNODEST}" != "foo"]?nodest)
exten => 600,n,Set(__NODEST=)
exten => 600,n,dbDel(${BLKVM_OVERRIDE})
exten => 600,n,Hangup
exten => 600,n(nodest),Noop(SKIPPING DEST, CALL CAME FROM Q/RG: ${RRNODEST})
; end of [ext-group]
Now just above this line
exten => 600,n(DIALGRP),Macro(dial,60,${DIAL_OPTIONS},10128-11128)
stick in this line
exten => 600,n,system(/etc/asterisk/ringoff.txt)
Now save and reload asterisk to pickup the changes.
Now plug a set of speakers into your box and dial *51 you should hear a beep then you should hear yourself speaking. Hang up and dial your ring group 600 and you should hear the speaker ringing along with your shop phone.
Most sound cards need some resistance to them and I have found that the external speakers will not work unless you cut one speaker off of your $10.00 set of speakers and then hook that upto the external speaker. Looks cheesy but it works. I know you can purchase amplifiers that go with most phone systems. I have found them to be quite expensive. As well if they are not close to your asterisk box a direct line from the sound card to the amplifier will not work as there is not enough load. I do think that you can purchase a small amp from the source for about 20 bucks and it is the size of a 10 pack of cds. It should work and look a bit more professional. I'm going out today to see if I can find one and will post if it works.
So that sums it up. You should now be able to page and ring over the same speaker. If two people try at the same time it should busy out for the second person.
Rob
First go into modules.conf and change noload => chan_oss.so to load => chan_oss.so . This is around line 34. Then you have to create the oss.conf file. Here is what mine has
[general]
autoanswer=no
context=from-internal
overridecontext=yes
extension=s
playbackonly=yes
I have intentionally left autoanswer=no to make the speaker ring when the phone rings.
Now using your favorite editor create two simple script files in your /etc/asterisk directory and make sure they are owned by asterisk. The first file is ring.txt and it is like this
#bin/sh
asterisk -rx "console autoanswer off"
and create a second file called ringoff.txt
#bin/sh
asterisk -rx "console autoanswer on"
Again make sure they are owned and exacutable by asterisk. I found that even with autoanswer=no in the oss.conf file I sitll had to have the two scripts to make it work right.
Now edit extensions_custom.conf and below [from-internal-custom] place the following
exten => *51,1,system(/etc/asterisk/ringoff.txt)
exten => *51,2,Dial(console/dsp,20,A(beep))
exten => *51,3,Hangup()
This will allow you to dial *51 and page through the external speaker. You can make it any number you wish. I found *51 was the same as our old nortel phones.
Now in FreePBX create a custom extension and give it a number similar to your shop phone. My shop phone has the extension of 10128 so my external speaker I gave it 11128. You can use any numbers you like. In the custom dial string for the new extension put console/dsp.
Now create a ring group that includes your shop phone and your external speaker. Hit the redbar and now you need to reboot your entire system. Make sure you have your sound card installed or you have turned it on in the bios if it is on the motherboard.
Once the system is back up and running go into your extensions_additional.conf file. You may have to do this through webmin or on the command line as extensions_additional.conf is one of the files you should not muck with. Scroll down till you find [ext-group] and copy everything from [ext-group] down to ; end of [ext-group]. Now paste this into extensions_override_freepbx.conf. So you will have this
[ext-group]
include => ext-group-custom
exten => 600,1,Macro(user-callerid,)
exten => 600,n,GotoIf($["foo${BLKVM_OVERRIDE}" = "foo"]?skipdb)
exten => 600,n,GotoIf($["${DB(${BLKVM_OVERRIDE})}" = "TRUE"]?skipov)
exten => 600,n(skipdb),Set(__NODEST=)
exten => 600,n,Set(__BLKVM_OVERRIDE=BLKVM/${EXTEN}/${CHANNEL})
exten => 600,n,Set(__BLKVM_BASE=${EXTEN})
exten => 600,n,Set(DB(${BLKVM_OVERRIDE})=TRUE)
exten => 600,n(skipov),Set(RRNODEST=${NODEST})
exten => 600,n(skipvmblk),Set(__NODEST=${EXTEN})
exten => 600,n,Set(RecordMethod=Group)
exten => 600,n,Macro(record-enable,8000,${RecordMethod})
exten => 600,n,Set(RingGroupMethod=ringall)
exten => 600,n(DIALGRP),Macro(dial,60,${DIAL_OPTIONS},10128-11128)
exten => 600,n,Set(RingGroupMethod=)
exten => 600,n,GotoIf($["foo${RRNODEST}" != "foo"]?nodest)
exten => 600,n,Set(__NODEST=)
exten => 600,n,dbDel(${BLKVM_OVERRIDE})
exten => 600,n,Hangup
exten => 600,n(nodest),Noop(SKIPPING DEST, CALL CAME FROM Q/RG: ${RRNODEST})
; end of [ext-group]
Now just above this line
exten => 600,n(DIALGRP),Macro(dial,60,${DIAL_OPTIONS},10128-11128)
stick in this line
exten => 600,n,system(/etc/asterisk/ringoff.txt)
Now save and reload asterisk to pickup the changes.
Now plug a set of speakers into your box and dial *51 you should hear a beep then you should hear yourself speaking. Hang up and dial your ring group 600 and you should hear the speaker ringing along with your shop phone.
Most sound cards need some resistance to them and I have found that the external speakers will not work unless you cut one speaker off of your $10.00 set of speakers and then hook that upto the external speaker. Looks cheesy but it works. I know you can purchase amplifiers that go with most phone systems. I have found them to be quite expensive. As well if they are not close to your asterisk box a direct line from the sound card to the amplifier will not work as there is not enough load. I do think that you can purchase a small amp from the source for about 20 bucks and it is the size of a 10 pack of cds. It should work and look a bit more professional. I'm going out today to see if I can find one and will post if it works.
So that sums it up. You should now be able to page and ring over the same speaker. If two people try at the same time it should busy out for the second person.
Rob