diff --git a/app/calls/resources/classes/follow_me.php b/app/calls/resources/classes/follow_me.php index 07a3e90e53..ade5f9c96f 100644 --- a/app/calls/resources/classes/follow_me.php +++ b/app/calls/resources/classes/follow_me.php @@ -372,6 +372,14 @@ include "root.php"; $this->dial_string = ''; } + $sql = "update v_follow_me set "; + $sql .= "dial_string = '".$this->dial_string."', "; + $sql .= "where domain_uuid = '".$this->domain_uuid."' "; + $sql .= "and follow_me_uuid = '".$this->follow_me_uuid."' "; + if ($this->debug) { + echo $sql."
"; + } + $sql = "update v_extensions set "; $sql .= "dial_string = '".$this->dial_string."', "; $sql .= "dial_domain = '".$_SESSION['domain_name']."' "; diff --git a/app/follow_me/app_config.php b/app/follow_me/app_config.php index 64436cd0a9..bbbc5ee16c 100644 --- a/app/follow_me/app_config.php +++ b/app/follow_me/app_config.php @@ -117,6 +117,10 @@ $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; $apps[$x]['db'][$y]['fields'][$z]['description']['en'] = ""; $z++; + $apps[$x]['db'][$y]['fields'][$z]['name'] = "dial_string"; + $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; + $apps[$x]['db'][$y]['fields'][$z]['description']['en'] = ""; + $z++; $apps[$x]['db'][$y]['fields'][$z]['name'] = "follow_me_enabled"; $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; $apps[$x]['db'][$y]['fields'][$z]['description']['en'] = ""; diff --git a/resources/install/scripts/follow_me.lua b/resources/install/scripts/follow_me.lua index 64cbdee117..7567dae97c 100644 --- a/resources/install/scripts/follow_me.lua +++ b/resources/install/scripts/follow_me.lua @@ -184,10 +184,10 @@ sql = "update v_extensions set "; if (enabled == "true") then sql = sql .. "dial_string = '"..dial_string.."', "; - sql = sql .. "do_not_disturb = 'false', "; else sql = sql .. "dial_string = null, "; end + sql = sql .. "do_not_disturb = 'false', "; sql = sql .. "forward_all_enabled= 'false' "; sql = sql .. "where domain_uuid = '"..domain_uuid.."' "; sql = sql .. "and extension_uuid = '"..extension_uuid.."' ";