dev@glassfish.java.net

Re: Question regarding SIP Registration/UnRegistration in Sailfin.

From: sankara rao bhogi <Sankara.Rao_at_Sun.COM>
Date: Thu, 30 Apr 2009 16:22:32 +0530

Amith,

 A REGISTER request does not establish a dialog. Another REGISTER
request can not be a refresh request from the SIP container point of
view, from a registrar application point of view it may be.

So, what would you see for every REGISTER request, you would see a
session created and a corresponding session destroyed.
Why is the session getting expired in three minutes? Default value of
session time out is three minutes, which is configurable. SailFin (any
JSR 289 container) doesn't take expiry header or parameter in to
consideration, application can read and call the Session's setExpires()
method.

regards
sankar


amith nambiar wrote:
> Hi All,
>
> I was trying to build a Registrar with Sailfin. I have a class which looks like :
>
> @javax.servlet.sip.annotation.SipServlet
> @javax.servlet.sip.annotation.SipListener
> public class RegistrarServlet extends javax.servlet.sip.SipServlet
> implements SipSessionListener, SipSessionBindingListener
>
>
> Following are the implementations of SipSessionListener interface.
>
> public void sessionCreated(SipSessionEvent se)
> {
> System.out.println(" ************ SESSION CREATED ***************** " + DmTime.getDateTime() + " : " + se.getSession().getCallId());
> }
>
> public void sessionDestroyed(SipSessionEvent se)
> {
> System.out.println(" **************** SESSION DESTROYED ************" + DmTime.getDateTime() + " : " + se.getSession().getCallId());
> }
>
> Now, when i get REGISTER messages my doRegister function gets called. I'm able to handle explicit un-REGISTER messages as well i,e the UA sending
> REGISTER with expires = 0.
>
> ************ SESSION CREATED ***************** 2009/04/30 11:58:03 : 588267750_at_192.168.1.137
> ************ SESSION CREATED ***************** 2009/04/30 11:58:34 : 588267750_at_192.168.1.137
> ************ SESSION CREATED ***************** 2009/04/30 11:59:04 : 588267750_at_192.168.1.137
> ************ SESSION CREATED ***************** 2009/04/30 11:59:35 : 588267750_at_192.168.1.137
> **************** SESSION DESTROYED ************2009/04/30 12:01:03 : 588267750_at_192.168.1.137
> **************** SESSION DESTROYED ************2009/04/30 12:01:34 : 588267750_at_192.168.1.137
> **************** SESSION DESTROYED ************2009/04/30 12:02:04 : 588267750_at_192.168.1.137
> **************** SESSION DESTROYED ************2009/04/30 12:02:35 : 588267750_at_192.168.1.137
>
> I see that whenever a refresh message is received for a REGISTER, sessionCreated(SipSessionEvent se) gets called.
> 1) Is this expected behaviour ?. I thought the container looks at the call-id in the refresh message and ascertains that
> it is a refresh as opposed to a new session ?
>
> 2) My expires interval is 60 seconds why does sessionDestroyed(SipSessionEvent se) get called after 180 seconds ?
> Does'nt the container look into the 200 OK to REGISTER to calculate session expiry time ?
> Note that the session actually expires 60 seconds from :
> ************ SESSION CREATED ***************** 2009/04/30 11:59:35 : 588267750_at_192.168.1.137
> because i powered off the SIP device after the message.
>
> 3) Why is session destroyed being called so many times ?
> 4) Can someone help me by pointing to docs in setting up a testbed so that i can go through the code for sailfin (any docs would be great ).
>
> Thanks.
>
> Best,
> Amith
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>
>