On 5/16/05, Kevin P. Fleming <[EMAIL PROTECTED]> wrote: > exten => 100,1,Set(temp=${DB(CFIM/200)}) > exten => 100,n,GotoIF(${temp} = "" ? novalue) > exten => 100,n,... > exten => 100,n(novalue),...
I've been trying to figure out the best way of replacing the DBget() n+101 functionality in the IRC channel - thanks to MikeJ, jsmith and drumkilla for the help. I don't like the idea of having to set a temporary variable, so here's a possibly better way of handling the n+101 syntax (works like the ${DIALSTATUS} channel variable for the Dial() application). exten => 100,1,Set(DB(foo/bar)=blah) exten => 100,n,GotoIf(${EXISTS(${DB(foo/bar)})}?:novalue) exten => 100,n,... exten => 100,n(novalue),... Also of interest is that you don't actually need the GotoIf() application at all, replace with: exten => 100,n,Goto(${IF(${EXISTS(${DB(foo/bar)})})}?:novalue) Nope, you won't get any argument from me that the syntax is ugly and error prone - however the use of functions is very powerful and a great addition - but I hate the syntax :) -- Leif Madsen http://www.leifmadsen.com _______________________________________________ Asterisk-Dev mailing list Asterisk-Dev@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-dev To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-dev