Negotiating declined offers
Applies to: Skype for Business 2015
This topic describes a scenario that can occur in offer/answer negotiation. The first scenario describes how an endpoint should handle an initial outgoing multipart/mime SDP offer that is declined by a remote endpoint. The second scenario describes how an endpoint should decline an incoming SDP offer that it cannot accept and how it should handle an outgoing SDP offer that is declined by the remote endpoint.
Handling an initial multipart/mime offer that is declined
When an initial outgoing INVITE message contains multipart/mime content with the SDP offer, and the remote endpoint declines the offer with response code 415 (the UnsupportedMedia value in the OfferAnswerFailureReason enumeration), the Call instance can automatically retry SDP negotiation using either of the following means:
If the original offer consists of only one offer or the remote endpoint supports multipart/alternate, the Call instance can exclude the custom optional mime parts (in the CustomMimeParts property specified in a CallEstablishOptions instance) and can retry the INVITE with the same offer.
If the original SDP offer given by the MediaProvider subclass instance contains more than one SDP and the remote endpoint does not support multipart/alternate, the Call class should call the SetAnswer(OfferAnswerContext, SdpOffer, SdpAnswer) method on the MediaProvider subclass instance with an answer status (the Status property on the SdpAnswer instance) of UnsupportedMediaCanRetry, a value in the SdpAnswerStatus enumeration.
The Call class should then call BeginGetOffer to request another offer from the MediaProvider instance.
Declining an incoming SDP offer and handling a declined offer
When the MediaProvider subclass instance is unable to accept the offer given by the remote endpoint, it should throw an OfferAnswerException exception in its implementation of the EndGetAnswer(IAsyncResult) method, with the specific reason set in the FailureReason property.
Similarly, if the remote endpoint declines the offer, the SetAnswer method will be called with a null SDP answer. The Status property on the SdpAnswer instance should contain the failure reason based on the response code.