From d875cb085d7f87d5d0b49ea5f23b081959f4a131 Mon Sep 17 00:00:00 2001 From: Mark Crane Date: Thu, 20 Sep 2012 07:58:27 +0000 Subject: [PATCH] Add answer before calling voicemail for hunt groups. --- includes/lib_switch.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/includes/lib_switch.php b/includes/lib_switch.php index c2914a7b9a..f3e067d725 100644 --- a/includes/lib_switch.php +++ b/includes/lib_switch.php @@ -2672,6 +2672,7 @@ function save_hunt_group_xml() { if ($ent['destination_type'] == "voicemail") { $tmp_sub_array["application"] = "voicemail"; $tmp_sub_array["type"] = "voicemail"; + $tmp .= " session:answer();\n"; $tmp .= " session:execute(\"voicemail\", \"default \${domain_name} ".$ent['destination_data']."\");\n"; //$tmp_sub_array["application"] = "voicemail"; //$tmp_sub_array["data"] = "default \${domain_name} ".$ent['destination_data']; @@ -2811,6 +2812,9 @@ function save_hunt_group_xml() { $tmp .= " originate_disposition = session:getVariable(\"originate_disposition\");\n"; $tmp .= " if originate_disposition ~= \"SUCCESS\" then\n"; } + if ($row['hunt_group_timeout_type'] == "voicemail") { + $tmp .= " session:answer();\n"; + } $tmp .= " session:execute(\"".$hunt_group_timeout_type."\", \"".$hunt_group_timeout_destination."\");\n"; if ($row['hunt_group_type'] != 'dnd') { $tmp .= " end\n";