From 8bfcb848e4a87151186eb50332b9f2bcd90a4985 Mon Sep 17 00:00:00 2001 From: Andreas Granig Date: Thu, 10 Mar 2016 11:05:52 +0100 Subject: [PATCH] MT#16777 Add lnp peer pref and lnp prefix cdr col We need an option to force outbound calls to peer when call comes from peer in case the called party is not local but has an LNP entry. Also, we need to store lnp prefixes in CDR. Change-Id: I61b3886d545b27d46f0affe8457620601b5be61a --- db_scripts/diff/15223.down | 4 ++++ db_scripts/diff/15223.up | 13 +++++++++++++ db_scripts/diff/15224.down | 5 +++++ db_scripts/diff/15224.up | 5 +++++ 4 files changed, 27 insertions(+) create mode 100644 db_scripts/diff/15223.down create mode 100644 db_scripts/diff/15223.up create mode 100644 db_scripts/diff/15224.down create mode 100644 db_scripts/diff/15224.up diff --git a/db_scripts/diff/15223.down b/db_scripts/diff/15223.down new file mode 100644 index 00000000..314893b6 --- /dev/null +++ b/db_scripts/diff/15223.down @@ -0,0 +1,4 @@ +USE PROVISIONING; + +DELETE FROM voip_preferences_enum + WHERE value = 'force_nonlocal_lnp'; diff --git a/db_scripts/diff/15223.up b/db_scripts/diff/15223.up new file mode 100644 index 00000000..361f58c6 --- /dev/null +++ b/db_scripts/diff/15223.up @@ -0,0 +1,13 @@ +SET AUTOCOMMIT=0; + +USE provisioning; + +SELECT id INTO @vpid FROM voip_preferences + WHERE attribute = 'force_outbound_calls_to_peer'; +INSERT INTO voip_preferences_enum VALUES ( + NULL, @vpid, 'If callee is not local and is ported', + 'force_nonlocal_lnp', + 0, 0, 0, 1, NULL, 0 +); + +COMMIT; diff --git a/db_scripts/diff/15224.down b/db_scripts/diff/15224.down new file mode 100644 index 00000000..71270442 --- /dev/null +++ b/db_scripts/diff/15224.down @@ -0,0 +1,5 @@ +USE accounting; + +ALTER TABLE cdr + DROP COLUMN source_lnp_prefix, + DROP COLUMN destination_lnp_prefix; diff --git a/db_scripts/diff/15224.up b/db_scripts/diff/15224.up new file mode 100644 index 00000000..14150157 --- /dev/null +++ b/db_scripts/diff/15224.up @@ -0,0 +1,5 @@ +USE accounting; + +ALTER TABLE cdr + ADD COLUMN source_lnp_prefix VARCHAR(255) NOT NULL DEFAULT '' AFTER source_gpp9, + ADD COLUMN destination_lnp_prefix VARCHAR(255) NOT NULL DEFAULT '' AFTER destination_gpp9;