login | register
Fri 29 of Aug, 2008 [07:52 UTC]

voip-info.org

Discuss [17] History

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



Asterisk | Applications | Functions | Variables | Expressions | Asterisk FAQ


Comments

Comments Filter
222

333Problem

by Zion800, Sunday 02 of September, 2007 [05:12:22 UTC]
When using the Page application on multiple Linksys SPA-942 phones, if a phone is in use, it will place that call on hold, and play the page on the speakerphone. I am using Asterisk 1.4.11. Any ideas?
222

333Drop off problem...

by wolfwitch, Friday 29 of June, 2007 [12:33:01 UTC]
For some reason with more recent versions of Asterisk (1.4.1+), paging stopped working for my Aastra phones. The phone would pick up, and then immediately hang up. I found adding a Wait(30), which also limits the page to 30-seconds, after the Page command fixed the problem. Not sure why it was happening though. It did not seem to be an issue with my Grandstream phone. It seems as if something needs to hold the channel open for the Aastra phones.
222

333Suggestion for future Asterisk and Polycom

by ardaei, Sunday 10 of December, 2006 [18:01:07 UTC]
Since Page application is utilizing meetme, By nature its resource intensive.
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.

222

333Re: Yes! it works with Polycom phones and Asterisk 1.2.13

by mrojas73, Wednesday 01 of November, 2006 [19:26:58 UTC]
Jerry, would you be kind enough to explain where you put the different contexts? I am using trixbox so I assume that the macro and local part goes in the extensions.conf and the extensions group goes in the extensions_custom.conf file.

Thank you very much.

Marco
222

333Re: Yes! it works with Polycom phones and Asterisk 1.2.13

by mrojas73, Wednesday 01 of November, 2006 [17:30:41 UTC]
Jerry, would you be kind enough to explain where you put the different contexts? I am using trixbox so I assume that the macro and local part goes in the extensions.conf and the extensions group goes in the extensions_custom.conf file.

Thank you very much.

Marco
222

333This works with Polycom phones and Asterisk 1.2.13

by Pepperdotnet, Monday 23 of October, 2006 [16:15:39 UTC]
This is my (finally) working configuration. In addition to this it required enabling the "Ring Answer" configuration in the Polycom sip.cfg as documented in http://www.voip-info.org/wiki/view/Polycom+auto-answer+config

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

222

333Yes! it works with Polycom phones and Asterisk 1.2.13

by Pepperdotnet, Monday 23 of October, 2006 [16:11:25 UTC]
Thanks Al, I just found this out Friday afternoon. I can verify it's working now.
222

333Re: Almost works with Polycom phones and Asterisk 1.2.12.1

by ardaei, Saturday 21 of October, 2006 [20:20:40 UTC]
i have exact same issue with 1.2.12.1 after 5 seconds it cuts out.
it seems to be a bug.( http://bugs.digium.com/view.php?id=8182 )
Version 1.2.13 is working fine though.
222

333

by Zion800, Tuesday 12 of September, 2006 [07:15:11 UTC]
Be careful when implementing this. When using answer-after=0, the SPA-XXX picks up, regardless of the fact that you may be in a conversation. It puts any onqoing conversation on hold when the intercom is in progress.

You can use Page.agi (found on the Wiki) to page the AVAILABLE phones in an office, using hints.
222

333Local/1577@page

by siegeld, Friday 05 of May, 2006 [20:28:32 UTC]
I don't understand the syntax of this command. What does the @page do - run the associated macro-page? If so, how does the macro actually work. I ask because what I want to do is to page a few SIP phones and also an external paging system connected via a ZAP line. To do this, I need to send down some DTFM tones on the ZAP/1 line. Could I somehow do this with ZAP/1@foobar, where the macro-foobar sends out the tones? I'm a bit confused.