recordingFilterValidate

The recordingFilterValidate method checks if recording filter's options are valid (for example, if condition expression has valid syntax).

 

Syntax (in C#)

bool recordingFilterSave(
    RecordingFilter filter
);

 

 

Parameters

Name of parameterTypeDescription
filterRecordingFilterRecording filter object, which will be validated

 

 

Return Value

If the function succeds, the return boolean TRUE value.

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

 

InvalidSyntaxException
Syntax of condition is not valid
InvalidParameterExceptionOne of filter options is invalid. For example, name is empty or contains invalid character.

 

 

Example (in C#)

try
{
    MiaRec::RecordingFilter filter = new MiaRec::RecordingFilter();

    filter.name = "filter2-";
    filter.priority = 0;
    filter.condition = "caller-number LIKE '200%' OR callee-number LIKE '200%'";
    filter.action = "record";

    filter.customParameters = new MiaRec::RecordingFilterCustomParameter[2];
    filter.customParameters[0].name =  "company-name";
    filter.customParameters[0].value = "Google";
    filter.customParameters[1].name =  "person-name";
    filter.customParameters[1].value = "John Smith";
    
    service.recordingFilterValidate(filter);
}
catch (FaultException<MiaRec::InvalidParameterException> ex)
{
    Console.WriteLine("Failed: " + ex.Detail.Description);
}
catch (FaultException<MiaRec::InvalidSyntaxException> ex)
{
    Console.WriteLine("Failed: " + ex.Detail.Description);
}
catch (Exception ex)
{
    Console.WriteLine(ex.Message)
}

 

 

See Also