private void RecordCall()
{
String full_path = broker.recordings_folder.Replace('/', '\\');
if (! full_path.Contains(":\\"))
full_path = Path.Combine(Directory.GetCurrentDirectory(),full_path); //freeswitch is not happy with relative paths when using quotes
full_path = Path.Combine(full_path,"rec_" + other_party_number + "_" + DateTime.Now.ToString("yyyy-MM-dd_HH-mm-ss"));
int num =1;
String orig_full_path = full_path;
while (File.Exists(full_path + ".wav"))
full_path = orig_full_path + "." + num++;
full_path = full_path.Replace('\\', '/'); //seems freeswitch will selectively escape what it cant otherwise
am_recording_file = full_path + ".wav";
Utils.bgapi_exec("uuid_setvar", leg_b_uuid + " record_stereo true");
Utils.bgapi_exec("uuid_record", leg_b_uuid + " start '" + am_recording_file +"'");
}