2013/4/10 Satish Barot <satish4aster...@gmail.com>

>
> On Tue, Apr 9, 2013 at 7:56 PM, Olivier <oza_4...@yahoo.fr> wrote:
>
>>
>> Hello,
>>
>> What about having a new DB_IFEXISTS function in Asterisk ?
>>
>> It would accept two arguments : one being family/Key just as DB function,
>> and the other being a default value which would be returned if family/key
>> value does not exist.
>>
>> Thoughts ?
>>
>> Regards
>>
>
> You can achieve the same functionality using IF function. Something like,
> ...
> same => n,Set(foo=${IF($[ "${DB(family/key)}" =
> ""]?defaultval:${DB(family/key)})})
>

Yes, of course, but having a dedicated function for frequent pattern is
convenient.




>
> --Satish Barot
> Ahmedabad, India.
>
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> New to Asterisk? Join us for a live introductory webinar every Thurs:
>                http://www.asterisk.org/hello
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users
>
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to