Lync 2013 - consuming 180 ringing responses from a forked request

553 views Asked by At

Is it possible to configure Lync 2013 to only send a single 180/183 ringing back upstream after an INVITE to Lync triggers multiple INVITEs to Lync subscriber endpoints that each end up generating a 180/183 message.

In case of simultaneous ring, I want Lync to consume all these 180s to avoid unnecessary messaging back to the originator INVITE'ing Lync that is behind a SBC.

It seems to be acting as a forking proxy rather than b2bua.

2

There are 2 answers

0
w5l On

You're right by saying Lync forks calls. If a user has multiple endpoints, Lync will fork the call to each endpoint and in return each endpoint will return the ringing response.

You can create an MSPL script to catch 180 responses. Since MSPL is stateless, it would require a backing application (a ServerApplication) that checks if a 180 response is already sent for the current call, and block subsequent ringing responses. Based on the assumption that for all requests the CallID header will be identical, you can then decide which responses to send and which not.

A simple MSPL would be something like:

<lc:applicationManifest
 lc:appUri="http://www.contoso.com/DefaultRoutingScript"
 xmlns:lc="http://schemas.microsoft.com/lcs/2006/05">
<lc:responseFilter reasonCodes="1XX" />
<lc:proxyByDefault action="true" />
<lc:splScript><![CDATA[
    if (sipResponse && sipResponse.StatusCode == 180)
    {
        Dispatch("OnResponse");
    }
]]></lc:splScript>
</lc:applicationManifest>

Then in your server application you handle the OnResponse event, I imagine something like this:

public void OnResponse(object sender, ResponseReceivedEventArgs e)
{
    if (e.Response.StatusCode == 180)
    {
        var callIdHeader = e.Response.AllHeaders.FindFirst(Header.StandardHeaderType.CallID);
        if (callIdHeader != null)
        {
            var callId = callIdHeader.Value;
            if (ShouldSendRingingResponse(callId))
            {
                e.ClientTransaction.ServerTransaction.SendResponse(e.Response);
            }
        }
    }
}

public bool ShouldSendRingingResponse(string callId) { .... }

Then you can create some logic in the ShouldSendRingingResponse function to see whether to send the 180 response or not.

Note that I did not test this, it's just a basic outline of how I would attempt to handle the situation.

0
Luke B On

There isn't a way to prevent this in Lync; however, typically an AudioCodes SBC will be deployed too that contains an option to handle this scenario.

Multiple 18x: The device supports the interworking of different support for multiple18x responses (including 180 Ringing, 181 Call is Being Forwarded, 182 Call Queued,and 183 Session Progress) that are forwarded to the caller. The UA can be configured as supporting only receipt of the first 18x response (i.e., the device forwards only this response to the caller), or receipt of multiple 18x responses (default). This is configured by the IP Profile parameter, 'SBC Remote Multiple 18x Support