[asterisk-users] cmd SET time value

Tim St. Pierre tim at communicatefreely.net
Wed Sep 6 22:23:44 MST 2006


Single quotes   -> ' <-  work when I set other variables that contain special 
characters.  Give that a try,

-Tim

On September 6, 2006 23:18, Benjamin Jacob wrote:
> Hello ppl,
>
> Ive a couple of macros defined to call fwd based on time to a
> number/voicemail.
> 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 =>
> s-dialFwdTime,1,GotoIfTime("${fwdTime}"?s-dialFwdTime,dialFwd:s,dialExten)
> ;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
>
> Ben.
>
>
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com --
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users

-- 
Tim St. Pierre

IP telephony specialist
sip://5101@communicatefreely.net
Toronto: 647 722 6930
Toll-Free 1 888 488 6940
tim at communicatefreely.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.digium.com/pipermail/asterisk-users/attachments/20060906/ccd377ca/attachment-0001.pgp


More information about the asterisk-users mailing list