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

Asterisk Bug Tracker noreply at bugs.digium.com
Wed Nov 19 14:12:24 CST 2008


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=13651 
====================================================================== 
Reported By:                Corydon76
Assigned To:                Corydon76
====================================================================== 
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-19 14:12 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.
====================================================================== 

---------------------------------------------------------------------- 
 (0095097) blitzrage (administrator) - 2008-11-19 14:12
 http://bugs.digium.com/view.php?id=13651#c95097 
---------------------------------------------------------------------- 
First test (REALTIME_FIELD) output:

    -- Executing [200 at start:2] Answer("SIP/100-16c5b618", "") in new
stack
    -- Executing [200 at start:3] Set("SIP/100-16c5b618", "RES=start") in new
stack
    -- Executing [200 at start:4] Verbose("SIP/100-16c5b618", "2,Value of RES
is: start") in new stack
  == Value of RES is: start
    -- Executing [200 at start:5] Hangup("SIP/100-16c5b618", "") in new
stack

Result: PASS!


Second test (REALTIME_HASH) result:

    -- Executing [201 at start:1] NoOp("SIP/100-16c5b618", "") in new stack
    -- Executing [201 at start:2] Answer("SIP/100-16c5b618", "") in new
stack
    -- Executing [201 at start:3] Set("SIP/100-16c5b618",
"HASH(realtime_result)=,105,dynamic,welcome,start,192.168.128.129,5060,1227024431")
in new stack
    -- Executing [201 at start:4] Verbose("SIP/100-16c5b618", "2,Result of
the context field returned: start") in new stack
  == Result of the context field returned: start
    -- Executing [201 at start:5] Verbose("SIP/100-16bed018", "2,Result of
HASH is: 1227024431,5060,192.168.128.129,start,welcome,dynamic,105,") in
new stack
  == Result of HASH is:
1227024431,5060,192.168.128.129,start,welcome,dynamic,105,
    -- Executing [201 at start:5] Hangup("SIP/100-16c5b618", "") in new
stack


Result: FAIL(?)


Seems that we're getting an extra comma at the end of the
${HASH(realtime_hash)} output. Other than that, looks good! 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2008-11-19 14:12 blitzrage      Note Added: 0095097                          
======================================================================




More information about the asterisk-bugs mailing list