<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><DIV>Here is my CLI from this morning.  We had a Page at 9:15 that was about 20 seconds long.  Then another Page at 9:18.  The first page worked fine.  It recorded in the correct file.  The second just disregarded the MEETME_RECORDINGFILE variable.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>------ CLI from Page that worked.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><B>[Sep 21 09:15:16] VERBOSE[13842] logger.c:     -- Executing [s@macro-pageall:14] Set("SIP/6101-086ce6c8", "MEETME_RECORDINGFILE=custom/paging/campuslastpage_47") in new stack</B></DIV><DIV>[Sep 21 09:15:16] DEBUG[13842] app_macro.c: Executed application: Set</DIV><DIV>[Sep 21 09:15:16] VERBOSE[13842] logger.c:     -- Executing [s@macro-pageall:15] NoOp("SIP/6101-086ce6c8", "custom/paging/campuslastpage_47") in new stack</DIV><DIV>[Sep 21 09:15:16] DEBUG[13842] app_macro.c: Executed application: NoOp</DIV><DIV>[Sep 21 09:15:16] VERBOSE[13842] logger.c:     -- Executing [s@macro-pageall:16] Set("SIP/6101-086ce6c8", "CALLERID(all)=System Page &lt;1010&gt;") in new stack</DIV><DIV>[Sep 21 09:15:16] DEBUG[13842] app_macro.c: Executed application: Set</DIV><DIV>[Sep 21 09:15:16] VERBOSE[13842] logger.c:     -- Executing [s@macro-pageall:17] Page("SIP/6101-086ce6c8", "SIP/6101&amp;SIP/6102&amp;SIP/6103&amp;SIP/6104&amp;SIP/6105&amp;SIP/6106&amp;SIP/6107&amp;SIP/6108&amp;SIP/6109&amp;SIP/6120&amp;SIP/6131&amp;SIP/6132&amp;SIP/6133&amp;SIP/6134&amp;SIP/6141&amp;SIP/6142&amp;SIP/6143&amp;SIP/6144&amp;SIP/6145&amp;SIP/6146&amp;SIP/6147&amp;SIP/6148&amp;SIP/6149&amp;SIP/6161&amp;SIP/6162&amp;SIP/6163&amp;SIP/6181&amp;SIP/6182&amp;SIP/6183&amp;SIP/6301&amp;SIP/6302&amp;SIP/6303&amp;SIP/6304&amp;SIP/6305&amp;SIP/6306&amp;SIP/6307&amp;SIP/6308&amp;SIP/6309&amp;SIP/6310&amp;SIP/6311&amp;SIP/6312&amp;SIP/6313&amp;SIP/6314&amp;SIP/6315&amp;SIP/6316&amp;SIP/6317&amp;SIP/6318&amp;SIP/6319&amp;SIP/6320&amp;SIP/6321&amp;SIP/6322&amp;SIP/6324&amp;SIP/6325&amp;SIP/6326&amp;SIP/6327&amp;SIP/6328&amp;SIP/6329&amp;SIP/6330&amp;SIP/6332&amp;SIP/6333&amp;SIP/6334&amp;SIP/6335&amp;SIP/6336&amp;SIP/6337&amp;SIP/6338&amp;SIP/6339&amp;SIP/6340&amp;SIP/6342&amp;SIP/6343&amp;SIP/6344&amp;SIP/6345&amp;SIP/6346&amp;SIP/6347&amp;SIP/6398&amp;SIP/6401&amp;SIP/6402&amp;SIP/6404&amp;SIP/6405&amp;SIP/6406&amp;SIP/6407&amp;SIP/6410&amp;SIP/6411&amp;SIP/6420&amp;SIP/6421&amp;SIP/6422&amp;SIP/us-pa|r") in new stack</DIV><DIV>[Sep 21 09:15:16] VERBOSE[13842] logger.c:     -- Called 6102</DIV><DIV>[Sep 21 09:15:16] VERBOSE[13842] logger.c:     -- Called 6103</DIV><DIV>----- Others.....</DIV><DIV>[Sep 21 09:15:16] VERBOSE[13842] logger.c:     -- Called 6406</DIV><DIV>[Sep 21 09:15:16] VERBOSE[13842] logger.c:     -- Called 6411</DIV><DIV>[Sep 21 09:15:16] VERBOSE[13842] logger.c:     -- Called us-pa</DIV><DIV>[Sep 21 09:15:16] VERBOSE[13842] logger.c:     -- &lt;SIP/6101-086ce6c8&gt; Playing 'beep' (language 'en')</DIV><DIV>[Sep 21 09:15:16] VERBOSE[13853] logger.c:     -- SIP/6106-086ca570 is ringing</DIV><DIV>----- Others.....</DIV><DIV>[Sep 21 09:15:16] VERBOSE[13924] logger.c:     -- SIP/6405-086dcee8 is ringing</DIV><DIV>[Sep 21 09:15:16] VERBOSE[13927] logger.c:     -- SIP/us-pa-0871b160 is ringing</DIV><DIV>[Sep 21 09:15:16] DEBUG[13842] app_meetme.c: Building dynamic conference '79166422d'</DIV><DIV>[Sep 21 09:15:16] VERBOSE[13842] logger.c:     -- Created MeetMe conference 1022 for conference '79166422d'</DIV><DIV><B>[Sep 21 09:15:16] VERBOSE[13842] logger.c:        &gt; Starting recording of MeetMe Conference 79166422d into file custom/paging/campuslastpage_47.wav.</B></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>------ CLI from Page that failed.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><B>[Sep 21 09:18:36] VERBOSE[14225] logger.c:     -- Executing [s@macro-pageall:14] Set("SIP/6101-b7a53170", "MEETME_RECORDINGFILE=custom/paging/campuslastpage_6") in new stack</B></DIV><DIV>[Sep 21 09:18:36] DEBUG[14225] app_macro.c: Executed application: Set</DIV><DIV>[Sep 21 09:18:36] VERBOSE[14225] logger.c:     -- Executing [s@macro-pageall:15] NoOp("SIP/6101-b7a53170", "custom/paging/campuslastpage_6") in new stack</DIV><DIV>[Sep 21 09:18:36] DEBUG[14225] app_macro.c: Executed application: NoOp</DIV><DIV>[Sep 21 09:18:36] VERBOSE[14225] logger.c:     -- Executing [s@macro-pageall:16] Set("SIP/6101-b7a53170", "CALLERID(all)=System Page &lt;1010&gt;") in new stack</DIV><DIV>[Sep 21 09:18:36] DEBUG[14225] app_macro.c: Executed application: Set</DIV><DIV>[Sep 21 09:18:36] VERBOSE[14225] logger.c:     -- Executing [s@macro-pageall:17] Page("SIP/6101-b7a53170", "SIP/6101&amp;SIP/6102&amp;SIP/6103&amp;SIP/6104&amp;SIP/6105&amp;SIP/6106&amp;SIP/6107&amp;SIP/6108&amp;SIP/6109&amp;SIP/6120&amp;SIP/6131&amp;SIP/6132&amp;SIP/6133&amp;SIP/6134&amp;SIP/6141&amp;SIP/6142&amp;SIP/6143&amp;SIP/6144&amp;SIP/6145&amp;SIP/6146&amp;SIP/6147&amp;SIP/6148&amp;SIP/6149&amp;SIP/6161&amp;SIP/6162&amp;SIP/6163&amp;SIP/6181&amp;SIP/6182&amp;SIP/6183&amp;SIP/6301&amp;SIP/6302&amp;SIP/6303&amp;SIP/6304&amp;SIP/6305&amp;SIP/6306&amp;SIP/6307&amp;SIP/6308&amp;SIP/6309&amp;SIP/6310&amp;SIP/6311&amp;SIP/6312&amp;SIP/6313&amp;SIP/6314&amp;SIP/6315&amp;SIP/6316&amp;SIP/6317&amp;SIP/6318&amp;SIP/6319&amp;SIP/6320&amp;SIP/6321&amp;SIP/6322&amp;SIP/6324&amp;SIP/6325&amp;SIP/6326&amp;SIP/6327&amp;SIP/6328&amp;SIP/6329&amp;SIP/6330&amp;SIP/6332&amp;SIP/6333&amp;SIP/6334&amp;SIP/6335&amp;SIP/6336&amp;SIP/6337&amp;SIP/6338&amp;SIP/6339&amp;SIP/6340&amp;SIP/6342&amp;SIP/6343&amp;SIP/6344&amp;SIP/6345&amp;SIP/6346&amp;SIP/6347&amp;SIP/6398&amp;SIP/6401&amp;SIP/6402&amp;SIP/6404&amp;SIP/6405&amp;SIP/6406&amp;SIP/6407&amp;SIP/6410&amp;SIP/6411&amp;SIP/6420&amp;SIP/6421&amp;SIP/6422&amp;SIP/us-pa|r") in new stack</DIV><DIV>[Sep 21 09:18:36] VERBOSE[14225] logger.c:     -- Called 6102</DIV><DIV>----- Others.....</DIV><DIV>[Sep 21 09:18:36] VERBOSE[14225] logger.c:     -- Called 6406</DIV><DIV>[Sep 21 09:18:36] VERBOSE[14225] logger.c:     -- Called 6411</DIV><DIV>[Sep 21 09:18:36] VERBOSE[14225] logger.c:     -- Called us-pa</DIV><DIV>[Sep 21 09:18:36] VERBOSE[14225] logger.c:     -- &lt;SIP/6101-b7a53170&gt; Playing 'beep' (language 'en')</DIV><DIV>[Sep 21 09:18:36] VERBOSE[14277] logger.c:     -- SIP/6319-b5fa79b0 is busy</DIV><DIV>----- Others.....</DIV><DIV>[Sep 21 09:18:36] VERBOSE[14297] logger.c:     -- SIP/6342-b5e0d0a0 is ringing</DIV><DIV>[Sep 21 09:18:37] VERBOSE[14309] logger.c:     -- SIP/us-pa-b5e4a318 answered</DIV><DIV>[Sep 21 09:18:37] DEBUG[14309] app_meetme.c: Building dynamic conference '177928251d'</DIV><DIV>[Sep 21 09:18:37] VERBOSE[14309] logger.c:     -- Created MeetMe conference 1021 for conference '177928251d'</DIV><DIV><B>[Sep 21 09:18:37] VERBOSE[14309] logger.c:        &gt; Starting recording of MeetMe Conference 177928251d into file meetme-conf-rec-177928251d-1190380716.710.wav.</B></DIV><DIV><BR class="khtml-block-placeholder"></DIV><BR><DIV> <SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><DIV>Forrest Beck</DIV><DIV><A href="mailto:jonforrest.beck@gmail.com">jonforrest.beck@gmail.com</A></DIV><DIV>www.shift8.biz</DIV><DIV><BR class="khtml-block-placeholder"></DIV><BR class="Apple-interchange-newline"></SPAN> </DIV><DIV><BR><DIV>Begin forwarded message:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite"><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT face="Helvetica" size="3" color="#000000" style="font: 12.0px Helvetica; color: #000000"><B>From: </B></FONT><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">Forrest Beck &lt;<A href="mailto:jonforrest.beck@gmail.com">jonforrest.beck@gmail.com</A>&gt;</FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT face="Helvetica" size="3" color="#000000" style="font: 12.0px Helvetica; color: #000000"><B>Date: </B></FONT><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">September 20, 2007 5:37:22 PM EDT</FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT face="Helvetica" size="3" color="#000000" style="font: 12.0px Helvetica; color: #000000"><B>To: </B></FONT><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">Asterisk Users Mailing List - Non-Commercial Discussion &lt;<A href="mailto:asterisk-users@lists.digium.com">asterisk-users@lists.digium.com</A>&gt;</FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT face="Helvetica" size="3" color="#000000" style="font: 12.0px Helvetica; color: #000000"><B>Subject: </B></FONT><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica"><B>Paging MEETME_RECORDINGFILE Variable</B></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV> <DIV>I am having a weird issue with setting the recording file for the Page app.  Here is some quick background info</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>I have a macro that pages all my phones:</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><I>[macro-pageall]</I></DIV><DIV><I>; Context for paging all devices.</I></DIV><DIV><I>;       This will search the sip table in the realtime database</I></DIV><DIV><I>;       for all phones that start with a number.  That number is</I></DIV><DIV><I>;       passed to this macro as ${ARG1}.</I></DIV><DIV><I>;</I></DIV><DIV><I>;       ARG1 = The first digit of the phones to be paged (6=US Campus, 4=MS, 2=LS)</I></DIV><DIV><I>;       ARG2 = Device for the PA system.  If the user selected to</I></DIV><DIV><I>;               page the PA system.  That will be included.</I></DIV><DIV><I>;</I></DIV><DIV><I>exten =&gt; s,1,MYSQL(Connect connid ${realdb_host} ${realdb_user} ${realdb_pass} ${realdb_db})</I></DIV><DIV><I>exten =&gt; s,2,MYSQL(Query resultid ${connid} SELECT\ name\ FROM\ sip\ WHERE\ name\ LIKE\ "'${ARG1}%'")</I></DIV><DIV><I>exten =&gt; s,3,MYSQL(Fetch fetchid ${resultid} number)</I></DIV><DIV><I>exten =&gt; s,4,GoToIf($["${fetchid}" = "1"]?5:7)</I></DIV><DIV><I>exten =&gt; s,5,Set(pagedevice=${pagedevice}&amp;SIP/${number})</I></DIV><DIV><I>exten =&gt; s,6,GoToIf($["${fetchid}" = "1"]?3:7)</I></DIV><DIV><I>exten =&gt; s,7,Set(pagedevice=${pagedevice:1})</I></DIV><DIV><I>exten =&gt; s,8,MYSQL(Clear ${resultid})</I></DIV><DIV><I>exten =&gt; s,9,MYSQL(Disconnect ${connid})</I></DIV><DIV><I>exten =&gt; s,10,GoToIf($["${ARG2}" != ""]?11:12)</I></DIV><DIV><I>exten =&gt; s,11,Set(pagedevice=${pagedevice}&amp;${ARG2})</I></DIV><DIV><I>;Add Call Info for GrandStream Phone on the PA system</I></DIV><DIV><I>exten =&gt; s,12,SIPAddHeader(Call-Info:answer-after=0)</I></DIV><DIV><I>;Add Alert-Info for all Polycom Phones</I></DIV><DIV><I>exten =&gt; s,13,SIPAddHeader(Alert-Info: Ring Answer)</I></DIV><DIV><I>exten =&gt; s,14,Set(MEETME_RECORDINGFILE=custom/paging/campuslastpage_${RAND(1|100)})</I></DIV><DIV><I>exten =&gt; s,15,NoOp(${MEETME_RECORDINGFILE})</I></DIV><DIV><I>exten =&gt; s,16,Set(CALLERID(all)=System Page &lt;1010&gt;)</I></DIV><DIV><I>exten =&gt; s,17,Page(${pagedevice},r)</I></DIV><DIV><I>exten =&gt; h,1,System(/var/lib/asterisk/scripts/mail_lastpage ${ARG1} ${MEETME_RECORDINGFILE})</I></DIV><DIV><I>exten =&gt; h,2,Hangup()</I></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>I call the macro with:</DIV><DIV><I>;Page All Phones including the PA system.</I></DIV><DIV><I>exten =&gt; 1010,1,Authenticate(12345)</I></DIV><DIV><I>exten =&gt; 1010,2,Macro(pageall,2,SIP/ls-pa)</I></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Basically the macro goes through my sip realtime database and finds all the phones that begin with the number 2 (my lower school campus).  The generates a variable named pagedevice that looks like this: </DIV><DIV>SIP/2101&amp;SIP/2102&amp;SIP/2103</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>This part works great.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>The issue I am having is setting the MEETME_RECORDINGFILE.  It should be set to an audio file in the custom sounds directory with a random number at the end.  I then use a hangup (h) extension to execute a script (at bottom of email) to email the audio file to a conference area in our email system (FirstClass).</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>What is weird is after I restart the asterisk process, this works fine for about a week.  It does exactly as it is supposed to, creates the audio file with a random number, then the email script delivers it.  After a week or so Asterisk will stop setting the variable MEETME_RECORDINGFILE and start placing the recordings in the sounds directory named meetme-conf-rec.######.wav.  Which is the default is MEETME_RECORDINGFILE is not set.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Anyone seen this issue before?</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Thanks!</DIV><DIV><BR class="khtml-block-placeholder"></DIV><BR><DIV> <SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><DIV>Forrest Beck</DIV><DIV><A href="mailto:jonforrest.beck@gmail.com">jonforrest.beck@gmail.com</A></DIV><DIV>www.shift8.biz</DIV><DIV><BR class="khtml-block-placeholder"></DIV><BR class="Apple-interchange-newline"></SPAN> </DIV><DIV>#!/bin/bash</DIV><DIV>#Set some variables</DIV><DIV>USFACULTY="<A href="mailto:ast-phonepages@somedomain.com">ast-phonepages@somedomain.com</A>"</DIV><DIV>LSFACULTY="<A href="mailto:ast-phonepages@somedomain.com">ast-phonepages@somedomain.com</A>"</DIV><DIV>USFACULTY="<A href="mailto:ast-phonepages@somedomain.com">ast-phonepages@somedomain.com</A>"</DIV><DIV>MONTH=`date +%B`</DIV><DIV>DAY=`date +%d`</DIV><DIV>YEAR=`date +%Y`</DIV><DIV>HOUR=`date +%I`</DIV><DIV>MINUTE=`date +%M`</DIV><DIV>ZONE=`date +%Z`</DIV><DIV>AMPM=`date +%P`</DIV><DIV>PGSOUNDDIR="/var/lib/asterisk/sounds/"</DIV><DIV>LOGFILE="/var/log/mail_lastpage.log"</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>#Write Log</DIV><DIV>echo "`date` Running script for campus $1 with file $2" &gt;&gt; $LOGFILE</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>#Let give asterisk time to finish creating the recordng file.  Just in Case.</DIV><DIV>sleep 10</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>#</DIV><DIV>#Create a temp file with our message body</DIV><DIV>#</DIV><DIV>echo "Repeat Last Page" &gt; /tmp/repeatpage_$1</DIV><DIV>echo "" &gt;&gt; /tmp/repeatpage_$1</DIV><DIV>echo "The attached WAV file is a copy of the last broadcast over the phone system."  &gt;&gt; /tmp/repeatpage_$1</DIV><DIV>echo "" &gt;&gt; /tmp/repeatpage_$1</DIV><DIV>echo "The page was broadcasted $MONTH $DAY, $YEAR at $HOUR:$MINUTE $AMPM. You may play this file back if you missed the page." &gt;&gt; /tmp/repeatpage_$1</DIV><DIV>echo "" &gt;&gt; /tmp/repeatpage_$1</DIV><DIV>echo "" &gt;&gt; /tmp/repeatpage_$1</DIV><DIV>echo "If you wish to mark this email as "read" (Remove Red Flag) without opening the email, you may right-click (or control-click for Mac) and left-click "Mark </DIV><DIV>as Read" before opening the email." &gt;&gt; /tmp/repeatpage_$1</DIV><DIV>#</DIV><DIV>#Send the email with the recorded Page attached</DIV><DIV>#</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV># Was it Upper School?</DIV><DIV>if [ "$1" -eq "6" ]</DIV><DIV>        then</DIV><DIV>                cat /tmp/repeatpage_$1 | mutt -a $PGSOUNDDIR$2.wav -s "Recording of Last Page for Upper School" $USFACULTY</DIV><DIV>fi</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV># Was it Middle School?</DIV><DIV>if [ "$1" -eq "4" ]</DIV><DIV>        then</DIV><DIV>                cat /tmp/repeatpage_$1 | mutt -a $PGSOUNDDIR$2.wav -s "Recording of Last Page for Middle School" $MSFACULTY</DIV><DIV>fi</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV># How about Lower?</DIV><DIV>if [ "$1" -eq "2" ]</DIV><DIV>        then</DIV><DIV>                cat /tmp/repeatpage_$1 | mutt -a $PGSOUNDDIR$2.wav -s "Recording of Last Page for Lower School" $LSFACULTY</DIV><DIV>fi</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>rm -rf /tmp/repeatpage_$1</DIV><DIV>rm -f $PGSOUNDDIR$2.wav</DIV><DIV>exit</DIV><BR></BLOCKQUOTE></DIV><BR></BODY></HTML>