jonforrest.beck at gma... Guest
|
Posted: Thu Jan 17, 2008 3:37 pm Post subject: [asterisk-users] Paging Recording File |
|
|
I am looking to see if anyone has seen this problem before. I am
setting the MEETME_RECORDINGFILE variable in a macro, then using the r
option with the Page application to record the page. But the page is
only recorded to the file specified in MEETME_RECORDINGFILE
sometimes... Sometimes it works and sometimes it doesn't. When it
doesn't work it places the recorded file in the sounds dir with a
meetme-conf-..... name. Here is my Macro.
Basically it is getting my phones that begin with a certain number
from the realtime database to create a variable with a value that ='s
SIP/6001&SIP/6002&SIP/6003.... this is passed to the macro as ARG1
I added a System command to log the variables to a text file so I know
when the page is made, the variables are correct.
[macro-pageall]
; Context for paging all devices.
; This will search the sip table in the realtime database
; for all phones that start with a number. That number is
; passed to this macro as ${ARG1}.
;
; ARG1 = The first digit of the phones to be paged
; ARG2 = Device for the PA system. If the user selected to
; page the PA system. That will be included.
;
exten => s,1,Set(MEETME_RECORDINGFORMAT=wav)
exten => s,2,Set(MEETME_RECORDINGFILE=custom/paging/${EPOCH})
exten => s,3,System(/bin/echo "${STRFTIME(${EPOCH},,%Y%m%d-%H%M%S)} $
{MEETME_RECORDINGFORMAT} ${MEETME_RECORDINGFILE}" >> /var/log/asterisk/
pagemacro_var.log)
exten => s,4,MYSQL(Connect connid ${realdb_host} ${realdb_user} $
{realdb_pass} ${realdb_db})
exten => s,5,MYSQL(Query resultid ${connid} SELECT\ name\ FROM\ sip\
WHERE\ name\ LIKE\ "'${ARG1}%'")
exten => s,6,MYSQL(Fetch fetchid ${resultid} number)
exten => s,7,GoToIf($["${fetchid}" = "1"]?8:10)
exten => s,8,Set(pagedevice=${pagedevice}&SIP/${number})
exten => s,9,GoToIf($["${fetchid}" = "1"]?6:10)
exten => s,10,Set(pagedevice=${pagedevice:1})
exten => s,11,MYSQL(Clear ${resultid})
exten => s,12,MYSQL(Disconnect ${connid})
exten => s,13,GoToIf($["${ARG2}" != ""]?14:15)
exten => s,14,Set(pagedevice=${pagedevice}&${ARG2})
exten => s,15,SIPAddHeader(Call-Info:answer-after=0)
exten => s,16,SIPAddHeader(Alert-Info: Ring Answer)
exten => s,17,NoOp(Page Recording ${MEETME_RECORDINGFILE})
exten => s,18,Set(CALLERID(all)=System Page <1010>)
exten => s,19,Page(${pagedevice},r)
;On hangup, run script that will email the recording to shared
conference.
exten => h,1,System(/var/lib/asterisk/scripts/mail_lastpage ${ARG1} $
{MEETME_RECORDINGFILE})
exten => h,2,Hangup() |
|