public void CallFailed(SIPResponseStatusCodesEnum failureStatus, string reasonPhrase, string[] customHeaders)
 {
     try
     {
         if (m_sipServerUserAgent != null && !m_isAnswered)
         {
             Log_External(new SIPMonitorConsoleEvent(SIPMonitorServerTypesEnum.AppServer, SIPMonitorEventTypesEnum.DialPlan, "Call failed with a failure status of " + failureStatus + " and " + reasonPhrase + ".", Owner));
             m_isAnswered = true;
             if ((int)failureStatus >= 300 && (int)failureStatus <= 399)
             {
                 SIPURI redirectURI = SIPURI.ParseSIPURIRelaxed(customHeaders[0]);
                 m_sipServerUserAgent.Redirect(failureStatus, redirectURI);
             }
             else
             {
                 m_sipServerUserAgent.Reject(failureStatus, reasonPhrase, customHeaders);
             }
         }
     }
     catch (Exception excp)
     {
         logger.Error("Exception DialPlanContext CallFailed. " + excp.Message);
     }
     finally
     {
         DialPlanExecutionFinished();
     }
 }
 public void CallFailed(SIPResponseStatusCodesEnum failureStatus, string reasonPhrase, string[] customHeaders)
 {
     try
     {
         if (!m_isAnswered)
         {
             m_isAnswered = true;
             if ((int)failureStatus >= 300 && (int)failureStatus <= 399)
             {
                 SIPURI redirectURI = SIPURI.ParseSIPURIRelaxed(customHeaders[0]);
                 m_sipServerUserAgent.Redirect(failureStatus, redirectURI);
             }
             else
             {
                 m_sipServerUserAgent.Reject(failureStatus, reasonPhrase, customHeaders);
             }
         }
     }
     catch (Exception excp)
     {
         logger.Error("Exception DialPlanContext CallFailed. " + excp.Message);
     }
     finally
     {
         DialPlanExecutionFinished();
     }
 }