recordingFilterLoadAll

The recordingFilterLoadAll method returns all filters from specified section.

 

Syntax (in C#)

RecordingFilter[] recordingFilterLoadAll(
    string section
);

 

 

Parameters

Name of parameterTypeDescription
sectionstring

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

  • OnCallStart
  • OnCallStop

 

 

Return Value

If the function succeds, the return value is an array of RecordingFilter objects.

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

 

NotFoundExceptionInvalid section parameter

 

 

Example (in C#)

try
{
    MiaRec::RecordingFilter[] filters = service.recordingFilterLoadAll("OnCallStart");

    for (int i = 0; i < filters.Length; i++)
    {
       MiaRec::RecordingFilter filter = filters[i];

       Console.WriteLine("Filter #" + i + ":");
       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::NotFoundException> ex)
{
    Console.WriteLine("Failed: " + ex.Detail.Description);
}
catch (Exception ex)
{
    Console.WriteLine(ex.Message)
}

 

Sample output:

Filter #0:
    name:      filter1-
    filename:  
    condition: caller-number = '123' OR callee-number = '123'
    action:    record
Filter #2:
    name:      filter2-
    filename:  
    condition: caller-number = '555' OR callee-number = '555'
    action:    record
Filter #3:
    name:      default_
    filename:  
    condition: 
    action:    ignore

 

 

See Also