Re: Jain Sip - duplicated messages
"brea C." <[email protected]> Thu, 8 May 2008 15:58:28 +0200
| Newsgroups | gmane.comp.voip.nist-sip |
|---|---|
| Message-ID | <[email protected]> |
--===============1440614361282534208== Content-Type: multipart/alternative; boundary="----=_Part_928_33147679.1210255108188" ------=_Part_928_33147679.1210255108188 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Thanks for your reply Jeroen! The problem is not the message type, in each dialog can see duplicated ACKs, BYEs , INVITEs and 200s... and duplicated in both ways ( sides of the proxy). I'm using wireshark in 192.168.1.40 where the proxy is. Following your indications i trace with wireshark too in the caller pc. And its correct, messages who are duplicated in proxy's wireshark, appears just one time in the client's wireshark. Until today I believe in wireshark ;) Regards C=E9sar On Wed, May 7, 2008 at 6:37 PM, Jeroen van Bemmel <[email protected]> wrote= : > Cesar, > > Are you sure this is not some artifact of the tool you are using to captu= re > 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 t= he > Contact address from the 200 OK > > Try capturing the trace at a different machine (which machine did you use > to trace, 192.168.1.40?) > > Regards, > Jeroen > > brea C. wrote: > > Hi! > > 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. > > The problem is that mostly sip messages who are proxied ( both requests a= nd > responses ), sent in statefull mode with client or server Transaction, > appears duplicated on the lan. Its not because a expired timer, duplicat= ed > messages are sent simultaneously in just milliseconds. > > Here is attached a graph about this. > > And the code is no more complex than: > > > -------------------------------------------------------------------------= ------------------------------------------------------------ > public void processInvite(RequestEvent requestEvent) > { > try { > Request request =3D requestEvent.getRequest(); > ServerTransaction st =3D requestEvent.getServerTransaction(); > > if (st =3D=3D null) { > st =3D sipProvider.getNewServerTransaction(request); > } > > > Request newRequest =3D (Request) request.clone(); > SipURI requestURI =3D (SipURI)newRequest.getRequestUR= I(); > requestURI =3D > ProtocolObjects.addressFactory.createSipURI("annc",cmsAddress); > requestURI.setParameter("play",ad); > newRequest.setRequestURI(requestURI); > > > // Record Route > SipURI sipURI =3D > ProtocolObjects.addressFactory.createSipURI("Proxy",host); > sipURI.setPort(port); > Address address =3D > ProtocolObjects.addressFactory.createAddress("Proxy",sipURI); > RecordRouteHeader recordRoute =3D > ProtocolObjects.headerFactory.createRecordRouteHeader(address); > newRequest.addHeader(recordRoute); > > // Via Header > ViaHeader viaHeader =3D > ProtocolObjects.headerFactory.createViaHeader(host, port, transport, null= ); > newRequest.addFirst(viaHeader); > > ClientTransaction ct =3D > sipProvider.getNewClientTransaction(newRequest); > log.info(">>> Client Transaction Created state > "+ct.getState()+" ct: "+ ct); > > ct.setApplicationData(st); > ct.sendRequest(); > > > } catch (Exception ex) { > ex.printStackTrace(); > System.exit(0); > } > } > > public void response(ResponseEvent evt) { > Response response =3D evt.getResponse(); > ClientTransaction ct =3D evt.getClientTransaction(); > > if ( response.getStatusCode() !=3D 100 ) { > if ( ct !=3D null ) { > try { > ServerTransaction st =3D (ServerTransaction) > ct.getApplicationData(); > Response newResp =3D (Response) response.clone(); > newResp.removeFirst(ViaHeader.NAME); > > st.sendResponse(newResp); > > } catch (Exception e){ > e.printStackTrace(); > } > } else { > System.out.println("Warning: responseInvite and ct =3D=3D null, > nothing done"); > } > > } > } > > -------------------------------------------------------------------------= -------------------------------------------------------- > > I have no idea about a possible solution, so any help will be very > apreciated. > > Regards > > C=E9sar. > > ------------------------------ > > _______________________________________________ > nist-sip mailing [email protected]://www-x.antd.nist.gov/mai= lman/listinfo/nist-sip > > ------=_Part_928_33147679.1210255108188 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Thanks for your reply Jeroen!<br><br> The problem is not the message type, in each dialog can see duplicated ACKs, BYEs , INVITEs and 200s... and duplicated in both ways ( sides of the proxy).<br><br> I&#= 39;m using wireshark in <a href=3D"http://192.168.1.40/" target=3D"_blank">= 192.168.1.40</a> where the proxy is. Following your indications i trace with wireshark too in the caller pc. And its correct, messages who are duplicated in proxy's wireshark, appears just one time in the client's wireshark.= <br> <br> Until today I believe in wireshark ;)<br><br> Regards<br>&nb= sp;C=E9sar<br><br><div class=3D"gmail_quote">On Wed, May 7, 2008 at 6:37 PM= , Jeroen van Bemmel <<a href=3D"mailto:[email protected]">jbemmel@zonnet= .nl</a>> wrote:<br> <blockquote class=3D"gmail_quote" style=3D"border-left: 1px solid rgb(204, = 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> =20 <div bgcolor=3D"#ffffff" text=3D"#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 <a href=3D"http://192.168.1.4= 0" target=3D"_blank">192.168.1.40</a> 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, <a href=3D"http://192.168.1.40" target=3D"_blank">192.168.1.4= 0</a>?)<br> <br> Regards,<br> Jeroen<br> <br> brea C. wrote: <blockquote type=3D"cite"><div><div></div><div class=3D"Wj3C7c">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> &n= bsp; Request request =3D requestEvent.getRequest()= ;<br> ServerTransaction = st =3D requestEvent.getServerTransaction();<br> <br> if (st =3D=3D null= ) {<br> = st =3D sipProvider.getNewServerTransaction(request);<br> }<br> <br> <br> &= nbsp; Request newRequest =3D (Request) request.clon= e();<br> &nb= sp; SipURI requestURI =3D (SipURI)newRequest.getRequestURI();<br> &= nbsp; requestURI =3D ProtocolObjects.addressFactory.createSipURI("annc",cmsAddress);<b= r> &nb= sp; requestURI.setParameter("play"= ,ad);<br> &nb= sp; newRequest.setRequestURI(re= questURI);<br> <br> <br> // Record Route<br= > SipURI sipURI =3D ProtocolObjects.addressFactory.createSipURI("Proxy",host);<br> sipURI.setPort(por= t);<br> Address address = =3D ProtocolObjects.addressFactory.createAddress("Proxy",sipURI);<br> RecordRouteHeader = recordRoute =3D ProtocolObjects.headerFactory.createRecordRouteHeader(address);<br> newRequest.addHead= er(recordRoute);<br> <br> // Via Header<br> ViaHeader viaHeade= r =3D ProtocolObjects.headerFactory.createViaHeader(host, port, transport, null);<br> newRequest.addFirs= t(viaHeader);<br> <br> ClientTransaction = ct =3D sipProvider.getNewClientTransaction(newRequest);<br> <a href=3D"http://= log.info" target=3D"_blank">log.info</a>(">>> Client Transact= ion Created state "+ct.getState()+" ct: "+ ct);<br> <br> ct.setApplicationD= ata(st);<br> ct.sendRequest();<= br> <br> <br> &nb= sp; } catch (Exception ex) {<br> &nb= sp; ex.printSta= ckTrace();<br> &nb= sp; System.exit= (0);<br> &nb= sp; }<br> }<br> <br> public void response(ResponseEvent evt) {<br> Response response =3D evt.getResponse= ();<br> ClientTransaction ct =3D evt.getClien= tTransaction();<br> <br> if ( response.getStatusCode() !=3D 10= 0 ) { <br> if ( ct !=3D null ) {<br> try {<br> ServerTransaction = st =3D (ServerTransaction) ct.getApplicationData();<br> Response newResp = =3D (Response) response.clone();<br> newResp.removeFirs= t(ViaHeader.NAME);<br> <br> st.sendResponse(ne= wResp);<br> <br> } catch (Exception= e){<br> = e.printStackTrace();<br> }<br> } else {<br> System.out.println("Warni= ng: responseInvite and ct =3D=3D 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=E9sar.<br> </div></div><pre><pre><hr size=3D"4" width=3D"90%"> _______________________________________________ nist-sip mailing list <a href=3D"mailto:[email protected]" target=3D"_blank">[email protected]= ist.gov</a> <a href=3D"http://www-x.antd.nist.gov/mailman/listinfo/nist-sip" target=3D"= _blank">http://www-x.antd.nist.gov/mailman/listinfo/nist-sip</a> </pre></pre> </blockquote> </div> </blockquote></div><br> ------=_Part_928_33147679.1210255108188-- --===============1440614361282534208== 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 --===============1440614361282534208==--