mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-10 07:44:50 +01:00
voice-client: supported countries ubus method
This commit is contained in:
parent
a9415b745c
commit
08f2370477
3 changed files with 50 additions and 1 deletions
|
|
@ -43,3 +43,32 @@ getEchoCancellingValue() {
|
|||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
supportedCountries() {
|
||||
echo "Australia:AUS"
|
||||
echo "Belgium:BEL"
|
||||
echo "Brazil:BRA"
|
||||
echo "Chile:CHL"
|
||||
echo "China:CHN"
|
||||
echo "Czech:CZE"
|
||||
echo "Denmark:DNK"
|
||||
echo "ETSI:ETS"
|
||||
echo "Finland:FIN"
|
||||
echo "France:FRA"
|
||||
echo "Germany:DEU"
|
||||
echo "Hungary:HUN"
|
||||
echo "India:IND"
|
||||
echo "Italy:ITA"
|
||||
echo "Japan:JPN"
|
||||
echo "Netherlands:NLD"
|
||||
echo "New Zealand:NZL"
|
||||
echo "North America:USA"
|
||||
echo "Spain:ESP"
|
||||
echo "Sweden:SWE"
|
||||
echo "Switzerland:CHE"
|
||||
echo "Norway:NOR"
|
||||
echo "Taiwan:TWN"
|
||||
echo "United Kingdoms:GRB"
|
||||
echo "United Arab Emirates:ARE"
|
||||
echo "CFG TR57:T57"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -50,3 +50,7 @@ getEchoCancellingValue() {
|
|||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
supportedCountries() {
|
||||
echo "ETSI:ETS"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
case "$1" in
|
||||
list)
|
||||
echo '{ "status" : {}, "lines" : {}, "codecs" : {}, "call_log" : {}, "platform" : {} }'
|
||||
echo '{ "status" : {}, "lines" : {}, "codecs" : {}, "call_log" : {}, "platform" : {}, "supported_countries" : {} }'
|
||||
|
||||
;;
|
||||
call)
|
||||
|
|
@ -146,6 +146,22 @@ case "$1" in
|
|||
|
||||
json_dump
|
||||
;;
|
||||
supported_countries)
|
||||
vcf="/tmp/voice.supported_countries"
|
||||
supportedCountries > $vcf
|
||||
json_init
|
||||
json_add_array countries
|
||||
while IFS= read -r line
|
||||
do
|
||||
json_add_object ""
|
||||
json_add_string country "$(echo $line | cut -d':' -f1)"
|
||||
json_add_string code "$(echo $line | cut -d':' -f2)"
|
||||
json_select ..
|
||||
done < "$vcf"
|
||||
|
||||
json_dump
|
||||
rm -f $vcf
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue