[asterisk-bugs] [Asterisk 0013651]: [patch] Make func_realtime work more like app_realtime

Asterisk Bug Tracker noreply at bugs.digium.com
Tue Nov 18 13:21:13 CST 2008


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=13651 
====================================================================== 
Reported By:                Corydon76
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   13651
Category:                   Functions/func_realtime
Reproducibility:            N/A
Severity:                   feature
Priority:                   normal
Status:                     ready for testing
Asterisk Version:           SVN 
SVN Branch (only for SVN checkouts, not tarball releases):  trunk 
SVN Revision (number only!): 147591 
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             2008-10-09 08:36 CDT
Last Modified:              2008-11-18 13:21 CST
====================================================================== 
Summary:                    [patch] Make func_realtime work more like
app_realtime
Description: 
As requested on the -users list, make 2 new methods in func_realtime, one
called REALTIME_FIELD, which retrieves a single field from realtime, and
one called REALTIME_HASH, which retrieves a single record from realtime, in
a format appropriate for assigning to the HASH() function.
====================================================================== 

---------------------------------------------------------------------- 
 (0094998) blitzrage (administrator) - 2008-11-18 13:21
 http://bugs.digium.com/view.php?id=13651#c94998 
---------------------------------------------------------------------- 
Testing of REALTIME_HASH() returns the following:


--------
RESULT |
--------

  == Using SIP RTP CoS mark 5
    -- Executing [201 at start:1] NoOp("SIP/105-b0003208", "") in new stack
    -- Executing [201 at start:2] Answer("SIP/105-b0003208", "") in new
stack
[Nov 18 10:16:28] WARNING[8990]: func_realtime.c:237 realtimefield_read:
Syntax: REALTIME_HASH(family,fieldmatch,value,fieldname) - missing
argument!
    -- Executing [201 at start:3] Set("SIP/105-b0003208",
"HASH(realtime_result)=") in new stack
    -- Executing [201 at start:4] Verbose("SIP/105-b0003208", "2,Result of
the context field returned: ") in new stack
  == Result of the context field returned: 
    -- Executing [201 at start:5] Hangup("SIP/105-b0003208", "") in new
stack



----------------------------------
core show function REALTIME_HASH |
----------------------------------


dialplan reload  core show function REALTIME_HASH
development*CLI> 
  -= Info about function 'REALTIME_HASH' =- 

[Synopsis]
RealTime Read/Write Functions

[Description]
This function will read values from a RealTime repository and return them
in a format suitable to be assigned to a HASH function.


[Syntax]
REALTIME_HASH(family,fieldmatch,value)


-----------------
extensions.conf |
-----------------

exten => 201,1,NoOp()
exten => 201,n,Answer()
exten =>
201,n,Set(HASH(realtime_result)=${REALTIME_HASH(sippeers,name,105)})
exten => 201,n,Verbose(2,Result of the context field returned:
${HASH(realtime_result,context)})
exten => 201,n,Hangup() 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2008-11-18 13:21 blitzrage      Note Added: 0094998                          
======================================================================




More information about the asterisk-bugs mailing list