[asterisk-users] cmd SET time value

Benjamin Jacob benjamin.jacob at masconit.com
Wed Sep 6 20:18:29 MST 2006

Hello ppl,

Ive a couple of macros defined to call fwd based on time to a 
Very elementary.

11. [macro-dialexten]
12. exten => s,1,Dial(SIP/${ARG1})   ;

1. [macro-stdpbx1exten]
2. exten => s,1,Set(fwdedNum=${DB(CFWD/${ARG1})})

3. exten => s,n,GotoIf(${fwdedNum}?getFwdTime:dialExten)

4. exten => s,n(getFwdTime),Set(fwdTime="${DB(CFWDTime/${ARG1})}") ;

5. exten => s,n,GotoIf("${fwdedNum}" != 
"VoiceMail"?s-dialFwdTime,1:s-vmFwdTime,1) ; goto VoiceMail or dial 
Fwded num

6. exten => s,n(dialExten),Macro(dialexten,${ARG1}) ; dial Called exten

7. exten => 
s-vmFwdTime,1,GotoIfTime("${fwdTime}"?s-vmFwdTime,vmFwd:s,dialExten) ;if 
fwdTime not set or time matches,
;send to VM, else dialExten
8. exten => s-vmFwdTime,n(vmFwd),VoiceMail(${ARG1})

9. exten => 
;if fwdTime not set or time matches,
; call fwdedNum, else dialExten
10. exten => s-dialFwdTime,n(dialFwd),Macro(dialexten,${fwdedNum})


I save the fwdedNum in DB, and also the fwding time.
Now, when i retrieve the time value from db and set it, using cmd SET, 
it takes only the initial part of the time value string.
e.g. if time to be checked is *|mon-tue|*|*, the time set is "*" ONLY!!

The cmd Set's syntax uses the | (pipe) notation to separate variables. 
Thats why this behaviour.
Any work around this guys??

Thanks in advance


More information about the asterisk-users mailing list