[Home]

Summary:ASTERISK-06522: ENUMLOOKUP is not looking up :)
Reporter:Alex Nikolov (alexnikolov)Labels:
Date Opened:2006-03-11 08:13:33.000-0600Date Closed:2006-03-21 00:43:09.000-0600
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Functions/func_enum
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) asterisk-trunk-enumfix.patch
Description:ENUMLOOKUP is not returning anyting

****** ADDITIONAL INFORMATION ******

+878107472747004 valid enum at e164.arpa
Comments:By: Olle Johansson (oej) 2006-03-14 01:16:02.000-0600

You need to add more information, like debug output, your enum.conf file, your dialplan. This is a very incomplete bug report.

By: Alex Nikolov (alexnikolov) 2006-03-15 11:17:33.000-0600

debug when dialling +878107472000001 the number is valid e164.arpa
and work just fine with the old enum asterisk impl. ENUMLOOKUP

Mar 15 17:11:07 DEBUG[21997]: enum.c:493 ast_get_enum: No such number found: e164.arpa (Success)
Mar 15 17:11:07 DEBUG[21997]: pbx.c:1377 pbx_substitute_variables_helper_full: Function result is '0'
Asterisk Ready.
   -- Executing Set("SIP/203-3d44", "sipcount=0|counter=0") in new stack
Mar 15 17:11:07 DEBUG[21997]: pbx.c:2170 __ast_pbx_run: Extension 00878107472000001, priority 1 returned normally even though call was hung up


extention.conf

exten => _0087810XXXXXXXXXX,1,Set(sipcount=${ENUMLOOKUP(+${EXTEN:2},sip,c)}|counter=0)
exten => _0087810XXXXXXXXXX,2,GotoIf($["${counter}"<"${sipcount}"]?3:6)
exten => _0087810XXXXXXXXXX,3,Set(counter=$[${counter}+1])
exten => _0087810XXXXXXXXXX,4,Dial(SIP/${ENUMLOOKUP(+${EXTEN:2},sip,${counter})})
exten => _0087810XXXXXXXXXX,5,GotoIf($["${counter}"<"${sipcount}"]?3:6)
;
exten => _0087810XXXXXXXXXX,6,Set(iaxcount=${ENUMLOOKUP(+${EXTEN:2},iax2,c)}|counter=0)
exten => _0087810XXXXXXXXXX,7,GotoIf($["${counter}"<"${iaxcount}"]?8:22)
exten => _0087810XXXXXXXXXX,8,Set(counter=$[${counter}+1])
exten => _0087810XXXXXXXXXX,9,Dial(IAX2/${ENUMLOOKUP(+${EXTEN:2},iax2,${counter})})
exten => _0087810XXXXXXXXXX,10,GotoIf($["${counter}"<"${iaxcount}"]?8:22)

;exten => _0087810XXXXXXXXXX,22,Set(foo=${ENUMLOOKUP(437203001721),e164.arpa})

exten => _0087810XXXXXXXXXX,22,NoOp("No valid entries in e164.arpa for +${EXTEN:2} - sending out via Zap")
exten => _0087810XXXXXXXXXX,23,Dial(Zap/g1/166${EXTEN})

By: Alex Nikolov (alexnikolov) 2006-03-15 11:26:06.000-0600

I looked up the number with + and without and the result is the same

A lookup service is available to check for valid enum numbers at e164.arpa at www.enum2go.com and you can see the NAPTR mapping also

Digium have a numbers also :
+878107472566000
+878107472566001
+878107472566161

By: Alex Nikolov (alexnikolov) 2006-03-15 11:29:20.000-0600

I think nobody fix anything in enumlookup since this ticket 0006513

By: Joshua C. Colp (jcolp) 2006-03-20 16:43:33.000-0600

Can you try the attached patch and see if it fixes your problem?

By: Alex Nikolov (alexnikolov) 2006-03-20 19:37:35.000-0600

this works now

Thanks

By: Joshua C. Colp (jcolp) 2006-03-20 23:19:13.000-0600

Great! I'll get this commited... minus my debug notice.

By: Tilghman Lesher (tilghman) 2006-03-20 23:54:30.000-0600

Committed to trunk

By: John Todd (jtodd) 2006-03-21 00:43:09.000-0600

Please see ticket http://bugs.digium.com/view.php?id=6513  as I don't think this is fixed...  I have not been able to get ENUMLOOKUP to return valid results.  Anyone who has made it work with testing numbers should please email me with debug results that show it functioning...