<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 <1010>") 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&SIP/6102&SIP/6103&SIP/6104&SIP/6105&SIP/6106&SIP/6107&SIP/6108&SIP/6109&SIP/6120&SIP/6131&SIP/6132&SIP/6133&SIP/6134&SIP/6141&SIP/6142&SIP/6143&SIP/6144&SIP/6145&SIP/6146&SIP/6147&SIP/6148&SIP/6149&SIP/6161&SIP/6162&SIP/6163&SIP/6181&SIP/6182&SIP/6183&SIP/6301&SIP/6302&SIP/6303&SIP/6304&SIP/6305&SIP/6306&SIP/6307&SIP/6308&SIP/6309&SIP/6310&SIP/6311&SIP/6312&SIP/6313&SIP/6314&SIP/6315&SIP/6316&SIP/6317&SIP/6318&SIP/6319&SIP/6320&SIP/6321&SIP/6322&SIP/6324&SIP/6325&SIP/6326&SIP/6327&SIP/6328&SIP/6329&SIP/6330&SIP/6332&SIP/6333&SIP/6334&SIP/6335&SIP/6336&SIP/6337&SIP/6338&SIP/6339&SIP/6340&SIP/6342&SIP/6343&SIP/6344&SIP/6345&SIP/6346&SIP/6347&SIP/6398&SIP/6401&SIP/6402&SIP/6404&SIP/6405&SIP/6406&SIP/6407&SIP/6410&SIP/6411&SIP/6420&SIP/6421&SIP/6422&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: -- <SIP/6101-086ce6c8> 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: > 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 <1010>") 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&SIP/6102&SIP/6103&SIP/6104&SIP/6105&SIP/6106&SIP/6107&SIP/6108&SIP/6109&SIP/6120&SIP/6131&SIP/6132&SIP/6133&SIP/6134&SIP/6141&SIP/6142&SIP/6143&SIP/6144&SIP/6145&SIP/6146&SIP/6147&SIP/6148&SIP/6149&SIP/6161&SIP/6162&SIP/6163&SIP/6181&SIP/6182&SIP/6183&SIP/6301&SIP/6302&SIP/6303&SIP/6304&SIP/6305&SIP/6306&SIP/6307&SIP/6308&SIP/6309&SIP/6310&SIP/6311&SIP/6312&SIP/6313&SIP/6314&SIP/6315&SIP/6316&SIP/6317&SIP/6318&SIP/6319&SIP/6320&SIP/6321&SIP/6322&SIP/6324&SIP/6325&SIP/6326&SIP/6327&SIP/6328&SIP/6329&SIP/6330&SIP/6332&SIP/6333&SIP/6334&SIP/6335&SIP/6336&SIP/6337&SIP/6338&SIP/6339&SIP/6340&SIP/6342&SIP/6343&SIP/6344&SIP/6345&SIP/6346&SIP/6347&SIP/6398&SIP/6401&SIP/6402&SIP/6404&SIP/6405&SIP/6406&SIP/6407&SIP/6410&SIP/6411&SIP/6420&SIP/6421&SIP/6422&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: -- <SIP/6101-b7a53170> 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: > 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 <<A href="mailto:jonforrest.beck@gmail.com">jonforrest.beck@gmail.com</A>></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 <<A href="mailto:asterisk-users@lists.digium.com">asterisk-users@lists.digium.com</A>></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 => s,1,MYSQL(Connect connid ${realdb_host} ${realdb_user} ${realdb_pass} ${realdb_db})</I></DIV><DIV><I>exten => s,2,MYSQL(Query resultid ${connid} SELECT\ name\ FROM\ sip\ WHERE\ name\ LIKE\ "'${ARG1}%'")</I></DIV><DIV><I>exten => s,3,MYSQL(Fetch fetchid ${resultid} number)</I></DIV><DIV><I>exten => s,4,GoToIf($["${fetchid}" = "1"]?5:7)</I></DIV><DIV><I>exten => s,5,Set(pagedevice=${pagedevice}&SIP/${number})</I></DIV><DIV><I>exten => s,6,GoToIf($["${fetchid}" = "1"]?3:7)</I></DIV><DIV><I>exten => s,7,Set(pagedevice=${pagedevice:1})</I></DIV><DIV><I>exten => s,8,MYSQL(Clear ${resultid})</I></DIV><DIV><I>exten => s,9,MYSQL(Disconnect ${connid})</I></DIV><DIV><I>exten => s,10,GoToIf($["${ARG2}" != ""]?11:12)</I></DIV><DIV><I>exten => s,11,Set(pagedevice=${pagedevice}&${ARG2})</I></DIV><DIV><I>;Add Call Info for GrandStream Phone on the PA system</I></DIV><DIV><I>exten => s,12,SIPAddHeader(Call-Info:answer-after=0)</I></DIV><DIV><I>;Add Alert-Info for all Polycom Phones</I></DIV><DIV><I>exten => s,13,SIPAddHeader(Alert-Info: Ring Answer)</I></DIV><DIV><I>exten => s,14,Set(MEETME_RECORDINGFILE=custom/paging/campuslastpage_${RAND(1|100)})</I></DIV><DIV><I>exten => s,15,NoOp(${MEETME_RECORDINGFILE})</I></DIV><DIV><I>exten => s,16,Set(CALLERID(all)=System Page <1010>)</I></DIV><DIV><I>exten => s,17,Page(${pagedevice},r)</I></DIV><DIV><I>exten => h,1,System(/var/lib/asterisk/scripts/mail_lastpage ${ARG1} ${MEETME_RECORDINGFILE})</I></DIV><DIV><I>exten => 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 => 1010,1,Authenticate(12345)</I></DIV><DIV><I>exten => 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&SIP/2102&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" >> $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" > /tmp/repeatpage_$1</DIV><DIV>echo "" >> /tmp/repeatpage_$1</DIV><DIV>echo "The attached WAV file is a copy of the last broadcast over the phone system." >> /tmp/repeatpage_$1</DIV><DIV>echo "" >> /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." >> /tmp/repeatpage_$1</DIV><DIV>echo "" >> /tmp/repeatpage_$1</DIV><DIV>echo "" >> /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." >> /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>