[reSIProcate] ClientInviteSession::end() questions
Developers,
I have a question around the implementation of
ClientInviteSession::end() and usage in a couple of circumstances. I
think I've run into a by-design choice and possibly a bug.
Log not attached at this time - there are a lot of my application log
messages interleaved with resip.
Given a Invite that is sent to a phone.
The phone acknowledges with a 183 and starts ringing.
onNewSession fires
- based on information in the message I decide I do not want this
dialog - end()
- nothing happens - no messages.
onProvisional/onEarlyMedia callbacks fire.
Now if you pickup the phone you get a 200 Ack followed by DUM issueing a
BYE.
The goal was to get the phone to stop ringing with a BYE/CANCEL right then.
The dialog state is Early - ClientInviteSession::end() explicitly
decides there is only 1 dialog active and passes it to DialogSet::end()
which is what is doing "nothing" to the active dialog.
(bug?) It looks like it may be treating it is "Initial" since
onProvisional hasn't fired yet and deferring handling (WaitingToEnd)
until the ACK shows up instead of ReceivedProvisional and cancelling the
dialog immediately.
Question: It appears that the presumption is that if a DialogSet only
has 1 dialog active then the DialogSet should be destroyed when the
dialog is destroyed. This presumtion is correct on a
ServerInviteSession but I'm not sure that it holds on a
ClientInviteSession - there may be other answers coming (forked) after
the first one and I just don't want the first one. The code *supports*
cancelling 2..n in ClientInviteSession::end() but special-cases 1. Is
this "RFC Standard", "Design Choice" or "Just the way it is"? Am I
missing something?
Thanks,
Jay