To accommodate
networks where both 2-digit and 3-digit MNCs are used, additional identifiers
are needed since the same MCC can be used with both MNC lengths. In those
cases, an XML file is used to establish a relationship between the MNC length
and the MCC (Mobile Country Code). This XML file lists the actual, possible MNC
values.
For example:
For MCC 405, the MNC length is 2 for Reliance in most cases, for example, 03.
For the same MCC 405, the MNC length is 3 for TATA DOCOMO in most cases, for example, 030.
For the vast majority
of cases, the XML file has sufficient information to determine the MNC length
just from the country code. In countries where both 2 and 3 digit MNC values
are used, adding the actual MNC into the XML is usually sufficient, but there
still are a small number of cases that cannot be differentiated correctly. In
the above example, the MCC is 405 in both cases and the problem is that the MNC
in both cases starts with 03. CPS checks for both 03 and 030, but because both
are found, there is no way to know which is correct. The IMSI is built in the
following manner: 3 digit MCC, 2 or 3 digit MNC, and 9 or 10 digit MIN so the
total IMSI is 15 digits (an exception to this is some old IMSIs which are 14
digits).
The following known
conflicts are included in the XML file.
<country name="in" mnc="03" mncLength="2" carrier="Reliance" operator="Bihar" />
<country name="in" mnc="04" mncLength="2" carrier="Reliance" operator="Chennai" />
<country name="in" mnc="030" mncLength="3" carrier="TATADOCOMO" operator="Gujarat"/>
<country name="in" mnc="031" mncLength="3" carrier="TATADOCOMO" operator="Haryana"/>
<country name="in" mnc="032" mncLength="3" carrier="TATADOCOMO" operator="HimachalPradesh"/>
<country name="in" mnc="033" mncLength="3" carrier="TATADOCOMO" operator="JammuAndKashmir"/>
<country name="in" mnc="034" mncLength="3" carrier="TATADOCOMO" operator="Karnataka"/>
<country name="in" mnc="035" mncLength="3" carrier="TATADOCOMO" operator="Kerala"/>
<country name="in" mnc="036" mncLength="3" carrier="TATADOCOMO" operator="Kolkata"/>
<country name="in" mnc="037" mncLength="3" carrier="TATADOCOMO" operator="MaharashtraAndGoa"/>
<country name="in" mnc="038" mncLength="3" carrier="TATADOCOMO" operator="MadhyaPradesh"/>
<country name="in" mnc="039" mncLength="3" carrier="TATADOCOMO" operator="Mumbai"/>
<country name="in" mnc="041" mncLength="3" carrier="TATADOCOMO" operator="Orissa"/>
<country name="in" mnc="042" mncLength="3" carrier="TATADOCOMO" operator="Punjab"/>
<country name="in" mnc="043" mncLength="3" carrier="TATADOCOMO" operator="Rajasthan"/>
<country name="in" mnc="044" mncLength="3" carrier="TATADOCOMO" operator="TamilNaduChennai"/>
<country name="in" mnc="045" mncLength="3" carrier="TATADOCOMO" operator="UttarPradeshE"/>
<country name="in" mnc="046" mncLength="3" carrier="TATADOCOMO" operator="UttarPradeshWAndUttarkhand"/>
<country name="in" mnc="047" mncLength="3" carrier="TATADOCOMO" operator="WestBengal"/>
This XML configuration file is available in the following directory: /etc/broadhop/pcrf/mcc.xml.
Modifications to this file requires a server restart (restartall.sh
).
Caution
|
Executing restartall.sh will cause messages to be dropped.
|
mcc.xml
Schema
The mcc.xml file has
the following schema:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
attributeFormDefault="unqualified">
<xs:element name="mccList">
<xs:complexType>
<xs:sequence>
<xs:element name="mcc" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="country">
<xs:complexType>
<xs:attribute name="name" type="xs:string"></xs:attribute>
<xs:attribute name="mnc" type="xs:int"></xs:attribute>
<xs:attribute name="mncLength" type="xs:int"></xs:attribute>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="id" type="xs:int"></xs:attribute>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
XML
Example
The following file shows an example of a simple mcc.xml file with several values:
<?xml version='1.0' encoding='UTF-8'?>
<mccList>
<mcc id="202"><country name="gr" mncLength="2" /></mcc><!-- Greece -->
<mcc id="250">
<country name="ru" mncLength="2" />
<country name="ru" mnc="811" mncLength="3" operator="VotekMobile" />
</mcc><!-- Russian Federation -->
</mccList>
XML Nodes
Explained
A single mncLength for a country code has a node structure like the following:
<mcc id="202"><country name="gr"
mncLength="2" /></mcc><!-- Greece -->
The code then parses the MCC element into a single id:country:mncLength relationship so that the MNC length returns as 2 in
the above case. For a country or carrier that needs to have an MNC length of 3, the following node produces this outcome:
<mcc id="310"><country name="us"
mncLength="3" /></mcc><!-- United States
-->
A country that uses
both MNC lengths may need multiple child nodes that specify exceptions like the
following:
<mcc id="405">
<country name="in" mnc="01" mncLength="2" carrier="Reliance" operator="AndhraPradeshAndTelangana" />
<!-- more country codes here-->
</mcc>
The features code then parses these exceptions for MNC length retrieval looking for matching conditions within the list of
provided specifics to create the relationship between the country code and the MNC length. If a match is not found an empty
string is returned as a default. An empty string is returned so that an incorrect SIP URI is not built.