<div class="gmail_quote"><span style="font-weight:bold">Hi All,</span><div><span style="font-weight:bold"><br></span></div><div><span style="font-weight:bold">I am trying to build a SIP application which will act as proxy to the phones those are connected to it like a server that is in call centers.</span></div>
<div><span style="font-weight:bold"><br></span></div><div><span style="font-weight:bold">I have have made a servlet code is as follows..</span></div><div><br></div><div>
<div>package com.sip.servlet;<br></div><div><br></div><div>import javax.servlet.sip.SipServlet;<br></div><div>import javax.servlet.sip.SipServletRequest;</div><div>import javax.servlet.sip.SipServletResponse;</div><div> <br>
</div><div><br></div><div>public class SimpleProxyServlet extends SipServlet</div><div>{</div><div> </div><div> protected void doRegister(SipServletRequest request) throws IOException<br></div><div> {</div><div>
try</div>
<div> {</div><div> System.out.println("SipServletRequest: Got doRegister:\n" + request);</div><div> </div><div> </div><div> SipServletResponse resp = request.createResponse(SipServletResponse.SC_OK);</div>
<div><br></div><div> resp.send();</div><div> }</div><div> catch(Exception e)</div><div> {</div><div> e.printStackTrace();</div><div> }</div><div> </div><div> }</div>
<div>}</div><div><br></div><div><span style="font-weight:bold">and sip.xml is as follows.</span>.</div><div><br></div><div><br></div><div><div><sip-app></div><div> <display-name>Simple Proxy Servlet</display-name></div>
<div> <description>Simple Proxy Servlet</description></div><div> <servlet></div><div> <servlet-name>SimpleProxyServlet</servlet-name></div><div> <display-name>SimpleProxyServlet</display-name></div>
<div> <description>Simple SIP proxy servlet</description></div><div> <servlet-class>com.sip.servlet.SimpleProxyServlet</servlet-class></div><div> <load-on-startup>1</load-on-startup></div>
<div> </servlet></div><div> <servlet-mapping></div><div> <servlet-name>SimpleProxyServlet</servlet-name></div><div> <pattern></div><div> <or></div><div> <equal></div>
<div> <var>request.method</var></div><div> <value>REGISTER</value></div><div> </equal></div><div> </or></div><div> </pattern></div>
<div> </servlet-mapping></div><div></sip-app></div><div><br></div><div><br></div><div><span style="font-weight:bold">I am using X-Lite softphone for testing this code. When ever first request came to server, my doRegister of the servlet is called and request is preocessed by the servlet. But when i am sending second register request using other PC then it shows the request timeout on the softphone and also my doREgister method is also not called.</span></div>
<div><span style="font-weight:bold"><br></span></div><div><span style="font-weight:bold">I have also checked that if it is problem due to sending the request from other PC but if i send first request from other PC then servlet process the request and again second request is not processed.</span></div>
<div><span style="font-weight:bold"><br></span></div><div><span style="font-weight:bold">Plz help me to solve this problem.</span></div><div><span style="font-weight:bold"><br>
</span></div><div><span style="font-weight:bold"><br></span></div><div><span style="font-weight:bold">Thanks.</span></div><div><span style="font-weight:bold">amit</span></div>
<div><br></div></div></div>
</div><br>