[SIPForum-discussion] problem in registration request

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[SIPForum-discussion] problem in registration request

amitbansal3
Hi All,

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.

I have have made a servlet code is as follows..

package com.sip.servlet;

import javax.servlet.sip.SipServlet;
import javax.servlet.sip.SipServletRequest;
import javax.servlet.sip.SipServletResponse;
  

public class SimpleProxyServlet extends SipServlet
{
    
    protected void doRegister(SipServletRequest request) throws IOException
    {
        try
        {
            System.out.println("SipServletRequest: Got doRegister:\n" + request);
        
           
            SipServletResponse resp = request.createResponse(SipServletResponse.SC_OK);

            resp.send();
        }
        catch(Exception e)
        {
            e.printStackTrace();
        }
        
    }
}

and sip.xml is as follows..


<sip-app>
    <display-name>Simple Proxy Servlet</display-name>
    <description>Simple Proxy Servlet</description>
    <servlet>
        <servlet-name>SimpleProxyServlet</servlet-name>
        <display-name>SimpleProxyServlet</display-name>
        <description>Simple SIP proxy servlet</description>
        <servlet-class>com.sip.servlet.SimpleProxyServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
        <servlet-name>SimpleProxyServlet</servlet-name>
        <pattern>
            <or>
                <equal>
                    <var>request.method</var>
                    <value>REGISTER</value>
                </equal>
            </or>
        </pattern>
    </servlet-mapping>
</sip-app>


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.

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.

Plz help me to solve this problem.


Thanks.
amit



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Thanks,
amit
Reply | Threaded
Open this post in threaded view
|

Re: [SIPForum-discussion] problem in registration request

Bogdan-Andrei Iancu
Hi Amit,

We are using weSIP for this? or....?  Because there is no mention about
the software you are using and definitely is not OpenSIPS as you have
JAVA there :D....

Regards,
Bogdan

Amit Bansal wrote:

> Hi All,
>
> 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.
>
> I have have made a servlet code is as follows..
>
> package com.sip.servlet;
>
> import javax.servlet.sip.SipServlet;
> import javax.servlet.sip.SipServletRequest;
> import javax.servlet.sip.SipServletResponse;
>  
>
> public class SimpleProxyServlet extends SipServlet
> {
>    
>     protected void doRegister(SipServletRequest request) throws
> IOException
>     {
>         try
>         {
>             System.out.println("SipServletRequest: Got doRegister:\n"
> + request);
>        
>            
>             SipServletResponse resp =
> request.createResponse(SipServletResponse.SC_OK);
>
>             resp.send();
>         }
>         catch(Exception e)
>         {
>             e.printStackTrace();
>         }
>        
>     }
> }
>
> and sip.xml is as follows..
>
>
> <sip-app>
>     <display-name>Simple Proxy Servlet</display-name>
>     <description>Simple Proxy Servlet</description>
>     <servlet>
>         <servlet-name>SimpleProxyServlet</servlet-name>
>         <display-name>SimpleProxyServlet</display-name>
>         <description>Simple SIP proxy servlet</description>
>         <servlet-class>com.sip.servlet.SimpleProxyServlet</servlet-class>
>         <load-on-startup>1</load-on-startup>
>     </servlet>
>     <servlet-mapping>
>         <servlet-name>SimpleProxyServlet</servlet-name>
>         <pattern>
>             <or>
>                 <equal>
>                     <var>request.method</var>
>                     <value>REGISTER</value>
>                 </equal>
>             </or>
>         </pattern>
>     </servlet-mapping>
> </sip-app>
>
>
> 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.
>
> 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.
>
> Plz help me to solve this problem.
>
>
> Thanks.
> amit
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>  


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: [SIPForum-discussion] problem in registration request

amitbansal3
In reply to this post by amitbansal3
I am using Salfin server as a SIP container, NetBeans as IDE, Java language  and X-Lite as softphone.


