From b489074e0c14b5b1f80ed69c6d8ec2648cbd8481 Mon Sep 17 00:00:00 2001 From: markjcrane Date: Wed, 10 Feb 2016 21:44:03 -0700 Subject: [PATCH] Fax add a way to change the inbound fax file name. --- app/fax/resources/classes/fax.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/fax/resources/classes/fax.php b/app/fax/resources/classes/fax.php index 0100aeaeaa..534e48fc1d 100644 --- a/app/fax/resources/classes/fax.php +++ b/app/fax/resources/classes/fax.php @@ -160,7 +160,12 @@ $dialplan["dialplan_details"][$y]["domain_uuid"] = $this->domain_uuid; $dialplan["dialplan_details"][$y]["dialplan_detail_tag"] = "action"; $dialplan["dialplan_details"][$y]["dialplan_detail_type"] = "set"; - $dialplan["dialplan_details"][$y]["dialplan_detail_data"] = "last_fax=\${caller_id_number}-\${strftime(%Y-%m-%d-%H-%M-%S)}"; + if (strlen($_SESSION['fax']['last_fax']['text']) > 0) { + $dialplan["dialplan_details"][$y]["dialplan_detail_data"] = "last_fax=".$_SESSION['fax']['last_fax']['text']; + } + else { + $dialplan["dialplan_details"][$y]["dialplan_detail_data"] = "last_fax=\${caller_id_number}-\${strftime(%Y-%m-%d-%H-%M-%S)}"; + } $dialplan["dialplan_details"][$y]["dialplan_detail_group"] = "1"; $dialplan["dialplan_details"][$y]["dialplan_detail_order"] = $y * 10; $y++;