Cisco Unified Application Environment Developer Forums

« Back to Etch

RE: Recording a call

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Hi,
 
I'm trying to get the CUAE to record a call (using c#). I can get the call recording sucessfully but it doesn't stop until i terminate the call. Does anyone know how i can get the CUEA to record for 10 seconds or stop recording on demand?
 
  Here's my demo code
 
RecordOptions opt = new RecordOptions();
                    opt.SetTimeout( 5 );
                    opt.SetConnectionId( results.connectionId );
                    opt.SetAudioFileFormat(AudioFileFormat.WAV);
                   


                    RecordResult r = server.record( sessionId, @"C:\mycall.wav", 5,  opt);
 
 
Many thanks
 
Jon

RE: Recording a call
Answer
7/15/09 9:28 AM as a reply to Jonathan Withers.
Hi Jon,
 
I think you need to use SetTermCondMaxTime rather than SetTimeout.
 
SetTermCondMaxTime sets the amont of time (in milliseconds) that can elapse before terminating the recording operation. If this condition is met, the record command will result in the record_complete event with a termination condition of maxtime.
 
SetTimeout sets the time out property specifies to the Application Runtime Environment how long to wait for  response from the current action.
 
Thanks
Nabhonil.

RE: Recording a call
Answer
7/15/09 12:21 PM as a reply to Nabhonil Sinha.
Hi Nabhonil,
 
That's brilliant and solved my problem.
 
Thank you very much
 
Jon