I am also tried to deploy this sample application (above link) but facing the same problem.

Plz help me to overcome this problem.

Thanks
amit



On Thu, Feb 12, 2009 at 1:00 PM, Bogdan-Andrei Iancu (via Nabble) <[hidden email]> wrote:
Hi Amit,

We are using weSIP for this? or....?  Because there is no mention about
the software you are using and definitely is not OpenSIPS as you have
JAVA there :D....

Regards,
Bogdan

Amit Bansal wrote:

> Hi All,
>
> 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.
>
> I have have made a servlet code is as follows..
>
> package com.sip.servlet;
>
> import javax.servlet.sip.SipServlet;
> import javax.servlet.sip.SipServletRequest;
> import javax.servlet.sip.SipServletResponse;
>  
>
> public class SimpleProxyServlet extends SipServlet
> {
>    
>     protected void doRegister(SipServletRequest request) throws
> IOException
>     {
>         try
>         {
>             System.out.println("SipServletRequest: Got doRegister:\n"
> + request);
>        
>            
>             SipServletResponse resp =
> request.createResponse(SipServletResponse.SC_OK);
>
>             resp.send();
>         }
>         catch(Exception e)
>         {
>             e.printStackTrace();
>         }
>        
>     }
> }
>
> and sip.xml is as follows..
>
>
> <sip-app>
>     <display-name>Simple Proxy Servlet</display-name>
>     <description>Simple Proxy Servlet</description>
>     <servlet>
>         <servlet-name>SimpleProxyServlet</servlet-name>
>         <display-name>SimpleProxyServlet</display-name>
>         <description>Simple SIP proxy servlet</description>
>         <servlet-class>com.sip.servlet.SimpleProxyServlet</servlet-class>
>         <load-on-startup>1</load-on-startup>
>     </servlet>
>     <servlet-mapping>
>         <servlet-name>SimpleProxyServlet</servlet-name>
>         <pattern>
>             <or>
>                 <equal>
>                     <var>request.method</var>
>                     <value>REGISTER</value>
>                 </equal>
>             </or>
>         </pattern>
>     </servlet-mapping>
> </sip-app>
>
>
> 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.
>
> 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.
>
> Plz help me to solve this problem.
>
>
> Thanks.
> amit
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> Users@...
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>  

_______________________________________________
Users mailing list
Users@...
http://lists.opensips.org/cgi-bin/mailman/listinfo/users






_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Thanks,
amit
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSIPS-Users] [SIPForum-discussion] problem in registration request

amitbansal3
In reply to this post by Bogdan-Andrei Iancu
I am using Salfin server as a SIP container, NetBeans as IDE, Java language  and X-Lite as softphone.


I am also tried to deploy this sample application (above link) but facing the same problem.

Plz help me to overcome this problem.

Thanks
amit



On Thu, Feb 12, 2009 at 1:00 PM, Bogdan-Andrei Iancu (via Nabble) <[hidden email]> wrote:
Hi Amit,

We are using weSIP for this? or....?  Because there is no mention about
the software you are using and definitely is not OpenSIPS as you have
JAVA there :D....

Regards,
Bogdan

Amit Bansal wrote:

