[asterisk-users] Paging in waves.

John Kiniston johnkiniston at gmail.com
Thu Dec 5 18:36:07 CST 2013

I've been working on writing a subroutine to page groups of phones at once
and I'm having some difficulty.

My goal is to have a user call an extension, I record the page they wish to
play, I then page out that recorded file to the phones in groups.

exten => s,1,NoOP
same  =>   n,Answer
same  =>   n,Set(filename=$PAGE)
same  =>   n,Wait(1)
same  =>   n,Record(pagequeue/${filename}%d.gsm,0,30,yk)
same  =>
/ 1650)])
same  =>   n,Playback(one-moment-please)
same  =>   n,Set(MUTEAUDIO(all)=on)
same  =>   n,SIPAddHeader(Alert-Info: RingAnswer)
same  =>   n,SipAddHeader(Call-Info: <uri>\;answer-after=0)
;same  =>   n,Set(TIMEOUT(absolute)=${DURATION})
same  =>
same  =>
same  =>
same  =>
same  =>
same  =>
same  =>
same  =>
same  =>
same  =>
same  =>   n,Set(MUTEAUDIO(all)=off)
same  =>   n,Playback(goodbye)
same  =>   n,TrySystem(rm -f /var/lib/asterisk/sounds/${RECORDED_FILE}.gsm)
same  =>   n,Hangup
;end sub-masspage

The issue I'm having is the Page command is putting the phone that's doing
the paging into the meetme bridge it's creating and the dialplan stops at
the first Page command.

While I was testing it with a single phone I was using Dial instead of Page

same  =>
same  =>

Which worked great when I sent it one phone in each argument.. Didn't think
about the fact that the first phone that answers is the only phone that
answers till I got deeper into writing it... (It's been a long day)

So I'm at a loss as what to do here, Dial almost does what I need other
than the fact that the first phone that answers is the only phone that
bridges, and Page almost does what I need other than my dialplan execution
stops after the first Page command and it's trying to include the phone I'm
calling from as one of the phones it's paging.

I'm using 1.8 so I've got Meetme and Confbridge available but I'm not sure
what to do unless I start playing with LOCAL channels. Maybe I could have
PAGE call Local Channels that have the TIMEOUT set but then I'd need a way
to pass which phones to dial in somehow.


A human being should be able to change a diaper, plan an invasion, butcher
a hog, conn a ship, design a building, write a sonnet, balance accounts,
build a wall, set a bone, comfort the dying, take orders, give orders,
cooperate, act alone, solve equations, analyze a new problem, pitch manure,
program a computer, cook a tasty meal, fight efficiently, die gallantly.
Specialization is for insects.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20131205/09feb881/attachment.html>

More information about the asterisk-users mailing list