SipServlet Session Handler

44 views
Skip to first unread message

Thomas

unread,
Jul 27, 2011, 11:33:46 AM7/27/11
to cipango-users
Hey everyone,

atm i am implementing an application server, which uses a sip servlet
as sip message handler.
So what am i trying?:
I create with the applicationserver a sip session, sending an invite
to a participant. The session gets as the handler the sip servlet. So
following the participant sends an 200 OK and the AS is responding
with an ACK -> so everthing works fine here.

Now to the problem:
- when i send after two minutes a request to this session the
request is not handled any more by the sip servlet
- when i send this request within one minute the servlet handles the
message...

So any clues what this can be? I've set expire timers to one hour but
nothing changed so I guess this is not it.

Best regards,
Thomas

Thomas

unread,
Jul 27, 2011, 12:02:33 PM7/27/11
to cipang...@googlegroups.com
Hi Thomas,

This looks that a session expiry issue, did you set session-timeout in a sip.xml or annotation or in your code ? Could you run a test (request not handled) with container logs in DEBUG level and post us the log file ?

Regards,

Thomas

> --
> You received this message because you are subscribed to the Google Groups "cipango-users" group.
> To post to this group, send email to cipang...@googlegroups.com.
> To unsubscribe from this group, send email to cipango-user...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/cipango-users?hl=en.
>

Thomas

unread,
Jul 27, 2011, 12:27:34 PM7/27/11
to cipango-users
Hi Thomas,

so I've checked the sip.xml and my src code, but no expire is set
here. Ofcourse I would run the test... but to be honest I do not know
how to set the debug level. ATM only send messages get logged inside
logs folder... :(

Regards
Thomas

Thomas

unread,
Jul 27, 2011, 12:53:53 PM7/27/11
to cipang...@googlegroups.com
If you're simply starting from the command line, you only have to add the following system property:

java -Dorg.eclipse.jetty.util.log.DEBUG=true -jar start.jar --ini=start-cipango.ini 

This generates a lot of logs so you may want to redirect stdout to a file. 

Alternatively, you may also use any slf4j logger. To do so, simply drop the log jar (log4j for instance in its slf4j flavour) in the lib/ext directory and use the log4j.properties file in the resources dir. 


Could you also check the default session-timeout in the etc/sipdefault.xml file ? Also, did you try to set the session-timout in your sip.xml as follows:

<?xml version="1.0" encoding="UTF-8"?>

          version="1.1">
    
[...]

    <session-config>
        <session-timeout>10</session-timeout>
    </session-config>
</sip-app>

Regards, 

Thomas

Thomas

unread,
Jul 27, 2011, 1:23:30 PM7/27/11
to cipango-users
Thanks for your fast reply! So in sipdefault.xml the timeout is set to
12. But the servlet does not respond in between 70 and 80 sec. So this
should not be the problem.

Ive run the debug .. and this is what is generated at the end: I do
not see any problems in here. What do you think?

Regards,
Thomas

for transaction z9hG4bK695b90acd266/INVITE/Proceeding
2011-07-27 19:17:01.260:DBUG::z9hG4bK695b90acd266/INVITE/Proceeding ->
Accepted
2011-07-27 19:17:01.260:DBUG::scheduled timer TimerM@32s for call
session: a35e81b1@TPI-LPT
2011-07-27 19:17:01.260:DBUG::canceled timer session-timer@718s for
call session: a35e81b1@TPI-LPT
2011-07-27 19:17:01.260:DBUG::scheduled timer session-timer@720s for
call session: a35e81b1@TPI-LPT
2011-07-27 19:17:01.264:DBUG::added client invite context with cseq 1
2011-07-27 19:17:01.264:DBUG::[b20dd421,state=EARLY, _role = UAC] ->
CONFIRMED
2011-07-27 19:17:01.265:DBUG::loaded class
com.sun.org.apache.xerces.internal.jaxp.datatype.DatatypeFactoryImpl
from null
2011-07-27 19:17:01.267:DBUG::canceled timer session-timer@719s for
call session: 0ef30df3@TPI-LPT
2011-07-27 19:17:01.268:DBUG::scheduled timer session-timer@720s for
call session: 0ef30df3@TPI-LPT
2011-07-27 19:17:01.268:DBUG::z9hG4bKd61d5d196c85/ACK/Undefined ->
Trying
2011-07-27 19:17:01.269:DBUG::canceled timer session-timer@719s for
call session: a35e81b1@TPI-LPT
2011-07-27 19:17:01.276:DBUG::scheduled timer session-timer@720s for
call session: a35e81b1@TPI-LPT
2011-07-27 19:17:01.276:DBUG::z9hG4bK080880c56bcf/ACK/Undefined ->
Trying
2011-07-27 19:17:01.269:DBUG::waiting 30339 ms for call session:
0ef30df3@TPI-LPT[stxs= [], ctxs=[z9hG4bK2918bf255caf/INVITE/Accepted],
timers=[TimerM@30s, session-timer@719s], sessions=[c2c546bb/broker-
third-party-call(1)]]
2011-07-27 19:17:01.287:DBUG::waiting 30321 ms for call session:
0ef30df3@TPI-LPT[stxs= [], ctxs=[z9hG4bK2918bf255caf/INVITE/Accepted],
timers=[TimerM@30s, session-timer@719s], sessions=[c2c546bb/broker-
third-party-call(1)]]
2011-07-27 19:17:31.616:DBUG::running timers for call session:
0ef30df3@TPI-LPT[stxs= [], ctxs=[z9hG4bK2918bf255caf/INVITE/Accepted],
timers=[TimerM@-8ms, session-timer@689s], sessions=[c2c546bb/broker-
third-party-call(1)]]
2011-07-27 19:17:31.617:DBUG::running timer TimerM@-9ms for call
session 0ef30df3@TPI-LPT
2011-07-27 19:17:31.618:DBUG::timeout TimerM for transaction
z9hG4bK2918bf255caf/INVITE/Accepted
2011-07-27 19:17:31.618:DBUG::z9hG4bK2918bf255caf/INVITE/Accepted ->
Terminated
2011-07-27 19:17:31.619:DBUG::waiting 1641 ms for call session:
a35e81b1@TPI-LPT[stxs= [], ctxs=[z9hG4bK695b90acd266/INVITE/Accepted],
timers=[TimerM@1s, session-timer@689s], sessions=[086e8fc3/broker-
third-party-call(1)]]
2011-07-27 19:17:33.261:DBUG::running timers for call session:
a35e81b1@TPI-LPT[stxs= [], ctxs=[z9hG4bK695b90acd266/INVITE/Accepted],
timers=[TimerM@-1ms, session-timer@688s], sessions=[086e8fc3/broker-
third-party-call(1)]]
2011-07-27 19:17:33.262:DBUG::running timer TimerM@-2ms for call
session a35e81b1@TPI-LPT
2011-07-27 19:17:33.262:DBUG::timeout TimerM for transaction
z9hG4bK695b90acd266/INVITE/Accepted
2011-07-27 19:17:33.263:DBUG::z9hG4bK695b90acd266/INVITE/Accepted ->
Terminated
2011-07-27 19:17:33.263:DBUG::waiting 688005 ms for call session:
0ef30df3@TPI-LPT[stxs= [], ctxs=[], timers=[session-timer@688s],
sessions=[c2c546bb/broker-third-party-call(1)]]

On 27 Jul., 18:53, Thomas <tho...@cipango.org> wrote:
> If you're simply starting from the command line, you only have to add the following system property:
>
> java -Dorg.eclipse.jetty.util.log.DEBUG=true -jar start.jar --ini=start-cipango.ini
>
> This generates a lot of logs so you may want to redirect stdout to a file.
>
> Alternatively, you may also use any slf4j logger. To do so, simply drop the log jar (log4j for instance in its slf4j flavour) in the lib/ext directory and use the log4j.properties file in the resources dir.
>
> Could you also check the default session-timeout in the etc/sipdefault.xml file ? Also, did you try to set the session-timout in your sip.xml as follows:
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <sip-app  xmlns="http://www.jcp.org/xml/ns/sipservlet"
>           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>           xsi:schemaLocation="http://www.jcp.org/xml/ns/sipservlethttp://www.jcp.org/xml/ns/sipservlet/sip-app_1_1.xsd"
>           version="1.1">
>
> [...]
>
>     <session-config>
>        

Thomas

unread,
Jul 27, 2011, 1:26:11 PM7/27/11
to cipango-users
BTW. I set in the sip.xml the following .. just in case ;-).

<session-config>
<session-timeout>120</session-timeout>
</session-config
> >           xsi:schemaLocation="http://www.jcp.org/xml/ns/sipservlethttp://www.jcp.org/xml/ns/sipserv..."

Thomas

unread,
Jul 28, 2011, 3:38:38 AM7/28/11
to cipang...@googlegroups.com
Hi Thomas,

There is nothing suspicious in the logs below. Could you sent the whole log file (at least from initial INVITE to not handled message) along with the associated message.log to find out what the call flow is.

Regards,

Thomas

Thomas

unread,
Jul 29, 2011, 3:48:36 AM7/29/11
to cipango-users
Hey Thomas,

sorry for the waiting :-). So.. basically it is working now. A little
explenation: I do not know if you still remember about the cipango in
osgi chat we had. The conclusion is we got it running and if we can
spare some time we would gladly contribute what we made to got this
stuff working. Yesterday we switched some modules in our version and i
guess that was the problem. So we made a new build and now the servlet
is responding. But to be honest I do not realy know what was the
problem here.

Anyways thanks for your help!

Best regards, Thomas

On 28 Jul., 09:38, Thomas <tho...@cipango.org> wrote:
> Hi Thomas,
>
> >>           xsi:schemaLocation="http://www.jcp.org/xml/ns/sipservlethttp://www.jcp.org/xml/ns/sipserv..."

Thomas

unread,
Jul 29, 2011, 7:56:50 AM7/29/11
to cipang...@googlegroups.com
Hi Thomas,

Fine ! Please get back to us when you have some time to commit the OSGi integration.

Regards,

Thomas

Reply all
Reply to author
Forward
0 new messages