diff options
Diffstat (limited to 'contrib/package/asterisk-xip/files/macros/lastcall.conf')
-rw-r--r-- | contrib/package/asterisk-xip/files/macros/lastcall.conf | 48 |
1 files changed, 5 insertions, 43 deletions
diff --git a/contrib/package/asterisk-xip/files/macros/lastcall.conf b/contrib/package/asterisk-xip/files/macros/lastcall.conf index 90f60b871b..dd2c8514fb 100644 --- a/contrib/package/asterisk-xip/files/macros/lastcall.conf +++ b/contrib/package/asterisk-xip/files/macros/lastcall.conf @@ -5,7 +5,7 @@ ; app_sayunixtime app_playback func_db ; format_gsm codec_gsm [globals] -LASTCALL_DIR=/etc/asterisk/directory +LASTCALL_DIR=/opt/etc/asterisk/directory [macro-lastcallstore] ; (Number , EntryType, BufferSize) exten => s,1,set(lcsName=lastcall) @@ -56,12 +56,8 @@ exten => s,n,Set(lcsLastDate=${DB(${lcsName}/ddate$[ ${lcsPointer} + 1])}) exten => s,n,GotoIf($["${lcsLastnum}" != "anonymous"]?checkblank) exten => s,n,Set(lcsLastnum="") exten => s,n(checkblank),GotoIf($["${lcsLastnum}" = ""]?noinfo) -exten => s,n,TrySystem(test -f ${LASTCALL_DIR}/${lcsLastnum}.gsm) -exten => s,n,GotoIf($[${SYSTEMSTATUS} != SUCCESS]?saydigitver) -exten => s,n,Background(${LASTCALL_DIR}/${lcsLastnum}) -exten => s,n,Goto(saycalltime) -exten => s,n(saydigitver),Macro(backgroundphone,${lcsLastNum}) -exten => s,n(saycalltime),wait(.5) +exten => s,n,Macro(backgroundtagnumber,${lcsLastnum},${LASTCALL_DIR}) +exten => s,n,wait(.5) exten => s,n,sayunixtime(${ddate},${LASTCALLZONE},QIMp) exten => s,n(saymenu),background(silence/1) exten => s,n,GotoIf($[$[${lcsPointer} = ${lcsCount}] | $["${lcsLastDate}" = ""]]?noprev) @@ -85,42 +81,8 @@ exten => 4,n,Set(lcsPointer=$[${lcsPointer} - 1]) exten => _[46],n(sayn),saynumber(${lcsPointer}) exten => _[46],n,goto(s|again) exten => 7,1,GotoIf($["${lcsLastNum}" = ""]?noinfo]) -exten => 7,2,Goto(macrobody_lastcallrecord|s|1) +exten => 7,2,macro(tagnumber,${lcsLastNum},${LASTCALL_DIR}) +exten => 7,3,goto(s|again) exten => i,1,Goto(s|again) exten => t,1,playback(goodbye) exten => t,n,Hangup -[macrobody_lastcallrecord] -exten => s,1(again),Background(lastcall/recordname) -exten => s,n,Record(/tmp/tmprec:gsm|2|5) -exten => s,n,Background(lastcall/tagfor) -exten => s,n,Macro(backgroundphone,${lcsLastNum}) -exten => s,n,Background(/tmp/tmprec) -exten => s,n,Background(lastcall/confirmnumber) -exten => s,n,Background(lastcall/tryagain) -exten => s,n,Background(lastcall/cancelrecord) -exten => s,n,Background(silence/5) -exten => s,n,Goto(s|again) -exten => 1,1,System(mkdir -p ${LASTCALL_DIR}) -exten => 1,2,System(mv /tmp/tmprec.gsm ${LASTCALL_DIR}/${lcsLastNum}.gsm) -exten => 1,3,Goto(macrobody_lastcallapp,s,again) -exten => 2,1,Goto(s|again) -exten => 3,1,system(rm -f /tmp/tmprec.gsm) -exten => 3,2,Goto(macrobody_lastcallapp,s,again) -; Say Phone number in the background -[macro-backgroundphone] -exten => s,1,Set(bgDigits=${ARG1}) -exten => s,n(loop),Set(bgDigit=${bgDigits:0:1}) -exten => s,n,GotoIf($["${bgDigits:0:3}" = "000"]?saythousand) -exten => s,n,GotoIf($["${bgDigits:0:2}" = "00"]?sayhundred) -exten => s,n,GotoIf($["${bgDigits}" = ""]?exitloop) -exten => s,n,Set(bgDigits=${bgDigits:1}) -exten => s,n,Background(digits/${bgDigit}) -exten => s,n,Goto(loop) -exten => s,n(saythousand),Background(digits/thousand) -exten => s,n,Set(bgDigits=${bgDigits:3}) -exten => s,n,Goto(loop) -exten => s,n(sayhundred),Background(digits/hundred) -exten => s,n,Set(bgDigits=${bgDigits:2}) -exten => s,n,Goto(loop) -exten => s,n(exitloop),NOOP - |