I've managed to figure out the cause of this problem: when I configure my test machine with a public IP address, the list of DNS servers used by the DNS functions in sipXtapi is wrong (the list is part of _sip_res declared in sipXtackLib\include\resparse\wnt\resolv\resolv.h). The list of DNS servers only has a single entry: for the test computer itself. The two DNS servers configured for Windows networking aren't appearing. So, sipXtapi IS sending DNS packets, but only to the test computer itself. These are routed via the IP loopback interface (127.0.0.1) rather than via Ethernet, which is why Wireshark doesn't see them!). Since the test computer isn't running a DNS server, these DNS lookups fail due to timeout, and the SIP call fails because it can't resolve the address being called (interop.pingtel.com in this case). The Windows DNS configuration is correct, so if I ping the same address, the Windows networking sends DNS queries properly (to our ISPs DNS servers). I haven't had a chance to figure out why the list of DNS servers is not being initialized properly from the Windows settings. The private (NATed) IP address is assigned by DHCP along with the DNS servers, but when I use the public address, both it and the DNS servers are statically assigned in the Windows TCP-IP configuration. I'll look into this further next week (I'm away on a canoe trip for the next few days).
Stephen C. Steel -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Stephen C. Steel Sent: Monday, July 16, 2007 19:37 To: 'sipXtapi developer list' Subject: [sipxtapi-dev] sipXtapi - No Packets at ALL with PlaceCall I've been having trouble getting sipXtapi to make outgoing connections from behind a NAT router using STUN. To keep things simple, I been using the PlaceCall example included as part of the sipXtapi project (built from the sipXtapi branch, revision 9792) and trying to connect to the pingtel interop server. Just as a baseline, I thought I'd test using a publicly routable IP address so NAT and STUN wouldn't be a factor. I could then compare Wireshark captures both with and without NAT. PlaceCall -i sip:[EMAIL PROTECTED] sip:[EMAIL PROTECTED] (where xxx.xxx.xxx.xxx was the actual public IP address). The call failed with the message: EVENT_CATEGORY_CALLSTATE::DISCONNECTED::CAUSE_BADADDRESS But, what is really surprising is that not only did the call fail, but sipXtapi hadn't sent a single packet according to Wireshark! Not even a DNS query. I've attached the PlaceCall.log file generated by the test (and a capture of the console output in PlaceCall.txt). So far, I haven't figured out where things are going wrong. I did find a bug in the DNS code, but it turned out to be unrelated. I'll send a patch fixing it in a separate thread. Stephen C. Steel _______________________________________________ sipxtapi-dev mailing list [email protected] List Archive: http://list.sipfoundry.org/archive/sipxtapi-dev/
