<div dir="ltr">I wanted to follow up that I had solved my issue to my satisfaction and share the dialplan that did so.<br><br>[sub-masspage]<br>exten => s,1,NoOP<br>same  =>   n,Answer<br>same  =>   n,Set(filename=PAGE)<br>
same  =>   n,Wait(1)<br>same  =>   n,Record(pagequeue/${filename}%d.gsm,0,60,yk)<br>same  =>   n,Set(DURATION=$[CEIL(${STAT(s,/var/lib/asterisk/sounds/${RECORDED_FILE}.gsm)} / 1650)])<br>same  =>   n,Playback(one-moment-please)<br>
same  =>   n,SIPAddHeader(Alert-Info: RingAnswer)<br>same  =>   n,SipAddHeader(Call-Info: <uri>\;answer-after=0); Yealink<br>same  =>   n,ExecIf($[${ISNULL(${ARG1})}=0]?Dial(LOCAL/GO$[${DURATION} +2]@sub-masspage,5,U(sub-pageit^${ARG1}^${RECORDED_FILE})gm)))<br>
same  =>   n,ExecIf($[${ISNULL(${ARG2})}=0]?Dial(LOCAL/GO$[${DURATION} +2]@sub-masspage,5,U(sub-pageit^${ARG2}^${RECORDED_FILE})gm)))<br>same  =>   n,ExecIf($[${ISNULL(${ARG3})}=0]?Dial(LOCAL/GO$[${DURATION} +2]@sub-masspage,5,U(sub-pageit^${ARG3}^${RECORDED_FILE})gm)))<br>
same  =>   n,ExecIf($[${ISNULL(${ARG4})}=0]?Dial(LOCAL/GO$[${DURATION} +2]@sub-masspage,5,U(sub-pageit^${ARG4}^${RECORDED_FILE})gm)))<br>same  =>   n,ExecIf($[${ISNULL(${ARG5})}=0]?Dial(LOCAL/GO$[${DURATION} +2]@sub-masspage,5,U(sub-pageit^${ARG5}^${RECORDED_FILE})gm)))<br>
same  =>   n,ExecIf($[${ISNULL(${ARG6})}=0]?Dial(LOCAL/GO$[${DURATION} +2]@sub-masspage,5,U(sub-pageit^${ARG6}^${RECORDED_FILE})gm)))<br>same  =>   n,ExecIf($[${ISNULL(${ARG7})}=0]?Dial(LOCAL/GO$[${DURATION} +2]@sub-masspage,5,U(sub-pageit^${ARG7}^${RECORDED_FILE})gm)))<br>
same  =>   n,ExecIf($[${ISNULL(${ARG8})}=0]?Dial(LOCAL/GO$[${DURATION} +2]@sub-masspage,5,U(sub-pageit^${ARG8}^${RECORDED_FILE})gm)))<br>same  =>   n,ExecIf($[${ISNULL(${ARG9})}=0]?Dial(LOCAL/GO$[${DURATION} +2]@sub-masspage,5,U(sub-pageit^${ARG9}^${RECORDED_FILE})gm)))<br>
same  =>   n,ExecIf($[${ISNULL(${ARG10})}=0]?Dial(LOCAL/GO$[${DURATION} +2]@sub-masspage,5,U(sub-pageit^${ARG10}^${RECORDED_FILE})gm)))<br>same  =>   n,Playback(auth-thankyou&goodbye)<br>same  =>   n,TrySystem(rm -f /var/lib/asterisk/sounds/${RECORDED_FILE}.gsm)<br>
same  =>   n,Hangup<br><br>exten => _GO[0-9][0-9],1,NoOP<br>same  =>                 n,Answer<br>same  =>                 n,Wait(${EXTEN:-2})<br>same  =>                 n,Hangup<br><br>exten => _GO[0-9],1,NoOP<br>
same  =>                 n,Answer<br>same  =>                 n,Wait(${EXTEN:-1})<br>same  =>                 n,Hangup<br><br>[sub-pageit]<br>exten =>  s,1,NoOP<br>same  =>   n,Set(CALLERID(NAME)=PAGE)<br>same  =>   n,Set(CALLERID(NUM)=PAGE)<br>
same  =>   n,Page(${ARG1},A(${ARG2})is),10)<br>same  =>   n,Hangup<br><br>;end sub-masspage<br><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Dec 5, 2013 at 5:36 PM, John Kiniston <span dir="ltr"><<a href="mailto:johnkiniston@gmail.com" target="_blank">johnkiniston@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>I've been working on writing a subroutine to page groups of phones at once and I'm having some difficulty.<br>
<br></div><div>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.<br>
<br><br></div><div><div><br>[sub-masspage]<br>exten => s,1,NoOP<br>same  =>   n,Answer<br>same  =>   n,Set(filename=$PAGE)<br>same  =>   n,Wait(1)<br>same  =>   n,Record(pagequeue/${filename}%d.gsm,0,30,yk)<br>

