Re: Jain Sip - duplicated messages
Jeroen van Bemmel <[email protected]> Wed, 07 May 2008 18:37:50 +0200
| Newsgroups | gmane.comp.voip.nist-sip |
|---|---|
| Message-ID | <[email protected]> |
--===============8954611484994838046== Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type"> </head> <body bgcolor="#ffffff" text="#000000"> Cesar,<br> <br> Are you sure this is not some artifact of the tool you are using to capture the traces? I've seen Ethereal/wireshark appearing to duplicate messages, possibly related to what IP addresses are being used. In your trace, the INVITE and 200 OK messages sent by 192.168.1.40 appear duplicated, while the ACK and BYE are not. The difference is that ACK and BYE are sent to the Contact address from the 200 OK<br> <br> Try capturing the trace at a different machine (which machine did you use to trace, 192.168.1.40?)<br> <br> Regards,<br> Jeroen<br> <br> brea C. wrote: <blockquote cite="mid:[email protected]" type="cite">Hi! <br> <br> I'm currently developing a sip proxy solution using Jain sip reference implementation (more exactly v1.2) and im having some issues that I can't identify where it comes.<br> <br> The problem is that mostly sip messages who are proxied ( both requests and responses ), sent in statefull mode with client or server Transaction, appears duplicated on the lan. Its not because a expired timer, duplicated messages are sent simultaneously in just milliseconds. <br> <br> Here is attached a graph about this.<br> <br> And the code is no more complex than:<br> <br> -------------------------------------------------------------------------------------------------------------------------------------<br> public void processInvite(RequestEvent requestEvent)<br> {<br> try {<br> Request request = requestEvent.getRequest();<br> ServerTransaction st = requestEvent.getServerTransaction();<br> <br> if (st == null) {<br> st = sipProvider.getNewServerTransaction(request);<br> }<br> <br> <br> Request newRequest = (Request) request.clone();<br> SipURI requestURI = (SipURI)newRequest.getRequestURI();<br> requestURI = ProtocolObjects.addressFactory.createSipURI("annc",cmsAddress);<br> requestURI.setParameter("play",ad);<br> newRequest.setRequestURI(requestURI);<br> <br> <br> // Record Route<br> SipURI sipURI = ProtocolObjects.addressFactory.createSipURI("Proxy",host);<br> sipURI.setPort(port);<br> Address address = ProtocolObjects.addressFactory.createAddress("Proxy",sipURI);<br> RecordRouteHeader recordRoute = ProtocolObjects.headerFactory.createRecordRouteHeader(address);<br> newRequest.addHeader(recordRoute);<br> <br> // Via Header<br> ViaHeader viaHeader = ProtocolObjects.headerFactory.createViaHeader(host, port, transport, null);<br> newRequest.addFirst(viaHeader);<br> <br> ClientTransaction ct = sipProvider.getNewClientTransaction(newRequest);<br> log.info(">>> Client Transaction Created state "+ct.getState()+" ct: "+ ct);<br> <br> ct.setApplicationData(st);<br> ct.sendRequest();<br> <br> <br> } catch (Exception ex) {<br> ex.printStackTrace();<br> System.exit(0);<br> }<br> }<br> <br> public void response(ResponseEvent evt) {<br> Response response = evt.getResponse();<br> ClientTransaction ct = evt.getClientTransaction();<br> <br> if ( response.getStatusCode() != 100 ) { <br> if ( ct != null ) {<br> try {<br> ServerTransaction st = (ServerTransaction) ct.getApplicationData();<br> Response newResp = (Response) response.clone();<br> newResp.removeFirst(ViaHeader.NAME);<br> <br> st.sendResponse(newResp);<br> <br> } catch (Exception e){<br> e.printStackTrace();<br> }<br> } else {<br> System.out.println("Warning: responseInvite and ct == null, nothing done"); <br> }<br> <br> }<br> }<br> ---------------------------------------------------------------------------------------------------------------------------------<br> <br> I have no idea about a possible solution, so any help will be very apreciated.<br> <br> Regards<br> <br> César.<br> <pre wrap=""><pre wrap=""> <hr size="4" width="90%"> _______________________________________________ nist-sip mailing list <a class="moz-txt-link-abbreviated" href="mailto:[email protected]">[email protected]</a> <a class="moz-txt-link-freetext" href="http://www-x.antd.nist.gov/mailman/listinfo/nist-sip">http://www-x.antd.nist.gov/mailman/listinfo/nist-sip</a> </pre></pre> </blockquote> </body> </html> --===============8954611484994838046== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ nist-sip mailing list [email protected] http://www-x.antd.nist.gov/mailman/listinfo/nist-sip --===============8954611484994838046==--