diff options
Diffstat (limited to 'contrib/package/asterisk-xip/files/macros')
3 files changed, 0 insertions, 169 deletions
diff --git a/contrib/package/asterisk-xip/files/macros/clock.conf b/contrib/package/asterisk-xip/files/macros/clock.conf deleted file mode 100644 index 3250b396a8..0000000000 --- a/contrib/package/asterisk-xip/files/macros/clock.conf +++ /dev/null @@ -1,23 +0,0 @@ -; Talking clock by Michael Geddes -; Borrowed from bits here and there. -[macro-talkingclock] ; (TimeFormat, DateFormat, Zone) -exten => s,1,Answer -exten => s,n,set(tcTimeFormat=${ARG1}) -exten => s,n,GotoIf($["${tcTimeFormat}" = ""]?:tfOK) -exten => s,n,set(tcTimeFormat=HM\'vm-and\'S\'seconds\') -exten => s,n(tfOK),set(tcDateFormat=${ARG2}) -exten => s,n,GotoIf($["${tcDateFormat}" = ""]?:dfOK) -exten => s,n,set(tcDateFormat=AdBY) -exten => s,n(dfOK),set(tcZone=${ARG3}) -exten => s,n,GotoIf($["${tcZone}" = ""]?:znOK) -exten => s,n,set(tcZone=${TalkingClockZone}) -exten => s,n(znOK),SayUnixTime(,${tcZone},${tcDateFormat}) -exten => s,n(again),Wait(2) -exten => s,n,Set(FutureTime=$[${EPOCH} + 6]) -exten => s,n,Playback(misc/at-tone-time-exactly) -exten => s,n,SayUnixTime(${FutureTime},${tcZone},${tcTimeFormat}) -; Wait to say the beep. -exten => s,n(waitforit),noop -exten => s,n,GotoIf($[ ${EPOCH} < ${FutureTime} ]?waitforit:) -exten => s,n,playback(beep) -exten => s,n,goto(again) diff --git a/contrib/package/asterisk-xip/files/macros/lastcall.conf b/contrib/package/asterisk-xip/files/macros/lastcall.conf deleted file mode 100644 index 172fd5e77e..0000000000 --- a/contrib/package/asterisk-xip/files/macros/lastcall.conf +++ /dev/null @@ -1,88 +0,0 @@ -; Last-Called number storage and calling. -; Author: Michael Geddes aka FrogOnWheels - -; depends: app_macro app_system app_record func_callerid -; app_sayunixtime app_playback func_db -; format_gsm codec_gsm -;[globals] -;LASTCALL_DIR=/etc/asterisk/directory - -[macro-lastcallstore] ; (Number , EntryType, BufferSize) -exten => s,1,set(lcsName=lastcall) -exten => s,n,set(lcsCount=10) -exten => s,n,GotoIf($["${ARG2}" = ""]?blankarg) -exten => s,n,GotoIf($["${ARG2}" = "lastcall"]?blankarg) -exten => s,n,Set(lcsName=lastcall_${ARG2}) -exten => s,n(blankarg),GotoIf($["${ARG3}" = ""]?nocount) -exten => s,n,Set(lcsCount=${ARG3}) -exten => s,n(nocount),Noop(${lcsName}:${DB(${lcsName}/number1)}:${ARG1}) -exten => s,n,GotoIf($["${DB(${lcsName}/number1)}" = "${ARG1}"]?setdate) -exten => s,n,set(CallerPointer=1) - -exten => s,n(again),GotoIf($["${DB(${lcsName}/ddate${CallerPointer})}" = ""]?copynext) -exten => s,n,GotoIf($["${DB(${lcsName}/number${CallerPointer})}" = "${ARG1}"]?copynext) -exten => s,n,Set(CallerPointer=$[${CallerPointer}+1]) -exten => s,n,GotoIf($[${CallerPointer} <= ${lcsCount}]?again) - -exten => s,n(copynext),set(DB(${lcsName}/ddate$[${CallerPointer}])=${DB(${lcsName}/ddate$[${CallerPointer}-1])}) -exten => s,n,set(DB(${lcsName}/number$[${CallerPointer}])=${DB(${lcsName}/number$[${CallerPointer}-1])}) -exten => s,n,set(CallerPointer=$[${CallerPointer}-1]) -exten => s,n,GotoIf($[${CallerPointer} > 0]?copynext) -exten => s,n,set(DB(${lcsName}/number1)=${ARG1}) -exten => s,n(setdate),set(DB(${lcsName}/ddate1)=${EPOCH}) - -[macro-lastcallapp] ; (Entrytype, Count, RingContext, Tag) -exten => s,1,set(lcsName=lastcall) -exten => s,n,set(lcsCount=10) -exten => s,n,GotoIf($["${ARG1}" = ""]?blankName) -exten => s,n,Set(lcsName=lastcall_${ARG1}) -exten => s,n(blankName),GotoIf($["${ARG2}" = ""]?nocount) -exten => s,n,Set(lcsCount=${ARG2}) -exten => s,n(nocount),set(lcsCallContext=internal) -exten => s,n,GotoIf($["${ARG3}" = ""]?blankContext) -exten => s,n,Set(lcsCallContext=${ARG3}) -exten => s,n(blankContext),set(lcsTag=${ARG4}) -exten => s,n,GotoIf($["${lcsTag}" != ""]?hasTag) -exten => s,n,Set(lcsTag=lastcall/previous-numbers) -exten => s,n(hasTag),Set(lcsPointer=1) -exten => s,n,GotoIf($["${DB(${lcsName}/ddate1)}" != ""]?macrobody_lastcallapp|s|1) -exten => s,n,playback(${lcsTag}&lastcall/none-available) -[macrobody_lastcallapp] -exten => s,1(repeat),Background(${lcsTag}) -exten => s,n(again),wait(1) -exten => s,n,Set(lcsLastnum=${DB(${lcsName}/number${lcsPointer})}) -exten => s,n,Set(ddate=${DB(${lcsName}/ddate${lcsPointer})}) -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,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) -exten => s,n,background(lastcall/next) -exten => s,n(noprev),GotoIf($["${lcsLastnum}" = ""]?nocall) -exten => s,n,background(lastcall/call-number) -exten => s,n,background(lastcall/tag-number) -exten => s,n(nocall),GotoIf($[${lcsPointer} = 1]?nonext) -exten => s,n,background(lastcall/previous) -exten => s,n(nonext),background(silence/10) -exten => s,n,Goto(repeat) -exten => s,n(noinfo),background(lastcall/no-number-info) -exten => s,n,goto(saycalltime) -exten => 5,1,GotoIf($["${lcsLastnum}" = ""]?noinfo]) -exten => 5,n,Ringing() -exten => 5,n,Goto(${lcsCallContext},${lcsLastnum},1) -exten => 6,1,GotoIf($[$[${lcsPointer} = ${lcsCount}] | $["${lcsLastDate}" = ""]]?sayn) -exten => 6,n,Set(lcsPointer=$[${lcsPointer} + 1]) -exten => 4,1,GotoIf($[${lcsPointer}=1]?sayn) -exten => 4,n,Set(lcsPointer=$[${lcsPointer} - 1]) -exten => _[46],n(sayn),Background(h-${lcsPointer}) -exten => _[46],n,goto(s|again) -exten => 7,1,GotoIf($["${lcsLastNum}" = ""]?noinfo]) -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 diff --git a/contrib/package/asterisk-xip/files/macros/tagnumber.conf b/contrib/package/asterisk-xip/files/macros/tagnumber.conf deleted file mode 100644 index 6fc4557889..0000000000 --- a/contrib/package/asterisk-xip/files/macros/tagnumber.conf +++ /dev/null @@ -1,58 +0,0 @@ -; Number tagging -; Author: Michael Geddes aka FrogOnWheels - -; Depends: app_stack app_macro app_system - -[macro-tagnumber] ; Number / Tag Directory / Return -exten => s,1,Set(tagNumber=${ARG1}) -exten => s,n,Set(tagDirectory=${ARG2}) -exten => s,n,Set(tagRetContext=${MACRO_CONTEXT}) -exten => s,n,Set(tagRetExtn=${MACRO_EXTEN}) -exten => s,n,Set(tagRetPriority=$[${MACRO_PRIORITY} + 1]) -;exten => s,n,Set(tagReturn=${ARG3}) -;exten => s,n,Gosub(macrobody_tagnumber,s,1) -exten => s,n,Goto(macrobody_tagnumber,s,1) -exten => s,n(return),Noop(Returned) -[macrobody_tagnumber] -exten => s,1(again),Background(voicetag/recordname) -exten => s,n,Record(/tmp/tmprectag:gsm|2|5) -exten => s,n(askagain),Background(voicetag/tagfor) -exten => s,n,Macro(backgroundphone,${tagNumber}) -exten => s,n,Background(/tmp/tmprectag) -exten => s,n,Background(voicetag/confirmnumber) -exten => s,n,Background(voicetag/tryagain) -exten => s,n,Background(voicetag/cancelrecord) -exten => s,n,WaitExten(5) -exten => s,n,Goto(s|askagain) -exten => 1,1,System(mkdir -p ${tagDirectory}) -exten => 1,2,System(mv /tmp/tmprectag.gsm ${tagDirectory}/${tagNumber}.gsm) -exten => 1,3,Goto(${tagRetContext}|${tagRetExtn}|${tagRetPriority}) -exten => 2,1,Goto(s|again) -exten => 3,1,system(rm -f /tmp/tmprectag.gsm) -exten => 3,2,Goto(${tagRetContext}|${tagRetExtn}|${tagRetPriority}) -exten => h,1,system(rm -f /tmp/tmrectag.gsm) - -[macro-backgroundtagnumber] ; Number, directory -exten => s,1,TrySystem(test -f ${ARG2}/${ARG1}.gsm) -exten => s,n,GotoIf($[${SYSTEMSTATUS} != SUCCESS]?s-saynum|1) -exten => s,n,Background(${ARG2}/${ARG1}) -exten => s-saynum,1,Macro(backgroundphone,${ARG1}) - -; 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 - |