recordingFilterLoad

The recordingFilterLoad method returns recording filter object with specified name.

 

Syntax (in C#)

RecordingFilter recordingFilterLoad(
    string section, 
    string name
);

 

 

Parameters

Name of parameterTypeDescription
sectionstring

Section, from where to load filter. It can be one of following values:

  • OnCallStart
  • OnCallStop
namestring

Unique name of filter inside that section.

Special name "default_" is used for a default filter.

 

 

Return Value

If the function succeds, the return value is the filter objec of type RecordingFilter.

If the function fails, then one of folloiwng SOAP Exceptions is thrown.

 

NotFoundExceptionInvalid section parameter or filter with such name doesn't exist
InvalidParameterExceptionName parameter is empty

 

 

Example (in C#)

try
{
    MiaRec::RecordingFilter filter = service.recordingFilterLoad("OnCallStart", "filter1-");

    Console.WriteLine("name:      " + filter.name);
    Console.WriteLine("filename:  " + filter.filename);
    Console.WriteLine("condition: " + filter.condition);
    Console.WriteLine("action:    " + filter.action);

     MiaRec::RecordingFilterCustomParameter[] parameters = filter.customParameters;
     if (parameters != null)
     {
         for (int j = 0; j < parameters.Length; j++)
         {
             Console.WriteLine(parameters[j].name + ": " + parameters[j].value);
         }
     }
}
catch (FaultException<MiaRec::InvalidParameterException> ex)
{
    Console.WriteLine("Failed: " + ex.Detail.Description);
}
catch (FaultException<MiaRec::NotFoundException> ex)
{
    Console.WriteLine("Failed: " + ex.Detail.Description);
}
catch (Exception ex)
{
    Console.WriteLine(ex.Message)
}

 

Sample output:

name:      filter1-
filename:  C:\Recordings\call.mp3
condition: caller-number = '123' OR callee-number = '123'
action:     record 
custom1: value1
custom2: value2

 

 

See Also