Transfer after 5 ring

Hi,

i have a macro and work fine to transfer call after no answer… X ringing:

my code are “23” 0xxxxxxxxxx xx
where “23” code
0xxxxxxxxxx number to transfer
xx ringing

Now i’d like to set xx ringing from digit during macro process…

i send "23"0xxxxxxxxxxx and i’d like to listen “Insert how many second to transfer after press #” to set second…

this is transfer no answer macro

[macro-deviazione_abilita_tempo]
; #################
; ARG1=${EXTEN}
; ARG2=${CALLERID(num)}
; ARG3=${CONTEXT}
; ARG4=${TEMPO}
; #################
exten => s,1,Set(abilitato=${DB(abilitato/${ARG2})})
exten => s,2,GotoIf($[“${abilitato}” = “true”]?:7)
exten => s,3,Set(DB(deviazione_tempo/${ARG2})=${ARG1:4})
;exten => s,4,Set(DB(contesto/${ARG2})=${ARG3})
exten => s,4,Set(DB(tempo_deviazione/${ARG2})=${ARG1:-2})
exten => s,5,Playback(beep)
exten => s,6,Playback(beep)
exten => s,7,Hangup()

How about to manipulate with ${variable[:skip[:length] of “23” 0xxxxxxxxxx upon to xx and set to a new variable?

exten => _ * 23 * .,1,Macro(deviazione_abilita_tempo,${EXTEN},${CALLERID(num)},${CONTEXT}); Enable
exten => * 23 ** ,1,Macro(deviazione_disabilita_tempo,${CALLERID(num)}; disbale

i’d like after digit and send from phone * 23 * XXXXXXXXXX i listen “how many seconds?” and i digit 15 second = 3 ring (in italy) and close the heraphone.

The digit go to variabile Arg4=${TIME}

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.