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

Re: [reSIProcate-users] ending a dialog / session and free all the resources.


Well, using AppDialogSet::end() in the case of link failure probably isn't going to do anything useful, since presumably you haven't gotten a provisional response yet (you're not allowed to send a CANCEL until a provisional comes in). When the stack sends a request, it sets a timer (for 64*T1, which is 32 seconds). If this timer fires, and no response has come in, it will simulate receiving a 408, and send it to DUM, causing the teardown of the dialog state.

If, on the other hand, a provisional response _has_ been received, this timer is ignored. It is up to the app to decide when it wants to give up on the call. If it calls AppDialogSet::end() in this case, a CANCEL will be sent. If the CANCEL times out, a 408 for the INVITE will be simulated, and the dialog state will be torn down.

Calling AppDialogSet::end() after the session is already established will cause Dialog::end() to be called on every dialog in the DialogSet; this will cause InviteSession::end() to be called. The difference between using AppDialogSet::end() and InviteSessionHandle::end() is that the former will end every invite session established by the INVITE request (recall that you can get multiple sessions due to forking), but the latter will end only a particular invite session. AppDialogSet::end() will _also_ end every other usage in the resulting dialogs; for example, if you sent an in-dialog SUBSCRIBE, calling AppDialogSet::end() will end the subscription too.

Does this clear up your questions?

Best regards,
Byron Campenj


The reSIProcate web site indicates:

 

  • To send a CANCEL to cancel for a UAC INVITE (for which a dialog creating response has NOT yet been recieved) and cancel all potential legs of the invite - use the InviteSessionHandle->getAppDialogSet()->end() call.
  • To send a BYE for one particular leg of an early UAC INVITE (for which a 200 response has NOT yet been recieved) - use the InviteSessionHandle->end() call.
WARNING - sending a BYE to an early dialog, does not cancel the original Invite Transaction 
        - if you are done with the invite entirely, then you MUST call AppDialogSet::end() 
          in order to properly dispose of the invite transaction state to avoid memory leaks
  • To send a BYE for an established Invite Session (for which a 200 response has been recieved) - use the InviteSessionHandle->end() call.

My questions are:

 

    1. In the case of a session for which NO response was received, (for example because receive link failure or a fire wall filtering), and for which a subsequent cancellation with pAppDialogSet()->end() was issued, is a 408 message still expected ? – and if yes – is there any way to terminate completely the resiprocate Dialog and release all the related resources ?
    2. What happens if one sends pAppDialogSet()->end() to a session for which a 200 OK / ACK completed ?

 

 

Thank you

Michael Socaciu

 

Mutualink Inc.

 

 

_______________________________________________
resiprocate-users mailing list