[Asterisk-Users] WANTED: Toll-Free gateways
inEurope/Asia/Africa/South America
info-lists at robertc.de
info-lists at robertc.de
Mon Jan 19 12:38:47 MST 2004
Top posting(sorry) then imbedding the answers to your questions. Otherwise
doesn't make sense.
Thanks for your reply. Sorry it took a while to get the answers. I'm in
Germany and your email came last night just as I was headed to the rack.
Robert
John Todd said:
>>
>>>
>>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-distance2,${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.
>
**
** As prty 2 it didn't get executed so made it Prty 102 and got:
** -- Executing EnumLookup("IAX2[41 at 41]/5", "18005551212") in new stack
** -- Executing NoOp("IAX2[41 at 41]/5", "") in new stack
**
>
> 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)
>
**
** space has been added
**
> 2) Priority 102 says "long-distancei2" - is that "i" supposed to be in
> there?
**
** Its not in the actual file.
**
>
> 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.
>
******************
******************
;; QUESTION SECTION:
;2.1.2.1.5.5.5.0.0.8.1.freenum.org. IN NAPTR
;; ANSWER SECTION:
2.1.2.1.5.5.5.0.0.8.1.freenum.org. 21600 IN NAPTR 100 10 "u"
"E2U+voice:sip" "!^\\+1800(.*)$!sip:1800\\1 at 216.234.116.184!" .
2.1.2.1.5.5.5.0.0.8.1.freenum.org. 21600 IN NAPTR 100 10 "u" "E2U+sip"
"!^\\+1800(.*)$!sip:1800\\1 at 216.234.116.184!" .
;; Query time: 877 msec
;; SERVER: 192.168.0.1#53(192.168.0.1)
;; WHEN: Mon Jan 19 20:33:48 2004
;; MSG SIZE rcvd: 195
*********************
*********************
> 4) Fire up tcpdump during a test like this: "tcpdump -n port 53"
> and watch as the queries go out and come back.
>
********************
20:30:02.633174 192.168.0.110.1025 > 192.168.0.1.domain: 8485+ NAPTR?
2.1.2.1.5
.5.5.0.0.8.1.e164.arpa. (49) (DF)
20:30:06.837144 192.168.0.1.domain > 192.168.0.110.1025: 8485 NXDomain
0/1/0 (1
10) (DF)
20:30:06.841347 192.168.0.110.1025 > 192.168.0.1.domain: 8486+[|domain] (DF)
20:30:07.016277 192.168.0.1.domain > 192.168.0.110.1025: 8486
NXDomain[|domain]
(DF)
Hmm.. This is different than the DIG. 192.168.0.1 is my Netgear router.
Maybe it is responding to the DNS query from the software and not passing
it the same things that get passed back to DIG. /etc/resolv.conf has
"nameserver 192.168.0.1" so would think that DIG and the software is using
the same source.
****************************
> 5) Your priority 4 has two "." characters in the extension regexp.
> That will cause miscellaneous failures.
>
**
** Was ok on the system. In the original email I had to retype so
** introduced typos. Figured out how to cut/paste that stuff now
** from PuTTY.
***
>
> JT
> _______________________________________________
> Asterisk-Users mailing list
> Asterisk-Users at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-users
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
>
More information about the asterisk-users
mailing list