Asterisk cmd Page
Created by: jamieg,Last modification on Mon 26 of May, 2008 [21:35 UTC] by JustRumours
Page()
Synopsis
Pages phones, i.e. transmit a message thru multiple phone (and/or their loudspeakers)Description
Page(Technology/Resource&Tech2/Res2...[|options])Places outbound calls to the given technology / resource and dumps them into a conference bridge as muted participants (if the 'd' option is not specified). The original caller is dumped into the conference as a speaker and the room is destroyed when the original caller leaves.
This requires a working MeetMe installation including an Asterisk timer.
Parameters
- d - full duplex audio (i.e. not a muted conference!!)
- q - quiet, do not play beep to caller
Example
[macro-page]; Paging macro:
; Check to see if SIP device is in use and DO NOT PAGE if they are
; ${ARG1} - Device to page
;
exten => s,1,ChanIsAvail(${ARG1}|js) ; j is for dump and s is for ANY call
exten => s,2,Set(_ALERT_INFO="RA") ; This is for the PolyComs
;exten => s,3,SIPAddHeader(Call Info: Answer-After=0) ; This is for the Snoms and Others
;exten => s,3,SIPAddHeader,Call-Info: sip:192.168.20.1/; answer-after=0
exten => s,3,SIPAddHeader(Call-Info:<sip:domain>\;answer-after=0) ; enter your domain
exten => s,4,NoOp() ; Add others here
exten => s,5,Dial(${ARG1}||)
exten => s,6,Hangup
exten => s,102,Hangup
[page] ; Paging context
exten => 202,Macro(page,SIP/polycom)
exten => 208,Macro(page,SIP/cisoo1aa)
exten => _X.,1,Macro(page,SIP/${EXTEN})
The line below goes in the context where you have your extensions:
exten => 7999,1,Set(TIMEOUT(absolute)=60)
exten => 7999,2,Page(Local/202@page&Local/208@page&Local/210@page/n&Local/interal 223@page|)
Example2
This works for Linksys SPAXXX and Snom phones. (confirmed working with Asterisk 1.2.7.1, Linksys SPA941, SPA942 & Snom 360. May 29, 2006)It implements both paging and intercom. Other phones would work as well but you would have to adjust the SIPAddHeaders for your brand of phone. NOTE: The Linksys SPAXXX phones already have *96 assigned so if you are going use *96 in Asterisk don't forget to first remove *96 from the phones Advanced Regional settings first! (The built in Paging feature of the Linksys phones only works with the SPA9000 so its safe to reuse it)
How to use it: Users pick up phone and dial *96. They hear a beep. Dial the extension of the person you want to intercom with OR dial * to page all phones.
exten => *96,1,Goto(intercom,s,1)
[intercom]
exten => s,1,Answer
exten => s,2,Playback(beep)
exten => s,3,Set(TIMEOUT(digit)=5)
exten => s,4,WaitExten(10)
exten => *,1,SIPAddHeader(Call-Info: <sip:10.1.1.171>\;answer-after=0) ; Change 10.1.1.171 to your Asterisk server's IP
exten => *,2,Page(SIP/3218x1&SIP/3219x1&SIP/3220x1) ; add all your devices here
exten => _XXXX,1,SIPAddHeader(Call-Info: <sip:10.1.1.171>\;answer-after=0) ; 4 digit extensions
exten => _XXXX,2,Dial(SIP/${EXTEN})
Here is how I got this to work for my polycom phones.
[page] ; if you cut and paste this make sure you include page under the context where your phones are
exten => *96,1,Goto(intercom,s,1)
[intercom]
exten => s,1,Answer
exten => s,2,Playback(beep)
exten => s,3,Set(TIMEOUT(digit)=5)
exten => s,4,WaitExten(10)
exten => *,1,SIPAddHeader(Alert-Info: Ring Answer)
exten => *,2,Page(SIP/202&SIP/231&SIP/207) ;add all extensions here
exten => _XXX,1,SIPAddHeader(Alert-Info: Ring Answer)
exten => _XXX,2,Dial(SIP/${EXTEN})
I also had to make these changes to the sip.conf file (actually I found this is in the sip.cfg polycom provisioning file, not the asterisk sip.conf file GTM)
<alertInfo voIpProt.SIP.alertInfo.1.value="Ring Answer" voIpProt.SIP.alertInfo.1.class="4"/>
and
<RING_ANSWER se.rt.4.name="Ring Answer" se.rt.4.type="ring-answer" se.rt.4.timeout="100" se.rt.4.ringer="11" ; you could also use 7 here
Note
As of Aug 16 2006, the following firmware versions seem to work when using SIPAddHeader(Call-Info: sip:\;answer-after=0) for auto-answer. While using SIPAddHeader(Call-Info: answer-after=0) does work for Grandstream it does not for Aastra or Snom;Aastra - 480i - 1.4
Grandstream - GXP2000 - 1.1.0.16
Snom - 360 - 6.2.3
See also
- bug/patch 10052: SIP BLF lights don't get turned off after Page() has been completed in Asterisk 1.2 or 1.4
- Asterisk cmd MeetMe
- Asterisk paging and intercom
- Asterisk phone door
Asterisk | Applications | Functions | Variables | Expressions | Asterisk FAQ
Comments
333Problem
333Drop off problem...
333Suggestion for future Asterisk and Polycom
One remedy would be sending out page through multicast.
I know Polycom and digium are establishing some sort of partnership and pretty soon we will have Polycom SIP firmware designed for Asterisk.
Polycom should be able to easily add a similar function like autoanswer, this new function should be sensitive to multicast packets.
As soon as it sees appropriate packet, checks phone and if its not beeing used, simply act as a normal autoanser, otherwise drop the packet.
I'm sure if we get these new "page multicast" in asterisk other phone manufactures will follow.
Again i'm not deeply familiar with SIP protocol, there may be some protocol issues that prevent this taught to happen.
333Re: Yes! it works with Polycom phones and Asterisk 1.2.13
Thank you very much.
Marco
333Re: Yes! it works with Polycom phones and Asterisk 1.2.13
Thank you very much.
Marco
333This works with Polycom phones and Asterisk 1.2.13
Dialing a single extension prefixed with "6" works in all cases. Using the "Page" option for multiple extensions works, but the called extensions drop out of the meetme conference after five seconds for some unknown reason. I hope somebody can enlighten me on this one. [note, Al enlightened me, this is due to a bug in 1.2.12.1 but it works with 1.2.13]
[macro-page]
; Paging macro:
; Check to see if SIP device is in use and DO NOT PAGE if they are
; ${ARG1} - Device to page
;
exten => s,1,ChanIsAvail(${ARG1}|js) ; j is for dump and s is for ANY call
exten => s,2,SIPAddHeader(Alert-Info: Ring Answer) ; this one is for the Polycom IP601
exten => s,3,Dial(${ARG1}|3|) ; should ring 3 seconds
exten => s,4,Hangup
exten => s,104,Hangup
[page] ; Paging context
exten => _X.,1,Macro(page,SIP/${EXTEN})
[local]
; 6 plus a three digit extension (3xx) pages that extension
exten => _63XX,1,AbsoluteTimeout,45
exten => _63XX,2,SIPAddHeader(Alert-Info: Ring Answer)
exten => _63XX,3,Dial(SIP/${EXTEN:1:4})
exten => _63XX,4,Hangup
exten => _63XX,104,Hangup
; 6666 pages the listed extensions, as many as you care to add
exten => 6666,1,AbsoluteTimeout,45
exten => 6666,2,Page(Local/314@page&Local/315@page|d) ;d=full duplex, q=no beep to caller
333Yes! it works with Polycom phones and Asterisk 1.2.13
333Re: Almost works with Polycom phones and Asterisk 1.2.12.1
it seems to be a bug.( http://bugs.digium.com/view.php?id=8182 )
Version 1.2.13 is working fine though.
333
You can use Page.agi (found on the Wiki) to page the AVAILABLE phones in an office, using hints.
333Local/1577@page