From 63a742d741fb5f28bf42636953b65cc85bbad1ea Mon Sep 17 00:00:00 2001 From: azammitdcarf Date: Thu, 19 Feb 2009 03:43:51 +0000 Subject: [PATCH] will only display record if on a call --- record.php | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/record.php b/record.php index 11addbca..9b88cc4e 100644 --- a/record.php +++ b/record.php @@ -57,11 +57,16 @@ if (is_on_call($operator_id) == 3) if (VOIP_ENABLED) { $call_id = get_call($operator_id); - include("functions/functions.voip.php"); - $v = new voip(); - $v->connect(VOIP_SERVER); - $v->beginRecord(get_extension($operator_id),"$case_id-$call_id-$operator_id-" . get_operator_time($operator_id,$format = "%Y-%m-%d-%H-%i-%S")); - print "

" . T_("Beginning recording...") . "

"; + if ($call_id) + { + include("functions/functions.voip.php"); + $v = new voip(); + $v->connect(VOIP_SERVER); + $v->beginRecord(get_extension($operator_id),"$case_id-$call_id-$operator_id-" . get_operator_time($operator_id,$format = "%Y-%m-%d-%H-%i-%S")); + print "

" . T_("Beginning recording...") . "

"; + } + else + print "

" . T_("Not on a call, so not beginning a recording") . "

"; } else {