module number-analysis-configuration {
yang-version 1.1;
namespace "http://metaswitch.com/yang/tas-vm-build/number-analysis-configuration";
prefix "number-analysis";
import vm-types {
prefix "vmt";
revision-date 2019-11-29;
}
organization "Metaswitch Networks";
contact "rvt-schemas@metaswitch.com";
description "Number analysis configuration schema.";
revision 2019-11-29 {
description
"Initial revision";
reference
"Metaswitch Deployment Definition Guide";
}
typedef dialing-code-type {
type string {
pattern '[0-9]+';
}
description "A type that represents a dialing code.";
}
grouping number-analysis-configuration-grouping {
container normalization {
leaf international-prefix {
type dialing-code-type {
length "1 .. 5"; // from http://www.idd.com.au/international-dialling-codes.php
}
mandatory true;
description "The international prefix. 1 to 5 digits in length.";
}
leaf min-normalizable-length {
type uint8 {
range "0 .. 31";
}
mandatory true;
description "The minimum normalizable length.";
}
leaf national-prefix {
type dialing-code-type {
length "1 .. 5";
}
mandatory true;
description "The national prefix. 1 to 5 digits in length.";
}
leaf network-dialing-code {
type dialing-code-type {
length "1 .. 3";
}
mandatory true;
description "The network dialing code. 1 to 3 digits in length.";
}
leaf normalize-to {
type enumeration {
enum international {
description "Normalize to international format.";
}
enum national {
description "Normalize to national format.";
}
}
default international;
description "The format to normalize to when comparing numbers, sending outgoing
requests and checking whether numbers are normalizable.";
}
description "Normalization configuration.";
}
leaf-list non-provisionable-uris {
type union {
type vmt:sip-or-tel-uri-type;
type vmt:phone-number-type;
}
description "List of URIs that cannot be provisioned.";
}
leaf assume-sip-uris-are-phone-numbers {
type boolean;
default true;
description "Set to 'true' to attempt to extract phone numbers from SIP URIs
even if they don't contain the 'user=phone' parameter.
Set to 'false' to disable this behaviour.";
}
description "Number analysis configuration.";
}
}