From d0b8ee198a9be0cecdf22b0e2c6cc47cda2d2108 Mon Sep 17 00:00:00 2001 From: Stefano Fancello Date: Mon, 20 May 2024 10:12:28 +0200 Subject: [PATCH] fix extension migration queries --- freepbx/initdb.d/migration.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/freepbx/initdb.d/migration.php b/freepbx/initdb.d/migration.php index 230671d0b..71c992ff4 100644 --- a/freepbx/initdb.d/migration.php +++ b/freepbx/initdb.d/migration.php @@ -47,22 +47,22 @@ $db->commit(); # set rtp_symmetric to no in freepbx sip table - $sql = "UPDATE `asterisk`.`sip` SET `data` = 'no' WHERE `keyword` = 'rtp_symmetric' WHERE `id` IN ($qm_string)"; + $sql = "UPDATE `asterisk`.`sip` SET `data` = 'no' WHERE `keyword` = 'rtp_symmetric' AND `id` IN ($qm_string)"; $stmt = $db->prepare($sql); $stmt->execute(array_column($res, 'extension')); # set rewrite_contact to no in freepbx sip table - $sql = "UPDATE `asterisk`.`sip` SET `data` = 'no' WHERE `keyword` = 'rewrite_contact' WHERE `id` IN ($qm_string)"; + $sql = "UPDATE `asterisk`.`sip` SET `data` = 'no' WHERE `keyword` = 'rewrite_contact' AND `id` IN ($qm_string)"; $stmt = $db->prepare($sql); $stmt->execute(array_column($res, 'extension')); # set force_rport to no in freepbx sip table - $sql = "UPDATE `asterisk`.`sip` SET `data` = 'no' WHERE `keyword` = 'force_rport' WHERE `id` IN ($qm_string)"; + $sql = "UPDATE `asterisk`.`sip` SET `data` = 'no' WHERE `keyword` = 'force_rport' AND `id` IN ($qm_string)"; $stmt = $db->prepare($sql); $stmt->execute(array_column($res, 'extension')); # set transport to udp in freepbx sip table - $sql = "UPDATE `asterisk`.`sip` SET `data` = '0.0.0.0-udp' WHERE `keyword` = 'transport' WHERE `id` IN ($qm_string)"; + $sql = "UPDATE `asterisk`.`sip` SET `data` = '0.0.0.0-udp' WHERE `keyword` = 'transport' AND `id` IN ($qm_string)"; $stmt = $db->prepare($sql); $stmt->execute(array_column($res, 'extension')); }