[Asterisk-Dev] Interesting AEL / Variable issue

Corey Frang corey at rockriver.net
Thu Sep 29 19:39:21 MST 2005


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 at 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
>




More information about the asterisk-dev mailing list