[Asterisk-Users] Office-wide paging with Asterisk and Cisco 7960 7940 phones
John Todd
jtodd at loligo.com
Sun Jan 18 14:22:10 MST 2004
I spoke the other day about my preliminary tests with office-wide
paging with Cisco phones using the new SIP 6.1 image which supports
auto-answer. I've got a small and crude recipe for those of you who
want to experiment and hopefully create some better and more complete
examples than the one I've thrown together below.
Create a new line on each of the Cisco phones, and put the
configuration into sip.conf as you normally would. I figure you have
enough clue to create a new line in sip.conf and on your Cisco phones
at this point. Go into settings -> Call Preferences -> Auto Answer
(intercom) and then make the "new" line you've just created as
auto-answer. (I wish there was a way to do this via the
configuration file! Having to set this while sitting in front of the
phone is silly and wasteful.)
Now that you have created a valid Asterisk-capable SIP line that
auto-answers, here's how you get the paging features to work:
Here's what I have in extensions.conf:
[conference]
exten => 5555,1,AbsoluteTimeout(21)
exten => 5555,2,AGI(callall)
exten => 5555,3,MeetMe(5555,dq)
exten => 5555,4,Hangup
exten => t,1,Hangup
exten => T,1,Hangup
exten => h,1,Hangup
;
[add-to-conference]
exten => start,1,AbsoluteTimeout(20)
exten => start,2,MeetMe(5555,dmq)
exten => h,1,Hangup
exten => t,1,Hangup
exten => T,1,Hangup
Here are the contents of /var/lib/asterisk/agi-bin/callall
#!/bin/sh
cp /var/lib/asterisk/agi-bin/*conf /var/spool/asterisk/outgoing
Make sure to make the script executable.
And then for every extension I have as an auto-answer, I have a file
like this in /var/lib/asterisk/agi-bin :
Channel: SIP/2006
Context: add-to-conference
Extension: start
Priority: 1
CallerID: Office Pager <5555>
So, I have three lines that are configured for automatic answering -
SIP/2006, SIP/2007, SIP/2008. I have three files named 2006-conf,
2007-conf, 2008-conf in /var/lib/asterisk/agi-bin that get copied
into the outgoing call spool directory every time I call extension
5555. These three lines are the auto-answer lines on each of the
three phone devices I'm experimenting with.
Now, dial 5555 from any phone and you should have one-way paging.
Voila! People who use the pager may have to get used to waiting 1-2
seconds before speaking to allow all the phones to catch up with the
audio stream. All of the phones hang up after 20 seconds, regardless
of if the person originating the page has stopped talking. Change
the AbsoluteTimeout values to increase this interval.
If you want a really confusing loud mess, then change the "dmq"
options to "dq" and you'll get an N-way conversation going with
everyone who has a phone. Bad.
If you want a really interesting office surveillance tool, change the
"dmq" to "dt" and you'll suddenly be listening to all of the
extensions in the office, like some kind of mega-snoop tool. Useful
for after-hours listening throughout the entire office.
Someone should improve my scripts with the following changes:
1) AGI should automatically show the caller ID of the person
originating the call instead of a generic pager address
2) The AGI should take arguments of what extensions to call and then
dynamically create the list of files that get copied out to the
/var/spool/asterisk/outgoing directory
JT
JT
More information about the asterisk-users
mailing list