From 3c9b136af9cb76d1de8c3e00ae90c8125971ebdd Mon Sep 17 00:00:00 2001 From: Andreas Granig Date: Wed, 3 Apr 2013 11:02:02 +0000 Subject: [PATCH] Fix handling patterns which already start with "^sip:". Forgot a wildcard in the match. --- db_scripts/diff/13449.up | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/db_scripts/diff/13449.up b/db_scripts/diff/13449.up index 0b737283..f855882c 100644 --- a/db_scripts/diff/13449.up +++ b/db_scripts/diff/13449.up @@ -2,8 +2,8 @@ USE provisioning; SET AUTOCOMMIT=0; UPDATE voip_peer_rules SET callee_pattern = REPLACE(callee_pattern, '^', '^sip:') - WHERE callee_pattern LIKE '^%' AND callee_pattern NOT LIKE '^sip:'; + WHERE callee_pattern LIKE '^%' AND callee_pattern NOT LIKE '^sip:%'; UPDATE voip_peer_rules SET caller_pattern = REPLACE(caller_pattern, '^', '^sip:') - WHERE caller_pattern LIKE '^%' AND caller_pattern NOT LIKE '^sip:'; + WHERE caller_pattern LIKE '^%' AND caller_pattern NOT LIKE '^sip:%'; COMMIT;