> Hi All,
>
> 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.
>
> I have have made a servlet code is as follows..
>
> package com.sip.servlet;
>
> import javax.servlet.sip.SipServlet;
> import javax.servlet.sip.SipServletRequest;
> import javax.servlet.sip.SipServletResponse;
>  
>
> public class SimpleProxyServlet extends SipServlet
> {
>    
>     protected void doRegister(SipServletRequest request) throws
> IOException
>     {
>         try
>         {
>             System.out.println("SipServletRequest: Got doRegister:\n"
> + request);
>        
>            
>             SipServletResponse resp =
> request.createResponse(SipServletResponse.SC_OK);
>
>             resp.send();
>         }
>         catch(Exception e)
>         {
>             e.printStackTrace();
>         }
>        
>     }
> }
>
> and sip.xml is as follows..
>
>
> <sip-app>
>     <display-name>Simple Proxy Servlet</display-name>
>     <description>Simple Proxy Servlet</description>
>     <servlet>
>         <servlet-name>SimpleProxyServlet</servlet-name>
>         <display-name>SimpleProxyServlet</display-name>
>         <description>Simple SIP proxy servlet</description>
>         <servlet-class>com.sip.servlet.SimpleProxyServlet</servlet-class>
>         <load-on-startup>1</load-on-startup>
>     </servlet>
>     <servlet-mapping>
>         <servlet-name>SimpleProxyServlet</servlet-name>
>         <pattern>
>             <or>
>                 <equal>
>                     <var>request.method</var>
>                     <value>REGISTER</value>
>                 </equal>
>             </or>
>         </pattern>
>     </servlet-mapping>
> </sip-app>
>
>
> 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.
>
> 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.
>
> Plz help me to solve this problem.
>
>
> Thanks.
> amit
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> Users@...
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>  

_______________________________________________
Users mailing list
Users@...
http://lists.opensips.org/cgi-bin/mailman/listinfo/users





Thanks,
amit
Reply | Threaded
Open this post in threaded view
|

Re: [SIPForum-discussion] problem in registration request

Brett Nemeroff
In reply to this post by amitbansal3
Ok, this may be a silly question... but.. do you have any OpenSIPs in there? :)

On Thu, Feb 12, 2009 at 2:07 AM, Amit Bansal <[hidden email]> wrote:
I am using Salfin server as a SIP container, NetBeans as IDE, Java language  and X-Lite as softphone.


I am also tried to deploy this sample application (above link) but facing the same problem.

Plz help me to overcome this problem.

Thanks
amit



On Thu, Feb 12, 2009 at 1:00 PM, Bogdan-Andrei Iancu (via Nabble) <[hidden email]> wrote:
Hi Amit,

We are using weSIP for this? or....?  Because there is no mention about
the software you are using and definitely is not OpenSIPS as you have
JAVA there :D....

Regards,
Bogdan

Amit Bansal wrote:

> Hi All,
>
> 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.
>
> I have have made a servlet code is as follows..
>
> package com.sip.servlet;
>
> import javax.servlet.sip.SipServlet;
> import javax.servlet.sip.SipServletRequest;
> import javax.servlet.sip.SipServletResponse;
>  
>
> public class SimpleProxyServlet extends SipServlet
> {
>    
>     protected void doRegister(SipServletRequest request) throws
> IOException
>     {
>         try
>         {
>             System.out.println("SipServletRequest: Got doRegister:\n"
> + request);
>        
>            
>             SipServletResponse resp =
> request.createResponse(SipServletResponse.SC_OK);
>
>             resp.send();
>         }
>         catch(Exception e)
>         {
>             e.printStackTrace();
>         }
>        
>     }
> }
>
> and sip.xml is as follows..
>
>
> <sip-app>
>     <display-name>Simple Proxy Servlet</display-name>
>     <description>Simple Proxy Servlet</description>
>     <servlet>
>         <servlet-name>SimpleProxyServlet</servlet-name>
>         <display-name>SimpleProxyServlet</display-name>
>         <description>Simple SIP proxy servlet</description>
>         <servlet-class>com.sip.servlet.SimpleProxyServlet</servlet-class>
>         <load-on-startup>1</load-on-startup>
>     </servlet>
>     <servlet-mapping>
>         <servlet-name>SimpleProxyServlet</servlet-name>
>         <pattern>
>             <or>
>                 <equal>
>                     <var>request.method</var>
>                     <value>REGISTER</value>
>                 </equal>
>             </or>
>         </pattern>
>     </servlet-mapping>
> </sip-app>
>
>
> 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.
>
> 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.
>
> Plz help me to solve this problem.
>
>
> Thanks.
> amit
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> Users@...


_______________________________________________
Users mailing list
Users@...



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users