[asterisk-users] Deprecated Realtime application, what's to be gained ???

Tilghman Lesher tilghman at mail.jeffandtilghman.com
Fri Jan 2 12:33:01 CST 2009


On Friday 02 January 2009 09:37:51 Benoit wrote:
> After seeing in "pbx/ael/ael-test/ael-test5/extensions.ael" some
> interesting use case of RealTime
> to store extension data (forwardto, dnd, ...) i started to play with it.
>
> To my surprise the two applications RealTime() / RealtimeUpdate() have
> been deprecated in favor
> of the REALTIME() function. While it's not a big deal for the write part
> since it's only a matter a
>  shifting a ')' and adding a '=', the read part is quite harder to use.
>
> while you could simply write
>           RealTime(family|col1|val1|prefix_);
>           NoOp(${prefix_col2});
>           NoOp(${prefix_col3});
>
> No you have to
>
>    Set(row="${REALTIME(family,col1,val1)}");
>    Set(col2_name_pair=${CUT(row,"|",2)});
>    Set(col2_value=${CUT(col2_name_pair,"=",2)});
>    NoOp(${col2_value});
>    Set(col3_name_pair=${CUT(row,"|",3)});
>    Set(col3_value=${CUT(col2_name_pair,"=",3)});
>    NoOp(${col3_value});
>
> 2 more lines per data access, and that's only you you know for sure the
> column orders,
> otherwise it will be more complicated,
>
> I fail to see what's the bonus in here ...
> may someone enlight me ?

http://svn.digium.com/view/asterisk?view=rev&revision=157870

-- 
Tilghman



More information about the asterisk-users mailing list