Commit 6764cc56 authored by Yalu Zhang's avatar Yalu Zhang

Asterisk: Change country code from 3 letters to 2 in config scripts

parent 5a594453
......@@ -117,7 +117,7 @@ config sip_advanced 'sip_options'
option srvlookup 'yes'
config tel_advanced 'tel_options'
option country 'swe'
option country 'se'
option jbenable 'yes'
option jbforce 'no'
option jbmaxsize '500'
......
......@@ -776,6 +776,8 @@ configure_call_filters() {
local country cty idc cc srn
config_get country tel_options country
country=$(echo $country | tr [A-Z] [a-z])
# Read the International Dialing Code and the Country Code from config
while read line; do
cty=$(echo $line | cut -d ';' -f1)
......@@ -1690,7 +1692,7 @@ configure_logger() {
configure_indications() {
config_get country tel_options country
country_code=$(supportedCountries | grep $country |cut -d':' -f3 | tr [A-Z] [a-z])
country_code=$(echo $country | tr [A-Z] [a-z])
sed -i "s/^country=.*/country=${country_code}/g" $WORK_DIR/indications.conf
}
......
aus;0011;61
bel;00;32
bra;00;55
chl;1xx0;56
chn;00;86
hrv;00;385
cze;00;420
dnk;00;45
ets;00;372
fin;00,99x,99xx,99xxx;358
fra;00;33
deu;00;49
hun;00;36
ind;00;91
ita;00;39
jpn;010;81
nld;00;31
nzl;00;64
usa;011;1
esp;00;34
swe;00;46
che;00;41
nor;00;47
twn;00x;886
gbr;00;44
are;00;971
au;0011;61
be;00;32
br;00;55
cl;1xx0;56
cn;00;86
hr;00;385
cz;00;420
dk;00;45
et;00;372
fi;00,99x,99xx,99xxx;358
fr;00;33
de;00;49
hu;00;36
in;00;91
it;00;39
jp;010;81
nl;00;31
nz;00;64
us;011;1
es;00;34
se;00;46
ch;00;41
no;00;47
tw;00x;886
uk;00;44
ae;00;971
aus;19x+
bel;09xx+
bra;05xx+
chl;
chn;
cze;9xx+
dnk;90xx+
ets;
fin;0(7[0,5]|[1-3,6]0)x+
fra;0[8,9]xx+
deu;0(9xx|137)x+
hun;06-[8,9]x+
ind;
ita;8
jpn;0990x+
nld;09xx+
nzl;0900x+
usa;1-900x+
esp;([8,9]0x|118)x+
swe;90510,09(00|39|44)x+,099x+
che;09xx+
nor;82x+
twn;020[3,4,9]x+
gbr;0[8,9]xx+
are;[2,6]00x+
au;19x+
be;09xx+
br;05xx+
cl;
cn;
cz;9xx+
dk;90xx+
et;
fi;0(7[0,5]|[1-3,6]0)x+
fr;0[8,9]xx+
de;0(9xx|137)x+
hu;06-[8,9]x+
in;
it;8
jp;0990x+
nl;09xx+
nz;0900x+
us;1-900x+
es;([8,9]0x|118)x+
se;90510,09(00|39|44)x+,099x+
ch;09xx+
no;82x+
tw;020[3,4,9]x+
uk;0[8,9]xx+
ae;[2,6]00x+
......@@ -26,15 +26,15 @@ getAllLines() {
}
supportedCountries() {
echo "Austria:aut:at"
echo "Denmark:dnk:dk"
echo "Estonia:est:ee"
echo "Germany:deu:de"
echo "Netherlands:nld:nl"
echo "Norway:nor:no"
echo "Spain:esp:es"
echo "Sweden:swe:se"
echo "Switzerland:che:ch"
echo "United Kingdom:gbr:uk"
echo "Austria:at"
echo "Denmark:dk"
echo "Estonia:ee"
echo "Germany:de"
echo "Netherlands:nl"
echo "Norway:no"
echo "Spain:es"
echo "Sweden:se"
echo "Switzerland:ch"
echo "United Kingdom:uk"
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment