Hello List, I am using sofia sip 1.12.10 and I am having problems with an incoming TCP SIP invite. I tried 1.12.11 too, but the problem persists.
After my application receives the INVITE, and automatically sends a TRYING, the inviter closes the tcp connection. After that, when I am using nua_respond to OK the INVITE, sofia tries to connect to the closed port, instead of the VIA or CONTACT address. How do I fix this behaviour, or is the sender's closing of the TCP port at this state illegal? Or is this a bug? I attached the debugging output and the payload of the SIP message. I used netcat for sending the INVITE, which uses a random TCP source port and quitted it, before answering it "200 OK". Thanks in advance, Friedrich ==========> DEBUGGING OUTPUT =>here I get the invite tport_wakeup_pri(0x4291b8): events IN tport_alloc_secondary(0x4291b8): new secondary tport 0x4b61a8 tport_accept(0x4b61a8): new connection from tcp/172.20.26.102:44112/sip tport_wakeup(0x4b61a8): events IN tport_recv_event(0x4b61a8) tport_recv_iovec(0x4b61a8) msg 0x4b6400 from (tcp/172.20.26.102:44112) has 817 bytes, veclen = 1 tport_deliver(0x4b61a8): msg 0x4b6400 (817 bytes) from tcp/172.20.26.102:44112/sip next=(nil) nta: received INVITE sip:0383156869@10.20.200.3 SIP/2.0 (CSeq 1) nta: INVITE (1) going to a default leg nta: timer set to 2000 ms nta_leg_tcreate(0x4b7fd8) tport_tsend(0x4b61a8) tpn = TCP/172.20.26.102:44112 tport_vsend(0x4b61a8): 349 bytes of 349 to tcp/172.20.26.102:44112 tport_vsend returned 349 tport(0x4b61a8): reset timer nta: sent 100 Trying for INVITE (1) tport(0x4b61a8): reset timer tport_tsend(0x4b61a8) tpn = TCP/172.20.26.102:44112 tport_vsend(0x4b61a8): 589 bytes of 589 to tcp/172.20.26.102:44112 tport_vsend returned 589 tport(0x4b61a8): reset timer nta: sent 180 RINGING for INVITE (1) nta: timer set next to 58219 ms =>now the sender closes its TCP connection tport_wakeup(0x4b61a8): events IN tport_recv_event(0x4b61a8) tport_shutdown0(0x4b61a8, 2) tport_close(0x4b61a8): tcp/172.20.26.102:44112/sip =>now my application responds using nua_respond with a 200 OK =>but tport_tsend tries to send it to the already closed port su_localinfo: if eth0 with index 1 su_localinfo: if eth1 with index 2 su_localinfo: if lo with index 3 su_localinfo: if eth0 with index 1 su_localinfo: if eth1 with index 2 su_localinfo: if lo with index 3 tport_tsend(0x4b61a8) tpn = TCP/172.20.26.102:44112 tport_resolve addrinfo = 172.20.26.102:44112 tport_by_addrinfo(0x4291b8): not found by name TCP/172.20.26.102:44112 tport_alloc_secondary(0x4291b8): new secondary tport 0x4be208 tport_base_connect(0x4be208): connecting to tcp/172.20.26.102:44112/sip tport(0x4be208): reset timer tport_queue(0x4be208): queueing 0x4bb730 for tcp/172.20.26.102:44112 nta: sent 200 OK for INVITE (1) nta: timer shortened to 500 ms tport_connected(0x4be208): events ERR nta_agent: tport: Connection refused tport_close(0x4be208): tcp/172.20.26.102:44112/sip nta: timer G fired, retransmitting 200 reply tport_tsend(0x4b61a8) tpn = TCP/172.20.26.102:44112 tport_resolve addrinfo = 172.20.26.102:44112 tport_by_addrinfo(0x4291b8): not found by name TCP/172.20.26.102:44112 tport_alloc_secondary(0x4291b8): new secondary tport 0x4bbf18 tport_base_connect(0x4bbf18): connecting to tcp/172.20.26.102:44112/sip tport(0x4bbf18): reset timer tport_queue(0x4bbf18): queueing 0x4bb730 for tcp/172.20.26.102:44112 nta_incoming_timer: 1/1 resent, 0/1 tout, 0/0 term, 0/1 free nta: timer set next to 1000 ms tport_connected(0x4bbf18): events ERR nta_agent: tport: Connection refused tport_close(0x4bbf18): tcp/172.20.26.102:44112/sip nta: timer G fired, retransmitting 200 reply tport_tsend(0x4b61a8) tpn = TCP/172.20.26.102:44112 tport_resolve addrinfo = 172.20.26.102:44112 tport_by_addrinfo(0x4291b8): not found by name TCP/172.20.26.102:44112 tport_alloc_secondary(0x4291b8): new secondary tport 0x4bee80 tport_base_connect(0x4bee80): connecting to tcp/172.20.26.102:44112/sip tport(0x4bee80): reset timer tport_queue(0x4bee80): queueing 0x4bb730 for tcp/172.20.26.102:44112 nta_incoming_timer: 1/1 resent, 0/1 tout, 0/0 term, 0/1 free nta: timer set next to 2000 ms tport_connected(0x4bee80): events ERR nta_agent: tport: Connection refused tport_close(0x4bee80): tcp/172.20.26.102:44112/sip ====================> THE MESSAGE =>Here is the payload of the INVITE message: INVITE sip:120@10.20.200.3 SIP/2.0 Via: SIP/2.0/TCP 172.20.26.102:5066;branch=z9hG4bK3ee542d73c6ab5f718a78014e445f0a5 From: <sip:0@172.20.26.222>;tag=45ad0c5c To: <sip:0383156869@172.20.26.222> Call-Id: 24491C426401CC7606803323BE84E16CD6045B1234@172.20.26.102 CSeq: 1 INVITE Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, REFER Contact: <sip:0@172.20.26.102:5066;transport=tcp> Content-Type: application/sdp Content-Length: 282 Max-Forwards: 70 Min-SE: 90 Session-Expires: 6000 Supported: timer User-Agent: XXX v=0 o=sip 286728 1 IN IP4 10.0.1.201 s=SIP session c=IN IP4 10.0.1.201 t=0 0 m=audio 59760 RTP/AVP 8 0 3 101 a=rtpmap:8 PCMA/8000 a=rtpmap:0 PCMU/8000 a=rtpmap:3 GSM/8000 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-15,32,36 a=sendrecv a=rtcp:59761 IN IP4 10.0.1.201 ------------------------------------------------------------------------------ Special Offer -- Download ArcSight Logger for FREE! Finally, a world-class log management solution at an even better price-free! And you'll get a free "Love Thy Logs" t-shirt when you download Logger. Secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsisghtdev2dev _______________________________________________ Sofia-sip-devel mailing list Sofia-sip-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel