< Previous by Date Date Index Next by Date >
  Thread Index Next in Thread >

[reSIProcate-users] resip stack shutdown method


Hi,

Could anyone give me a pointer to the "correct" way to shutdown the resip stack, and more importantly, to know when it is shutdown? I'm running the stack within StackThread, and I'm not using dum for this app. I'm using the shutdown() and join() methods and that all works, but I'm looking for a cleaner overall shutdown that those seem to give.

The key functionality I'm looking for is to "wait" until all SIP response messages in the queue have been pushed onto the wire.

The specific questions I have are:

1. Should the TransactionUser be shutdown before or after SipStack?

2. How do I know when SipStack is shutdown? The shutdown() method comments says it sends a ShutdownMessage to the TU, but which TU? And how can I receive that if the TU is already shutdown?

3. How can I query to see if there are any queued outgoing messages within SipStack?

4. Is ShowdownMessage sent to TU after queued messages are sent, or are queued messages just deleted?

5. The ideal clean shutdown would be to tell stack to stop dealing with new stuff, wait for existing stuff to finish, and then let app know. Does this interface exist?

Any pointers, especially to demo code would be appreciated. I looked for but couldn't find any good examples in the test code, while repro seems to use a fixed wait, not event-driven.

Thanks,
Kennard