1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. If you had a PIAF Forum account in the vBulletin days, log in with your old credentials. Otherwise, sign up again and we'll get you back in business as soon as we can.
  3. A serious FreePBX vulnerability has been reported. Update your Framework Module immediately. Click here for details.

Overhead paging with v1.4 and OSS

Discussion in 'Add-On Install Instructions' started by Phone_User, Oct 12, 2008.

  1. Phone_User Guru

    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


    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


    asterisk -rx "console autoanswer off"

    and create a second file called ringoff.txt


    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

    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.

  2. MGD4me Guru

    I followed your directions, and got it working to about 95%.

    It would appear that although the *51 'page' access is attempting to use the script to toggle autoanswer from off, to on, the toggle doesn't take place. Instead, the speaker produces ringing.

    Likewise, if I manually change autoanswer to 'yes' in the oss.conf file, the reverse is true when calling extension 600 ring group, the console autoanswers immediately. SO, in both case, the scripts don't seem to have any effect.

    Also I noticed in the instructions where to add a line into the extension_override file, which reads "exten => 600,n,system(/etc/asterisk/ringoff.txt)". Since you would really want the console to only ring in this case, should the file being called not be "ring.txt" instead. I did try changing it to "ring.txt", but since my scripts are being ignored, I saw no change.

    I double-checked, and both scripts are asterisk owned.

    I'm scratching my head, as I'm sure I'm missing something simple. Just for fun, I tried executing the script manually before a page, and it DOES toggle the condition, just not programmatically.

    Anything obvious I should check?? Thanks.
  3. foneman Guru

    Paging interface

    We have found that paging amps are expensive, about $400.00 for a SIP amp. So, our electronics engineer came up with a great alternative. We have adapted a BT201 to work as a paging amp. you can specify the type of connection you need such as RJ11 or RCA/Bare Wire. Then you just create a paging group, I use 111, and you can then ring to it or use for overhead paging. Works great on the installs we have done and we are retailing these out for only $85 which we have sold some.
    There are some modifications we had to make as most legacy paging systems run on 8ohm setup and we had to add components to the internals but for less than 100, it is a great alternative. Does not help if you need zones though.
  4. MGD4me Guru

    I've decided that for my application I don't really 'need' to send 'ringing' over the paging sound system when an incoming call hits a ring group. So, I just changed the 'autoanswer' variable in the oss.conf file from 'no' to 'yes'.

    Now, for straight 'paging' functions, it works fine. I still don't understand why the 'ring.txt' and 'ringoff.txt' scripts are being ignored, but I'll leave that for another day.

    Thanks for putting together the 'how-to' !! :biggrin5:
  5. Alex728 Guru

    if its just a small number of zones, why not use more than one, and different extensions linked to page groups?
  6. Phone_User Guru

    Hmm it's odd that the two scripts are not working. Make sure asterisk is the user and group and that they are exacutable. That is the only thing I can think off.

    I do know that at times it will get stuck on one system I have it set up on. So every now and again I have to run the ringoff script manually.

  7. toddejohnson New Member

  8. Phone_User Guru

    I must have missed that FreePBX supports the use of the console. I would think that you still have to go into modules.conf and change oos to load.

Share This Page