[asterisk-users] Realtime dialplan application versus REALTIME dialplan function

Tilghman Lesher tilghman at mail.jeffandtilghman.com
Fri Mar 13 18:34:19 CDT 2009


On Friday 13 March 2009 17:41:42 JR Richardson wrote:
> I'm upgrading some PBX's from 1.2 to 1.4 and having a bit of trouble with
> converting the Realtime application to the REALTIME function.  I have the
> method down and understand simplistically what is going on, at least enough
> to get my old 1.2 apps to run in 1.4 functions.  I do not understand why
> change from the app to the func?  What the benefits?

The specific reason was one of interface consistency.  Dialplan applications
"do" specific things with the channel, whereas functions are designed to
either retrieve or set information on the channel.  Applications may be
interactive with the telephone user; functions should never be.

You are not the first person to have trouble with this conversion.  There are
two new functions, REALTIME_FIELD() and REALTIME_HASH(), which will be in
1.6.2, which return some of this functionality.  REALTIME_FIELD() permits the
retrieval of any single field within a realtime database, while
REALTIME_HASH() retrieves an entire record, though it encapsulates it into a
container, to avoid possible clashes with existing channel variables.

-- 
Tilghman



More information about the asterisk-users mailing list