title: SIP/2.0 481 Call Leg/Transaction Does Not Exit (UCMA)
body: <p>I create the mspl to transfer reroute the calls to ucma application endpoint</p>
  
  <p>Below is my code for MSPL</p>
  
  <pre><code>&lt;?xml version="1.0" ?&gt;
  &lt;lc:applicationManifest
  appUri="http://"Domain NAme"/AltRGS"
  xmlns:lc="http://schemas.microsoft.com/lcs/2006/05"&gt;
  &lt;lc:allowRegistrationBeforeUserServices action="true" /&gt;
  &lt;lc:requestFilter methodNames="INVITE"
  strictRoute="false"
  registrarGenerated="true"
  domainSupported="true" /&gt;
  &lt;lc:responseFilter reasonCodes="NONE" /&gt;
  &lt;lc:proxyByDefault action="true" /&gt;
  &lt;lc:scriptOnly /&gt;
  &lt;lc:splScript&gt;&lt;![CDATA[
  
  
    fromUri = GetUri( sipRequest.From );
    fromUser = Concatenate( GetUserName( fromUri ) );
    toUri = GetUri( sipRequest.To );
    toUserAtHost = Concatenate( GetUserName( toUri ), "@", GetHostName( toUri ) );
  
     foreach ( sessionExpires in GetHeaderValues( "Session-Expires" ) ) {
         if ( ContainsString( sessionExpires, "refresher", true ) ) {
             Log( "Debug", false, "RespondWithRinging: * skipped; This is a session refreshing invite" );
             return;
         }
     }
  
     foreach ( userAgent in GetHeaderValues( "USER-AGENT" ) ) {
         if ( ! ContainsString( userAgent, "mediation", true ) ) {
             Log( "Debug", false, "RespondWithRinging: * skipped; not a mediation server request" );
             return;
         }
     }
  
     if (sipRequest &amp;&amp; sipRequest.Method == "INVITE")
  
  {
       ProxyRequest("sip:lync1.sti.ksac.com@ksac.com;gruu;opaque=srvr:app1:nKftzU4ORVGCO9Nqq3-m3QAA");
   }
   else {
      // Forward the call to the UCMA app.
      Log("Debugr", 1, "Forwarded caller to UCMA app: ", sipRequest.From);
      Respond("302", "Moved Temporarily", "Contact=");
    }
  
  ]]&gt;
  
  &lt;/lc:splScript&gt;
  
  &lt;/lc:applicationManifest&gt;
  </code></pre>
  
  <p>I register my MSPl By Using power shell
  New-Csserver application</p>
  
  <p>and my c# code is</p>
  
  <pre><code>private void Run()
      {
          try
          {
              _helper = new UCMASampleHelper();
  
            _appEndpoint = _helper.CreateAutoProvisionedApplicationEndpoint();
              _appEndpoint.RegisterForIncomingCall&lt;AudioVideoCall&gt;(AudioVideoCall_Received);
  
   void AudioVideoCall_Received(object sender, CallReceivedEventArgs&lt;AudioVideoCall&gt; e)
      {
          try
          {
              string _originalRecipientUri = e.RequestData.To Header.Uri;
  
  
  
   _inboundAVCall.StateChanged += new EventHandler&lt;CallStateChangedEventArgs&gt;_inboundAVCall_StateChanged);
   _inboundAVCall.AudioVideoFlowConfigurationRequested += new EventHandler&lt;AudioVideoFlowConfigurationRequestedEventArgs&gt;(_inboundAVCall_AudioVideoFlowConfigurationRequested);
  
              Console.WriteLine("Call Received!");
  
   _inboundAVCall.BeginAccept(BeginAcceptCB, _inboundAVCall);
  </code></pre>
  
  <p>}}</p>
  
  <p>When i get the call MSPL route the call to the UCMA application and transfer to the agents but when agent accepts the call it is not establishing and i am getting the following error find in ocs logger`</p>
  
  <p>SIP/2.0 481 Call Leg/Transaction Does Not Exit</p>
  
  <p>Can Any one please help me</p>
  
  <p>Thanks. </p>