I have looked at the rfc 4028 which is saying that only one side of the
UA required to make the session timer works, is that true? And also I
was trying to start using sofia-sip's session timer to determine if the
sip call didn't send the bye message to terminate the call. Right now I
am using Sofia-sip as UAS which receives INVITE from the client, and use
SDP Answer/Offer for resource allocations. Here is what I have done to
try to use the SESSION_EXPIRE in the sofia-sip:

First, I am calling the nua_set_params function with the following
parameters: 

        nua_set_params(context->nua,
                        NUTAG_AUTOANSWER(false),
                        NUTAG_AUTOALERT(false),
              NUTAG_AUTOACK(false),
                NUTAG_UPDATE_REFRESHER(nua_local_refresher),
                    NUTAG_SESSION_TIMER(1),
                        TAG_END());

And in my event callback function, I would expect the client sends me an
INVITE message and I should respond an OK 200, and this is the way I
respond with the SESSION_TIMER:

            nua_respond(nh, 200, "OK",
                    SIPTAG_CONTENT_TYPE_STR("application/sdp"),
                    SOATAG_RTP_SELECT(2),
                    SOATAG_AUDIO_AUX("telephone-event"),
                    SOATAG_USER_SDP_STR(m_sdpAnswer->GetSDPAnswer()),
                    NUTAG_UPDATE_REFRESHER(nua_local_refresher),
                    NUTAG_SESSION_TIMER(1),
                    TAG_NULL());

So I would expect it sends a RE-INVITE/UPDATE after 1 second; however,
after 1 second, the event callback got an nua_r_invite with status 900
and "Internal NUA error" followed by nua_i_state. Could you see if there
is anything I am not doing right in order to use the SESSION_TIMER? And
also I am wondering when NAS sends RE-INVITE, what kind of SDP it goes
with the RE-INVITE, is that the one we sent with the OK 200?

Thanks for your help!!

-----Original Message-----
From: Pekka Pessi [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, November 15, 2006 10:47 AM
To: Chung Pak Lai
Cc: [email protected]
Subject: Re: [Sofia-sip-devel] Question regarding sip call termination

On 11/14/06, Chung Pak Lai <[EMAIL PROTECTED]> wrote:
> I got a question regarding to the sip call termination in sofia-sip. 
> As I am using sofia-sip with TCP connection, if the sip call's 
> connection is broken in the middle of the call without sending bye 
> message, will sofia-sip detect the connection failure, or it's up to 
> the application layer how it wants to handle it? Is there a call back 
> status with that event happen so that I know when I should free the
connection.

The transport connection is only needed for the duration of the INVITE
transaction. After receiving final response to the INVITE, the client
can close the connection. There is no direct relationship between the
call and the initial transport connection, I think that in many cases
the UAC opens a new connection for ACK and subsequent call-related
requests.

> Any suggestion on how this should be taken care of? Since what I am 
> observing is that whenever the call terminated without proper bye 
> message, the call will stay in message forever which cause a
memory/handle problem.

There is an extension called session timer ("timer") defined in RFC
4028. You can activate it with NUTAG_SESSION_EXPIRES(). When it is
activated, nua ensures that the call is alive by sending re-INVITE or
UPDATE request from time to time.

--
Pekka.Pessi mail at nokia.com

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Sofia-sip-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel

Reply via email to