Hi,
I just want to raise the issue that we asked you earlier back in July 31
(see below).
You said that if we shutdown the sofia stack, and if there are outstanding
sip sessions (for example 4 active sessions), we do not need to nua_bye()
or even nua_handle_destroy() before invoking nua_shutdown().
according to your reply, the nua stack is guaranteed to terminate
outstanding nua operations, and then publish nua_i_terminate as the final
event with a operation handle, so that we can destroy that handle.
that never happened.
our logs below an IP address change, where we had to recycle the Sofia sip
stack:
our link status monitor reports an IP address change, so we proceed to
recycle our Sofia stack:
-NTC-[20021020:112634.600]| 104||cc ||sip.fe
|DevCoordStatusChange: SIP: NETWORK UP
-NTC-[20021020:112634.600]| 104||cc ||sip.fe
|DevCoordStatusChange: Network Link Recycled ==> possible new IP address
change
-NTC-[20021020:112634.600]| 104||cc ||sip.fe
|DevCoordStatusChange: IP address changed from 192.168.0.52 to
192.168.0.77.
-NTC-[20021020:112634.610]| 104||cc ||sip.fe
|DevCoordStatusChange: Need to recycle Sophia Stack ===> shutting down the
Sophia SIP stack...
IsSofiaStackShuttingDown = TRUE;
VT_NOTICE("Shutting down the Sofia SIP Stack...");
nua_shutdown(PortPtr->sofiaStackPtr);
===> now i expect Sofia stack to terminate the nua operation for each
outstanding sip session with nua_i_terminated before receiving
nua_r_shutdown
completion status , but we don't get it hence we don't destroy the nua
handle.
DBG [20021020:112635.680]| 168||SIP Event Handler||sip.fe
|EventCallback: Received an event = ['nua_r_shutdown'] status = [100
,'Shutdown started'] on port [5060]. Handle = [(nil)], HMagic = (nil).
-NTC-[20021020:112635.680]| 168||SIP Event Handler||sip.fe
|EventCallback: Sophia SIP stack shutdown started successfully.
DBG [20021020:112635.810]| 168||SIP Event Handler||sip.fe
|EventCallback: Received an event = ['nua_r_shutdown'] status = [200
,'Shutdown successful'] on port [5060]. Handle = [(nil)], HMagic = (nil).
-NTC-[20021020:112635.810]| 168||SIP Event Handler||sip.fe
|EventCallback: Sophia SIP stack shutdown completed successfully.
-NTC-[20021020:112635.820]| 168||SIP Event Handler||sip.fe
|EventCallback: ---> StartSipStack()
nta_agent: received garbage from udp/192.168.0.77:5060/sip
nta_agent: received garbage from udp/127.0.0.1:5060/sip
-NTC-[20021020:112635.850]| 168||SIP Event Handler||sip.fe
|EventCallback: <--- StartSipStack()
DBG [20021020:112635.850]| 168||SIP Event Handler||sip.fe
|EventCallback: Received an event = ['nua_r_set_params'] status = [200
,'OK'] on port [5060]. Handle = [(nil)], HMagic = (nil).
DBG [20021020:112635.850]| 168||SIP Event Handler||sip.fe
|EventCallback: Discarding event nua_r_set_params. Handler not
implemented.
because we don't recieve the nau_i_terminate, we have a *stale* handle on
our side, where we did not destroy it, but our client-side binding Session
context object is already deleted.
would that be a bug? is the Sofia stack suppose to behave as described
above??
thanks,
Robert Han, Senior Software Engineer
VTech Technologies Canada, Ltd.
----- Forwarded by Robert Han/ENG/VTNCAN/VTECH on 10/01/2009 02:01 PM
-----
Jen Chitty
07/31/2009 12:01 PM
To: Robert Han/ENG/VTNCAN/vt...@vtech
cc:
Subject: Fw: [Sofia-sip-devel] Changing IP address.
----- Forwarded by Jen Chitty/ENG/VTNCAN/VTECH on 07/31/2009 11:57 AM
-----
Michael Jerris <m...@jerris.com>
07/31/2009 11:47 AM
To: Jen Chitty <jenchi...@vtech.ca>
cc: sofia-sip-devel <sofia-sip-devel@lists.sourceforge.net>
Subject: Re: [Sofia-sip-devel] Changing IP address.
On Jul 31, 2009, at 2:23 PM, Jen Chitty wrote:
Hi,
I'm wondering if there's a way to change the IPv4 address that the Sofia
stack binds to without having to shutdown and restart the stack. We're
using the NUA.
Nope, but would be nice.
Right now, if our device's IPv4 address changes we shutdown the Sofia
stack and start it up again. This seems to mostly work, but we are
experiencing some race conditions with callbacks from the Sofia event loop
thread (running su_root_run) and our application thread, especially with
respect to handle destruction. We were hoping that we could just leave
the Sofia stack running and tell it to change its IPv4 address.
Another question that I'd like an answer to is this: When shutting down
the Sofia stack, are we guaranteed to receive a nua_i_terminated event for
every session that hasn't yet been terminated?
That is the intention, if your not, its a bug.
Thanks very much.
--JT
J. T. Chitty, Chief Software Engineer
VTech Technologies Canada, Ltd.
------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel