[prev in list] [next in list] [prev in thread] [next in thread] 

List:       asterisk-dev
Subject:    Re: [Asterisk-Dev] Interesting AEL / Variable issue
From:       Corey Frang <corey () rockriver ! net>
Date:       2005-09-30 2:39:21
Message-ID: 4b191c45efae838a40f18f2e2bbdde11 () rockriver ! net
[Download RAW message or body]

I'm thinking it would be a nice feature to add to the DB Function to 
have a "default response"

Easier than writing:

${IF(${DBExists(Family/Key)}?${DBRESULT}:default}

To write:

${DB(Family/Key?default)}

Dontcha think?

On Sep 29, 2005, at 19:18, Jerris, Michael MI wrote:

>
>> Corey Frang
>
>> Alright, So, I'm trying to think of a good way around this problem.
>>
>>                 followRing=${DB(FOLLOWMERING/${followMeExtension})};
>>
>> Is a line I have in my AEL dialplan.  This is getting
>> rewritten to Set(followRing=$[ ..... ])
>>
>> The problem is, the DB() function can return NULL, which
>> casues an ast_expr2.fl yyeror warning.
>>
>> Without wrapping everything in DBExists() function calls, Is
>> there a way we can update the asterisk expressions to assume
>> a $[ ] is meant to be just plain empty?
>
> You can use DBExists and ${DBRESULT} to accomplish this.
> _______________________________________________
> 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
>


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic