[asterisk-bugs] [Asterisk 0008089]: [patch] The record# parameter in ENUMLOOKUP is ignored

noreply at bugs.digium.com noreply at bugs.digium.com
Mon May 5 12:14:12 CDT 2008


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=8089 
====================================================================== 
Reported By:                otmar
Assigned To:                bbryant
====================================================================== 
Project:                    Asterisk
Issue ID:                   8089
Category:                   Functions/NewFeature
Reproducibility:            always
Severity:                   feature
Priority:                   normal
Status:                     feedback
Asterisk Version:           1.6.0-beta5 
SVN Branch (only for SVN checkouts, not tarball releases):  trunk 
SVN Revision (number only!): 50028 
Disclaimer on File?:        Yes 
Request Review:              
====================================================================== 
Date Submitted:             10-04-2006 10:19 CDT
Last Modified:              05-05-2008 12:14 CDT
====================================================================== 
Summary:                    [patch] The record# parameter in ENUMLOOKUP is
ignored
Description: 
In function_enum, the args.record parameter is never evaluated. 

That's also a bug in ast_get_enum, which does not offer a seperate
parameter for this.
======================================================================
Relationships       ID      Summary
----------------------------------------------------------------------
related to          0005526 [patch] Carrier ENUM support + some rew...
related to          0005666 [patch][post 1.4] Add NAPTR string pars...
related to          0011560 ENUM LOOKUP IS NOT WORKING AGAIN
====================================================================== 

---------------------------------------------------------------------- 
 snuffy - 05-05-08 12:14  
---------------------------------------------------------------------- 
I have updated the code again..
Found 1 or 2 errors..
Still has the following major problem.
cannot handle regex listed in bbryants test.
i'm at a loss atm figure someone else can cast their eyes over it.
also i think we should change the return from some of these functions to
be inline with coding guidelines (returning 0 for success) naptr_parse is
one that doesn't follow those rules but simple enough change.

*Please note there are some extra 'log_warnings' listed for my ease of
debugging only*
Below are my latest test results:
test*CLI> console dial 12345
  == Console is full duplex
