Home > Lync > Cisco Gateway Integration with OCS (180 Ringing Issue)

Cisco Gateway Integration with OCS (180 Ringing Issue)

OCS 2007 R2 utilizes 183 SDP instead of 180 Ringing and therefore causes certain gateways including the Cisco 2800 (2811, 2821, 2851) ISRs to fail if running 12.4(22T) or before. I have not seen an update to OCS or the Cisco code to fix this yet so I am posting this again for reference on this site.

The following file should be saved as RespondWithRinging.am and placed in a location on your FE server. Replace the lcappUri with a more appropriate domain name. This then can be added to the Front End Scripts on each front end server as shown in the image below.


<?xml version=”1.0″?>
<lc:applicationManifest
lc:appUri=”http://www.contoso.com/RespondWithRinging
xmlns:lc=”http://schemas.microsoft.com/lcs/2006/05“>
<lc:requestFilter methodNames=”INVITE”
strictRoute=”false”
registrarGenerated=”true”
domainSupported=”true” />
<lc:responseFilter reasonCodes=”NONE” />
<lc:proxyByDefault action=”true” />
<lc:scriptOnly />
<lc:splScript><![CDATA[

// This script will respond to incoming INVITEs from
// the mediation server.

// Build the user@host from the To: header.
toUri = GetUri( sipRequest.To );
toUserAtHost = Concatenate( GetUserName( toUri ), “@”, GetHostName( toUri ) );

Log( “Debug”, false, “RespondWithRinging: we have a request: “, sipRequest.Method, ” “, toUserAtHost );

// Check if this is a re-INVITE and exit if so
foreach ( sessionExpires in GetHeaderValues( “Session-Expires” ) ) {
if ( ContainsString( sessionExpires, “refresher”, true ) ) {
Log( “Debug”, false, “RespondWithRinging: * skipped; This looks like a session refreshing re-invite” );
return;
}
}

// Check to make sure that the INVITE is from a mediation server
foreach ( userAgent in GetHeaderValues( “USER-AGENT” ) ) {
if ( ! ContainsString( userAgent, “mediation”, true ) ) {
Log( “Debug”, false, “RespondWithRinging: * skipped; not a mediation server request” );
return;
}
}

// If we’re here, send a 180 response
// Headers are being added in case it’s important to detect this generated 180 response in a log
Log( “Debug”, 1, “RespondWithRinging: * Ringing response being submitted” );
AddHeader( “FAKED-180”, “true” );
Respond( 180, “Ringing”, “FAKED-180=true” );
return;

]]></lc:splScript>
</lc:applicationManifest>

Advertisements
Categories: Lync
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: