[asterisk-users] cmd SET time value

Benjamin Jacob benjamin.jacob at masconit.com
Wed Sep 6 23:52:10 MST 2006


Nope Tim,
had tried that already, duznt work.
Here's the cli output
=======================
Executing Set("SIP/4000-097afc90", "fwdTime=*|mon-tue|*|*") in new stack
Sep  7 12:22:20 WARNING[24964]: pbx.c:6062 pbx_builtin_setvar: Ignoring 
entry 'mon-tue' with no = (and not last 'options' entry)
Sep  7 12:22:20 WARNING[24964]: pbx.c:6062 pbx_builtin_setvar: Ignoring 
entry '*' with no = (and not last 'options' entry)
==================
with my macro line being
exten => s,n(getFwdTime),Set(fwdTime='${DB(CFWDTime/${ARG1})}')

Ben.

Tim St. Pierre wrote:

>_______________________________________________
>--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
>
>  
>
>
> ------------------------------------------------------------------------
>
> Date:
> Thu, 7 Sep 2006 00:28:20 -0500
>
>
>------------------------------------------------------------------------
>
>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
>>    
>>
>
>  
>


More information about the asterisk-users mailing list