Subject: [MEDIACTRL] Race condition between msc-ivr dialogstart and SIP ACK

From: Stéphane Bastien <[email-masked]>
Date: Mon, 7 Jun 2010 04:29:11 -0700

Hi,

In a scenario where we establish a media session using SIP INVITE without an SDP, we are facing a race condition with the msc-ivr dialogstart command. The scenario is described below:

1.       A control channel is already established between an Application Server and a Media Server

2.       Application Server sends SIP INVITE without an SDP to Media Server to establish the media session

3.       Media Server responds with a SIP 200 OK with an offer SDP

4.       Application Server transmits offer SDP to remote endpoint; gets an answer SDP in return

5.       Application Server sends a SIP ACK with the answer SDP to the Media Server

6.       Application Server transmits over the control channel an msc-ivr <dialogstart> with a connectionid of the media session established in step 5

The problem is what happens if the SIP ACK transmitted in step 5 gets lost in the network? One of the retransmissions of the SIP ACK may eventually reach the Media Server, but will be received later than the dialogstart from step 6. Yet, the Media Server can't execute the dialogstart until the SIP ACK is received, otherwise the user gets media clipping.

I'm currently thinking of handling  this scenario by waiting for a few seconds in step 6 if the SIP ACK is missing, and execute <dialogstart> as soon as the SIP ACK arrives. If the SIP ACK does not arrive, the MS returns the msc-ivr status code 412 "Media stream not available". (Could we create an error code for this specific scenario to make it easier to detect by the AS?) An alternate approach would be for the AS to subscribe to the state of a connectionid, and the Media Server would send a "Media Stream Established" notification when receiving the SIP ACK in step 5.

Has anyone else encountered this problem? What was your solution?

Stéphane

---

From: Stéphane Bastien <[email-masked]>
Date: Wed, 23 Jun 2010 08:59:44 -0700

Hi,

Since I did not get any reply, I suggest that we create a new response status code 414 "SIP media dialog not confirmed" that is returned when a dialogstart is received but the Media Server is missing the SIP ACK for the associated connectionid. The application server can then wait a little and retry sending the dialogstart, hoping that SIP retransmissions will have finally delivered the SIP ACK to the Media Server.

Stéphane

From: [email-masked] [mailto:[email-masked]] On Behalf Of Stéphane Bastien
Sent: 7 juin 2010 07:29
To: [email-masked]
Subject: [MEDIACTRL] Race condition between msc-ivr dialogstart and SIP ACK

Hi,

Stéphane