[reSIProcate] onConnected received and processed before 200OK sent
Hi,
I am seeing a problem where my app is receiving the onConnected callback and
starting to play voice to the UAC before the UAC receives a 200Ok and sends
an ACK. This happens under load where my app can process the onConnected
and stream media before resip can send a 200Ok.
In the following code from ServerInviteSession.hxx it looks like the
onConnected before was changed to not call this handler when an ACK is
received. What is the reasoning behind this? Should onConnected be called
once the ACK is received? Would another handler work here ("onAck")?
void
ServerInviteSession::dispatchAccepted(const SipMessage& msg)
{
InviteSessionHandler* handler = mDum.mInviteSessionHandler;
std::auto_ptr<SdpContents> sdp = InviteSession::getSdp(msg);
InfoLog (<< "dispatchAccepted: " << msg.brief());
switch (toEvent(msg, sdp.get()))
{
case OnAck:
{
mCurrentRetransmit200 = 0; // stop the 200 retransmit timer
transition(Connected);
// handler->onConnected(getSessionHandle(), msg); // not needed
since onConnected is called when 200 is sent
break;
}
Thanks,
-Justin