[Asterisk-Users] WANTED: Toll-Free gateways in Europe/Asia/Africa/South America

John Todd jtodd at loligo.com
Sun Jan 18 15:23:22 MST 2004


>John Todd said:
>>
>>  The freenum.org project wants to use your trunks!  The freenum.org project
>>  is an ENUM parallel tree,  which has as an eventual goal the distribution
>>  of ENUM numbering in nations or areas which due to political or other
>>  issues are not able to get secure, inexpensive, or functional ENUM
>>  capabilities.
>>
>....
>
>>
>my sip.conf contains:
>
>    [general]
>    search => freenum.org
>    search => e164.arpa
>
>
>  Extensions.conf
>   exten => _1800X.,1,EnumLookup(${EXTEN})
>   exten => _1800X.,52,Goto(long-distance,${EXTEN},1)
>   exten => _1800X.,102,Goto(long-distancei2,${EXTEN},1)
>   exten => _1800X.,2,GotoIf($[$[${ENUM:0:3} = SIP}] |$[${ENUM:0:3} =
>IAX]]?3:4)
>
>   exten => _1800X.,3,Dial(${ENUM})
>   exten => _1800X..,4,Goto(normal-dial,${EXTEN},1)
>   exten => _1800X.,104,Goto(normal-dial,${EXTEN},1)
>
>
>I setup my sip.conf and extensions.conf as above.  EnumLookup seems to get
>a zero return code but the priority that gets executed is 102.
>
>Messages in the console.log are:
>Executing EnumLookup("IAX2[41 at 41]/3", "18005551212") in new stack
>ENUM got '0'
>  -- Executing Goto("IAX2[41 at 41]/3", "long-distance2|18005551212|1") in new
>stack
>  -- Goto (long-distance2,18005551212,1)
>
>
>Any ideas on how to debug this problem??
>Robert


Add a priority 2 that looks like:

exten => _1800X.,2,NoOp(${ENUM})

This will allow you to see what gets handed back from the lookup. 
Remember to correctly increment the priorities below 2 to reflect the 
new line.


1) Your priority 2 is missing a space after the | expression.  It 
should look like:
exten => _1800X.,2,GotoIf($[$[${ENUM:0:3} = SIP}] | $[${ENUM:0:3} = IAX]]?3:4)

2) Priority 102 says "long-distancei2" - is that "i" supposed to be in there?

3) Type "dig NAPTR 2.1.2.1.5.5.5.0.0.8.1.freenum.org." on a command 
line and let's see the answer.  You should see the NAPTR replies.

4) Fire up tcpdump during a test like this:  "tcpdump -n port 53" 
and watch as the queries go out and come back.

5) Your priority 4 has two "." characters in the extension regexp. 
That will cause miscellaneous failures.


JT



More information about the asterisk-users mailing list