[asterisk-bugs] [Asterisk 0011887]: [patch] new REALTIME_STORE() and REALTIME_DESTROY() functions

noreply at bugs.digium.com noreply at bugs.digium.com
Thu Jan 31 22:56:50 CST 2008


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=11887 
====================================================================== 
Reported By:                sergee
Assigned To:                otherwiseguy
====================================================================== 
Project:                    Asterisk
Issue ID:                   11887
Category:                   Functions/func_realtime
Reproducibility:            always
Severity:                   feature
Priority:                   normal
Status:                     assigned
Asterisk Version:           SVN 
SVN Branch (only for SVN checkouts, not tarball releases):  trunk 
SVN Revision (number only!): 101373 
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             01-31-2008 06:15 CST
Last Modified:              01-31-2008 22:56 CST
====================================================================== 
Summary:                    [patch] new REALTIME_STORE() and REALTIME_DESTROY()
functions
Description: 
This patch adds new dialplan functions, which utilize store&destroy RT API.


REALTIME_STORE(family,field)=value
creates a new record in the RT storage, and sets field to value specified
on the right.

SET(XXX=${REALTIME_DESTROY(family,field,value)})
acts in the same way as REALTIME(), except that it removes matched record
from RT storage.
====================================================================== 

---------------------------------------------------------------------- 
 otherwiseguy - 01-31-08 22:56  
---------------------------------------------------------------------- 
I really like the idea of having these around, thinking about a few changes
though.  The documentation for REALTIME_STORE is off.  It references the
name REALTIME() and it says it returns the unique id if it was generated,
but doesn't do that yet (see XXX comment and the fact that it is write
only).  At least not to the dialplan, which is what the user would expect
from the docs.

Also, I think if we do a REALTIME_STORE function, we need it to be able to
handle multiple fields/values.  Having to make the call for each column is
too awkward (especially if we don't return a uniqueid to the dialplan).
 
Would you consider adding the ability to set multiple fields/values at
once?  Basically have a
REALTIME_STORE(family,field1,field2,...,fieldn)=value1,value2,...,valuen. 
See the ARRAY() function in func_strings as it is similar. 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
01-31-08 22:56  otherwiseguy   Note Added: 0081559                          
======================================================================




More information about the asterisk-bugs mailing list