hi all
My little win32 console program runs into another problem. When it tries to
REGISTER to a proxy server on Internet via my ADSL interface, it uses TCP
connection instead of UDP. As a result, the TCP SYN is RSTed by the proxy
server.
My sipXtapi based win32 console program simply do 2 things: 1) register, 2)
wait several seconds and unregister. This time i run it on a computer which
connects to internet via ADSL. The route table of this computer is something
like this:
Route Table
===========================================================================
Interface List
0x1 ........................... MS TCP Loopback interface
0x2 ...00 0a eb 65 7a f9 ...... Realtek RTL8139 Family PCI Fast Ethernet NIC
0x20004 ...00 53 45 00 00 00 ...... WAN (PPP/SLIP) Interface
===========================================================================
===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 10.0.0.138 10.0.0.1 21
0.0.0.0 0.0.0.0 58.33.191.8 58.33.191.8 1
10.0.0.0 255.255.255.0 10.0.0.1 10.0.0.1 20
10.0.0.1 255.255.255.255 127.0.0.1 127.0.0.1 20
10.255.255.255 255.255.255.255 10.0.0.1 10.0.0.1 20
58.33.191.8 255.255.255.255 127.0.0.1 127.0.0.1 50
58.255.255.255 255.255.255.255 58.33.191.8 58.33.191.8 50
127.0.0.0 255.0.0.0 127.0.0.1 127.0.0.1 1
218.1.60.203 255.255.255.255 58.33.191.8 58.33.191.8 1
224.0.0.0 240.0.0.0 10.0.0.1 10.0.0.1 20
224.0.0.0 240.0.0.0 58.33.191.8 58.33.191.8 1
255.255.255.255 255.255.255.255 10.0.0.1 10.0.0.1 1
255.255.255.255 255.255.255.255 58.33.191.8 58.33.191.8 1
Default Gateway: 58.33.191.8
===========================================================================
Persistent Routes:
None
i run my sipXtapi based program and it says:
<-> Type LOCAL, Interface: eth0, Ip 10.0.0.1, Port 5080
<-> Type LOCAL, Interface: eth1, Ip 58.33.191.8, Port 5080
<-> Type LOCAL, Interface: eth0, Ip 10.0.0.1, Port 5080
<-> Type LOCAL, Interface: eth1, Ip 58.33.191.8, Port 5080
EVENT_CATEGORY_LINESTATE::PROVISIONED::PROVISIONED_NORMAL
EVENT_CATEGORY_LINESTATE::REGISTERING::REGISTERING_NORMAL
EVENT_CATEGORY_LINESTATE::UNREGISTERING::UNREGISTERING_NORMAL
EVENT_CATEGORY_LINESTATE::UNREGISTER_FAILED::UNREGISTER_FAILED_TIMEOUT
i use "http://scm.sipfoundry.org/rep/sipX/branches/sipXtapi" at version 7940.
========= my sipXtapi based program is something like this ===========
result = sipxInitialize(&hInst, 5080, 5080, -1, -2);
result = sipxEventListenerAdd(hInst, EventCallbackProc, NULL);
result = sipxConfigEnableRport(hInst, true);
...
result = sipxConfigSetOutboundProxy(hInst, "218.242.214.23:5080");
result = sipxLineAdd(hInst, "sip:218.242.214.23:5080", &hLine);
// result = sipxLineAdd(hInst, "sip:218.242.214.23:5080", &hLine, 1);
// result = sipxLineAdd(hInst, "sip:218.242.214.23:5080", &hLine, 2);
// result = sipxLineAdd(hInst, "sip:218.242.214.23:5080", &hLine, 3);
::Sleep(500);
result = sipxLineAddCredential( hLine,
"user1", "password1",
"");
result = sipxLineRegister(hLine, true);
::Sleep(6000);
result = sipxLineRegister(hLine, false);
::Sleep(1000);
result = sipxLineRemove(hLine);
::Sleep(1000);
result = sipxEventListenerRemove(hInst, EventCallbackProc, NULL);
::Sleep(1000);
result = sipxUnInitialize(hInst);
::Sleep(1000);
===============================================================
my sipXtapi based program is in MyRegTest.rar, please extract to directory
"sipXtapi\sipXcallLib\examples\MyRegTest". The compiled binary executable will
be at "sipXtapi\sipXcallLib\examples\bin".
is there something wrong with my code?
_______________________________________________
sipxtapi-dev mailing list
[email protected]
List Archive: http://list.sipfoundry.org/archive/sipxtapi-dev/