[May  6 02:12:56] NOTICE[22021]: console_video.c:130 console_video_start:
voice only, console video support not present
    -- Executing [12345 at default:1] NoOp("Console/dsp",
""ENUMLOOKUP(+13015611020,,,,loligo.com)"") in new stack
  == ast_get_enum(num='+13015611020', tech='', suffix='loligo.com',
options='', record=1
  == ENUM options(): pos=1, options='0'
[May  6 02:12:56] WARNING[22021]: enum.c:549 parse_naptr:
pattern:^\+13015611020$: and naptr:13015611020:
[May  6 02:12:56] WARNING[22021]: enum.c:549 parse_naptr:
pattern:^\+13015611020$: and naptr:13015611020:
[May  6 02:12:56] WARNING[22021]: enum.c:549 parse_naptr:
pattern:^\+13015611020$: and naptr:13015611020:
[May  6 02:12:56] WARNING[22021]: enum.c:549 parse_naptr:
pattern:^\+*([^\*]*): and naptr:13015611020:
[May  6 02:12:56] WARNING[22021]: enum.c:551 parse_naptr: NAPTR Regex
match failed.
[May  6 02:12:56] WARNING[22021]: enum.c:620 enum_callback: Failed to
parse naptr :(
[May  6 02:12:56] WARNING[22021]: dns.c:234 dns_parse_answer: Failed to
parse result
[May  6 02:12:56] WARNING[22021]: dns.c:276 ast_search_dns: DNS Parse
error for 0.2.0.1.1.6.5.1.0.3.1.loligo.com
  == ast_get_enum() profiling: FAIL, 0.2.0.1.1.6.5.1.0.3.1.loligo.com, 1
ms
    -- Executing [12345 at default:2] NoOp("Console/dsp", "res enum
+14155551212") in new stack
    -- Executing [12345 at default:3] NoOp("Console/dsp", ""COUNT
ENUMLOOKUP(+13015611020,,c,,loligo.com)"") in new stack
  == ast_get_enum(num='+13015611020', tech='', suffix='loligo.com',
options='c', record=1
  == ENUM options(c): pos=1, options='1'
[May  6 02:12:56] WARNING[22021]: enum.c:549 parse_naptr:
pattern:^\+13015611020$: and naptr:13015611020:
[May  6 02:12:56] WARNING[22021]: enum.c:549 parse_naptr:
pattern:^\+13015611020$: and naptr:13015611020:
[May  6 02:12:56] WARNING[22021]: enum.c:549 parse_naptr:
pattern:^\+*([^\*]*): and naptr:13015611020:
[May  6 02:12:56] WARNING[22021]: enum.c:551 parse_naptr: NAPTR Regex
match failed.
[May  6 02:12:56] WARNING[22021]: enum.c:620 enum_callback: Failed to
parse naptr :(
[May  6 02:12:56] WARNING[22021]: dns.c:234 dns_parse_answer: Failed to
parse result
[May  6 02:12:56] WARNING[22021]: dns.c:276 ast_search_dns: DNS Parse
error for 0.2.0.1.1.6.5.1.0.3.1.loligo.com
  == ast_get_enum() profiling: FAIL, 0.2.0.1.1.6.5.1.0.3.1.loligo.com, 2
ms
    -- Executing [12345 at default:4] NoOp("Console/dsp", "count enum 2") in
new stack
    -- Executing [12345 at default:5] NoOp("Console/dsp",
""ENUMLOOKUP(+13015611020,tel,,,loligo.com)"") in new stack
  == ast_get_enum(num='+13015611020', tech='tel', suffix='loligo.com',
options='', record=1
  == ENUM options(): pos=1, options='0'
[May  6 02:12:56] WARNING[22021]: enum.c:549 parse_naptr:
pattern:^\+13015611020$: and naptr:13015611020:
[May  6 02:12:56] WARNING[22021]: enum.c:549 parse_naptr:
pattern:^\+*([^\*]*): and naptr:13015611020:
[May  6 02:12:56] WARNING[22021]: enum.c:551 parse_naptr: NAPTR Regex
match failed.
[May  6 02:12:56] WARNING[22021]: enum.c:620 enum_callback: Failed to
parse naptr :(
[May  6 02:12:56] WARNING[22021]: dns.c:234 dns_parse_answer: Failed to
parse result
[May  6 02:12:56] WARNING[22021]: dns.c:276 ast_search_dns: DNS Parse
error for 0.2.0.1.1.6.5.1.0.3.1.loligo.com
  == ast_get_enum() profiling: FAIL, 0.2.0.1.1.6.5.1.0.3.1.loligo.com, 1
ms
    -- Executing [12345 at default:6] NoOp("Console/dsp", "bleh enum ") in
new stack
    -- Executing [12345 at default:7] NoOp("Console/dsp", ""COUNT
ENUMLOOKUP(+13015611020,sip,c,,loligo.com)"") in new stack
  == ast_get_enum(num='+13015611020', tech='sip', suffix='loligo.com',
options='c', record=1
  == ENUM options(c): pos=1, options='1'
[May  6 02:12:56] WARNING[22021]: enum.c:549 parse_naptr:
pattern:^\+*([^\*]*): and naptr:13015611020:
[May  6 02:12:56] WARNING[22021]: enum.c:551 parse_naptr: NAPTR Regex
match failed.
[May  6 02:12:56] WARNING[22021]: enum.c:620 enum_callback: Failed to
parse naptr :(
[May  6 02:12:56] WARNING[22021]: dns.c:234 dns_parse_answer: Failed to
parse result
[May  6 02:12:56] WARNING[22021]: dns.c:276 ast_search_dns: DNS Parse
error for 0.2.0.1.1.6.5.1.0.3.1.loligo.com
  == ast_get_enum() profiling: FAIL, 0.2.0.1.1.6.5.1.0.3.1.loligo.com, 1
ms
    -- Executing [12345 at default:8] NoOp("Console/dsp", "count enum 0") in
new stack
    -- Executing [12345 at default:9] NoOp("Console/dsp",
""ENUMLOOKUP(+13015611020,tel,,2,loligo.com)"") in new stack
  == ast_get_enum(num='+13015611020', tech='tel', suffix='loligo.com',
options='', record=2
  == ENUM options(): pos=2, options='0'
[May  6 02:12:57] WARNING[22021]: enum.c:549 parse_naptr:
pattern:^\+13015611020$: and naptr:13015611020:
[May  6 02:12:57] WARNING[22021]: enum.c:549 parse_naptr:
pattern:^\+13015611020$: and naptr:13015611020:
[May  6 02:12:57] WARNING[22021]: enum.c:549 parse_naptr:
pattern:^\+13015611020$: and naptr:13015611020:
[May  6 02:12:57] WARNING[22021]: enum.c:549 parse_naptr:
pattern:^\+13015611020$: and naptr:13015611020:
[May  6 02:12:57] WARNING[22021]: enum.c:549 parse_naptr:
pattern:^\+13015611020$: and naptr:13015611020:
[May  6 02:12:57] WARNING[22021]: enum.c:549 parse_naptr:
pattern:^\+*([^\*]*): and naptr:13015611020:
[May  6 02:12:57] WARNING[22021]: enum.c:551 parse_naptr: NAPTR Regex
match failed.
[May  6 02:12:57] WARNING[22021]: enum.c:620 enum_callback: Failed to
parse naptr :(
[May  6 02:12:57] WARNING[22021]: dns.c:234 dns_parse_answer: Failed to
parse result
[May  6 02:12:57] WARNING[22021]: dns.c:276 ast_search_dns: DNS Parse
error for 0.2.0.1.1.6.5.1.0.3.1.loligo.com
  == ast_get_enum() profiling: FAIL, 0.2.0.1.1.6.5.1.0.3.1.loligo.com, 2
ms
    -- Executing [12345 at default:10] NoOp("Console/dsp", "res enum
+14155551212") in new stack
    -- Executing [12345 at default:11] NoOp("Console/dsp", ""COUNT
ENUMLOOKUP(+13015611020,ALL,c,,loligo.com)"") in new stack
  == ast_get_enum(num='+13015611020', tech='ALL', suffix='loligo.com',
options='c', record=1
  == ENUM options(c): pos=1, options='1'
[May  6 02:12:57] WARNING[22021]: enum.c:549 parse_naptr:
pattern:^\+13015611020$: and naptr:13015611020:
[May  6 02:12:57] WARNING[22021]: enum.c:549 parse_naptr:
pattern:^\+13015611020$: and naptr:13015611020:
[May  6 02:12:57] WARNING[22021]: enum.c:549 parse_naptr:
pattern:^\+13015611020$: and naptr:13015611020:
[May  6 02:12:57] WARNING[22021]: enum.c:549 parse_naptr:
pattern:^\+13015611020$: and naptr:13015611020:
[May  6 02:12:57] WARNING[22021]: enum.c:549 parse_naptr:
pattern:^\+*([^\*]*): and naptr:13015611020:
[May  6 02:12:57] WARNING[22021]: enum.c:551 parse_naptr: NAPTR Regex
match failed.
[May  6 02:12:57] WARNING[22021]: enum.c:620 enum_callback: Failed to
parse naptr :(
[May  6 02:12:57] WARNING[22021]: dns.c:234 dns_parse_answer: Failed to
parse result
[May  6 02:12:57] WARNING[22021]: dns.c:276 ast_search_dns: DNS Parse
error for 0.2.0.1.1.6.5.1.0.3.1.loligo.com
  == ast_get_enum() profiling: FAIL, 0.2.0.1.1.6.5.1.0.3.1.loligo.com, 2
ms
    -- Executing [12345 at default:12] NoOp("Console/dsp", "count enum 4") in
new stack
    -- Executing [12345 at default:13] NoOp("Console/dsp",
""ENUMLOOKUP(+13015611020,ALL,,2,loligo.com)"") in new stack
  == ast_get_enum(num='+13015611020', tech='ALL', suffix='loligo.com',
options='', record=2
  == ENUM options(): pos=2, options='0'
[May  6 02:12:57] WARNING[22021]: enum.c:549 parse_naptr:
pattern:^\+13015611020$: and naptr:13015611020:
[May  6 02:12:57] WARNING[22021]: enum.c:549 parse_naptr:
pattern:^\+13015611020$: and naptr:13015611020:
[May  6 02:12:57] WARNING[22021]: enum.c:549 parse_naptr:
pattern:^\+13015611020$: and naptr:13015611020:
[May  6 02:12:57] WARNING[22021]: enum.c:549 parse_naptr:
pattern:^\+*([^\*]*): and naptr:13015611020:
[May  6 02:12:57] WARNING[22021]: enum.c:551 parse_naptr: NAPTR Regex
match failed.
[May  6 02:12:57] WARNING[22021]: enum.c:620 enum_callback: Failed to
parse naptr :(
[May  6 02:12:57] WARNING[22021]: dns.c:234 dns_parse_answer: Failed to
parse result
[May  6 02:12:57] WARNING[22021]: dns.c:276 ast_search_dns: DNS Parse
error for 0.2.0.1.1.6.5.1.0.3.1.loligo.com
  == ast_get_enum() profiling: FAIL, 0.2.0.1.1.6.5.1.0.3.1.loligo.com, 2
ms
    -- Executing [12345 at default:14] NoOp("Console/dsp", "res enum
sip:2203 at sip.fox-den.com") in new stack
    -- Executing [12345 at default:15] NoOp("Console/dsp",
""ENUMLOOKUP(+437203001721)"") in new stack
  == ast_get_enum(num='+437203001721', tech='sip', suffix='e164.arpa',
options='', record=1
  == ENUM options(): pos=1, options='0'
  == ast_get_enum() profiling: FAIL, 1.2.7.1.0.0.3.0.2.7.3.4.e164.arpa,
347 ms
    -- Executing [12345 at default:16] NoOp("Console/dsp", "res enum ") in
new stack
    -- Executing [12345 at default:17] NoOp("Console/dsp",
""ENUMLOOKUP(1234*256,,,,freenum.org)"") in new stack
  == ast_get_enum(num='1234*256', tech='', suffix='freenum.org',
options='', record=1
  == ENUM options(): pos=1, options='0'
  == ast_get_enum() profiling: FAIL, 6.5.2.4.3.2.1.freenum.org, 7 ms
    -- Executing [12345 at default:18] NoOp("Console/dsp", "res enum ") in
new stack
    -- Executing [12345 at default:19] NoOp("Console/dsp",
""ENUMLOOKUP(1234567890,sip,,1,enum.yoyodynelabs.com)"") in new stack
  == ast_get_enum(num='1234567890', tech='sip',
suffix='enum.yoyodynelabs.com', options='', record=1
  == ENUM options(): pos=1, options='0'
  == ast_get_enum() profiling: FAIL,
0.9.8.7.6.5.4.3.2.1.enum.yoyodynelabs.com, 348 ms
    -- Executing [12345 at default:20] NoOp("Console/dsp", "res enum ") in
new stack
  == ast_get_enum(num='+13015611020', tech='mailto', suffix='loligo.com',
options='', record=1
  == ENUM options(): pos=1, options='0'
[May  6 02:12:57] WARNING[22021]: enum.c:549 parse_naptr:
pattern:^\+13015611020$: and naptr:13015611020:
[May  6 02:12:57] WARNING[22021]: enum.c:549 parse_naptr:
pattern:^\+13015611020$: and naptr:13015611020:
[May  6 02:12:57] WARNING[22021]: enum.c:549 parse_naptr:
pattern:^\+*([^\*]*): and naptr:13015611020:
[May  6 02:12:57] WARNING[22021]: enum.c:551 parse_naptr: NAPTR Regex
match failed.
[May  6 02:12:57] WARNING[22021]: enum.c:620 enum_callback: Failed to
parse naptr :(
[May  6 02:12:57] WARNING[22021]: dns.c:234 dns_parse_answer: Failed to
parse result
[May  6 02:12:57] WARNING[22021]: dns.c:276 ast_search_dns: DNS Parse
error for 0.2.0.1.1.6.5.1.0.3.1.loligo.com
  == ast_get_enum() profiling: FAIL, 0.2.0.1.1.6.5.1.0.3.1.loligo.com, 1
ms
    -- Executing [12345 at default:21] NoOp("Console/dsp", "MINE mail enum ")
in new stack
    -- Executing [12345 at default:22] Hangup("Console/dsp", "") in new
stack
  == Spawn extension (default, 12345, 22) exited non-zero on
'Console/dsp'
 << Hangup on console >>
test*CLI> exit 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
05-05-08 12:14  snuffy         Note Added: 0086415                          
======================================================================




More information about the asterisk-bugs mailing list