Summary: | ASTERISK-05547: [patch] [post 1.2] realtime dialplan function | ||
Reporter: | BJ Weschke (bweschke) | Labels: | |
Date Opened: | 2005-11-10 00:08:32.000-0600 | Date Closed: | 2008-01-15 17:12:00.000-0600 |
Priority: | Major | Regression? | No |
Status: | Closed/Complete | Components: | Functions/General |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) bw | |
Description: | a new dialplan function that is similar to functionality available in realtime and realtimeupdate apps. Syntax: REALTIME(family|colmatch[|value[|delim1[|delim2]]]) on read REALTIME(family|colmatch|value|newcol) on write Description: This function will read or write values from/to a RealTime repository. REALTIME(....) will read names/values from the repository, and REALTIME(....)= will write a new value/column to the repository. On a read, this function returns a delimited text string. The name/value pairs are delimited by delim1, and the name and value are delimited between each other with delim2. The default for delim1 is '=' and the default for delim2 is '|'. If there is no match, NULL will be returned by the function. On a write, this function will always return NULL. | ||
Comments: | By: Olle Johansson (oej) 2005-11-10 01:33:48.000-0600 I think we need to watch out for database terminology in realtime. Haven't checked the existing functions, but using "column" instead of, for example, attribute and value, is to me database. With realtime LDAP or something else that is not sql database, "column" does not make sense... By: BJ Weschke (bweschke) 2005-11-10 06:14:27.000-0600 Good point. I specifically tried to use "realtime repository" instead of "SQL", but would agree the column starts sounding too much like SQL again. Will change that. By: BJ Weschke (bweschke) 2005-12-05 22:42:40.000-0600 Changed the word "column" to "meta" in the app descriptions and variable names and put the code up in SVN branch /asterisk/team/bweschke/func_realtime_bug_5695 By: Olle Johansson (oej) 2006-01-04 03:18:38.000-0600 I recommend this for svn trunk. By: Matt O'Gorman (mogorman) 2006-01-26 09:59:32.000-0600 did the patch get lost in the move? or is this in a repo of yours bj? By: Olle Johansson (oej) 2006-03-04 04:43:52.000-0600 The branch is not up to date with trunk - can you turn on automerging after updating it? Thanks. Would like to include this in test-this-branch. By: BJ Weschke (bweschke) 2006-03-04 07:16:18.000-0600 branch redone and brought up to date with /trunk By: Olle Johansson (oej) 2006-03-04 07:18:54.000-0600 Thanks, BJ! By: Olle Johansson (oej) 2006-03-04 07:25:54.000-0600 Included in test-this-branch By: Olle Johansson (oej) 2006-03-06 03:50:57.000-0600 Uploading patch I got from Luigi Rizzo for test-this-branch (he's got a disclaimer on file). Please take a look at it. By: Olle Johansson (oej) 2006-03-07 12:39:57.000-0600 Another suggested change to avoid compilation warnings: Index: funcs/func_realtime.c =================================================================== --- funcs/func_realtime.c (revision 12342) +++ funcs/func_realtime.c (working copy) @@ -47,7 +47,7 @@ struct ast_variable *var=NULL,*head=NULL; char *results; - unsigned int resultslen=0; + size_t resultslen=0; AST_DECLARE_APP_ARGS(args, AST_APP_ARG(family); AST_APP_ARG(metamatch); By: BJ Weschke (bweschke) 2006-03-13 16:49:47.000-0600 branch brought back up to date with /trunk again and rizzo's patch merged in. By: Mitch Sharp (bluecrow76) 2006-03-14 15:53:16.000-0600 While using oej's test-trunk, func_realtime.so fails on * startup: [func_realtime.so]Mar 14 09:54:39 WARNING[26103]: loader.c:302 find_symbol: No symbol '_load_module' in module 'func_realtime.so Mar 14 09:54:39 WARNING[26103]: loader.c:302 find_symbol: No symbol '_unload_module' in module 'func_realtime.so Mar 14 09:54:39 WARNING[26103]: loader.c:302 find_symbol: No symbol '_usecount' in module 'func_realtime.so Mar 14 09:54:39 WARNING[26103]: loader.c:302 find_symbol: No symbol '_description' in module 'func_realtime.so Mar 14 09:54:39 WARNING[26103]: loader.c:302 find_symbol: No symbol '_key' in module 'func_realtime.so Mar 14 09:54:39 WARNING[26103]: loader.c:378 __load_resource: Key routine returned NULL in module /usr/lib/asterisk/modules/func_realtime.so Mar 14 09:54:39 WARNING[26103]: loader.c:387 __load_resource: 6 errors loading module /usr/lib/asterisk/modules/func_realtime.so, aborted Mar 14 09:54:39 WARNING[26103]: loader.c:446 print_and_load: Loading module func_realtime.so failed! Ouch ... error while writing audio data: : Broken pipe By: Roy Sigurd Karlsbakk (rkarlsba) 2006-03-18 07:24:42.000-0600 Hi. Where is the original patch for this? the attached 'bw' seems only a fix By: BJ Weschke (bweschke) 2006-03-21 12:51:32.000-0600 bluecrow76: your issue is now fixed with the latest update to the branch. By: Serge Vecher (serge-v) 2006-05-03 08:36:06 Committed to trunk in r24376 by bweschke. Thanks! By: Digium Subversion (svnbot) 2008-01-15 16:04:22.000-0600 Repository: asterisk Revision: 7357 U team/bweschke/func_realtime_bug_5695/funcs/Makefile A team/bweschke/func_realtime_bug_5695/funcs/func_realtime.c ------------------------------------------------------------------------ r7357 | bweschke | 2008-01-15 16:04:22 -0600 (Tue, 15 Jan 2008) | 3 lines Initial import of code into the branch. Adding a RealTime DP Function to Asterisk. Bug ASTERISK-5547 ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=7357 By: Digium Subversion (svnbot) 2008-01-15 16:04:22.000-0600 Repository: asterisk Revision: 7356 A team/bweschke/func_realtime_bug_5695/ ------------------------------------------------------------------------ r7356 | bweschke | 2008-01-15 16:04:21 -0600 (Tue, 15 Jan 2008) | 1 line Creating a branch for the new RealTime() DP function ASTERISK-5547 ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=7356 By: Digium Subversion (svnbot) 2008-01-15 17:12:00.000-0600 Repository: asterisk Revision: 11812 U team/oej/test-this-branch/README.test-this-branch A team/oej/test-this-branch/funcs/func_realtime.c ------------------------------------------------------------------------ r11812 | oej | 2008-01-15 17:11:59 -0600 (Tue, 15 Jan 2008) | 2 lines Adding bweschkes realtime dialplan function - ASTERISK-5547 ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=11812 |