same  =>   n,Set(DURATION=$[CEIL(${STAT(s,/var/lib/asterisk/sounds/${RECORDED_FILE}.gsm)} / 1650)])<br>same  =>   n,Playback(one-moment-please)<br>same  =>   n,Set(MUTEAUDIO(all)=on)<br>same  =>   n,SIPAddHeader(Alert-Info: RingAnswer)<br>

same  =>   n,SipAddHeader(Call-Info: <uri>\;answer-after=0)<br>;same  =>   n,Set(TIMEOUT(absolute)=${DURATION})<br>same  =>   n,ExecIf($[${ISNULL(${ARG1})}=0]?Page(${ARG1},n(${RECORDED_FILE})is),10)<br>same  =>   n,ExecIf($[${ISNULL(${ARG2})}=0]?Page(${ARG2},n(${RECORDED_FILE})is),10)<br>

same  =>   n,ExecIf($[${ISNULL(${ARG3})}=0]?Page(${ARG3},n(${RECORDED_FILE})is),10)<br>same  =>   n,ExecIf($[${ISNULL(${ARG4})}=0]?Page(${ARG4},n(${RECORDED_FILE})is),10)<br>same  =>   n,ExecIf($[${ISNULL(${ARG5})}=0]?Page(${ARG5},n(${RECORDED_FILE})is),10)<br>

same  =>   n,ExecIf($[${ISNULL(${ARG6})}=0]?Page(${ARG6},n(${RECORDED_FILE})is),10)<br>same  =>   n,ExecIf($[${ISNULL(${ARG7})}=0]?Page(${ARG7},n(${RECORDED_FILE})is),10)<br>same  =>   n,ExecIf($[${ISNULL(${ARG8})}=0]?Page(${ARG8},n(${RECORDED_FILE})is),10)<br>

same  =>   n,ExecIf($[${ISNULL(${ARG9})}=0]?Page(${ARG9},n(${RECORDED_FILE})is),10)<br>same  =>   n,ExecIf($[${ISNULL(${ARG10})}=0]?Page(${ARG10},n(${RECORDED_FILE})is)10)<br>same  =>   n,Set(MUTEAUDIO(all)=off)<br>

same  =>   n,Playback(goodbye)<br>same  =>   n,TrySystem(rm -f /var/lib/asterisk/sounds/${RECORDED_FILE}.gsm)<br>same  =>   n,Hangup<br>;end sub-masspage<br><br></div><div>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.<br>

<br><br></div><div>While I was testing it with a single phone I was using Dial instead of Page<br><br>same  =>   n,ExecIf($[${ISNULL(${ARG1})}=0]?Dial(${ARG1},15,A(${RECORDED_FILE})S(${DURATION})mg)<br>))<br>same  =>   n,ExecIf($[${ISNULL(${ARG2})}=0]?Dial(${ARG2},15,A(${RECORDED_FILE})S(${DURATION})mg)))<br>

<br></div><div>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)<br>

<br></div><div>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.<br>

<br></div><div>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.<br>

<br>Suggestions?<span class="HOEnZb"><font color="#888888"><br></font></span></div><span class="HOEnZb"><font color="#888888"><div><br><br></div><div>-- <br>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.<br>

---Heinlein
</div></font></span></div></div>
</blockquote></div><br><br clear="all"><br>-- <br>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.<br>
---Heinlein
</div>