[Freeswitch-users] how-to catch errors in session streamFile

Kris kris at livecall.com
Sat Jul 9 03:16:43 MSD 2011


You can experiment with 
Convert.ToInt32(Session.GetVariable("playback_samples"));

string PlayedMilliseconds = Session.GetVariable("playback_ms");

It might give an indication if any of the file was played. 

----- Original Message ----- 
From: "Jason Moran" <jmoran at secureachsystems.com>
To: <freeswitch-users at lists.freeswitch.org>
Sent: Friday, July 08, 2011 8:35 AM
Subject: [Freeswitch-users] how-to catch errors in session streamFile


Once in a while I pass a bad file name or some other bad thing happens
with session.streamFile. If I have the console up I can see an error
such as 

[ERR] mod_sndfile.c:194 Error Opening File [the_file_path_and_name]
[System error : No such file or directory.]

 

However, session.streamFile returns false whether it gets an error or
successfully plays the file. Is there any other way to capture success
or capture that an error happened?

 

-Jason Moran





More information about the FreeSWITCH-users mailing list