1<?xml version="1.0" encoding="utf-8"?>
2<!-- Copyright (C) 2018 The Android Open Source Project
3
4     Licensed under the Apache License, Version 2.0 (the "License");
5     you may not use this file except in compliance with the License.
6     You may obtain a copy of the License at
7
8          http://www.apache.org/licenses/LICENSE-2.0
9
10     Unless required by applicable law or agreed to in writing, software
11     distributed under the License is distributed on an "AS IS" BASIS,
12     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13     See the License for the specific language governing permissions and
14     limitations under the License.
15-->
16<!-- This xml is the command's structure about supplementary service by ussd command for
17     carrier id 850.
18     <a href="https://android.googlesource.com/platform/packages/providers/TelephonyProvider/+/master/assets/latest_carrier_id/carrier_list.textpb">here</a>
19     The introduction is same as carrier_ss_string.xml. @see carrier_ss_string_carrierId.xml
20-->
21
22<resources>
23    <!-- This is a parser format by Regular Expression.
24         "response_format"'s position follow below index.
25         ((\d{2,3})(\*([^*#]*)(\*([^*#]*)(\*([^*#]*)(\*([^*#]*)(\*([^*#]*)(\*([^*#]*)(\*([^*#]*))?)?)?)?)?)?)?#)
26         1 2       3  4       5  6       7  8       9  10      11 12     13  14      15 16
27    -->
28    <regular_parser>((\d{2,3})(\*([^*#]*)(\*([^*#]*)(\*([^*#]*)(\*([^*#]*)(\*([^*#]*)(\*([^*#]*)(\*([^*#]*))?)?)?)?)?)?)?#)</regular_parser>
29    <feature name="callforwarding">
30        <command name="query"><!--For example: *#120*1#-->
31            <service_code>120</service_code>
32            <action_code>*#</action_code>
33            <parameter number="1">
34                <entry position="1">1</entry>
35            </parameter>
36            <response_format number ="3"><!--For example: 120*1*7*number*time*1*0*0#-->
37                <entry position="6" key="status_code"/>
38                <entry position="8" key="number"/>
39                <entry position="10" key="time" />
40            </response_format>
41        </command>
42        <command name="activate"><!--For example: *120*1*number*time#-->
43            <service_code>120</service_code>
44            <action_code>*</action_code>
45            <parameter number="3">
46                <entry position="1">1</entry>
47                <entry position="2">tag_number</entry>
48                <entry position="3">tag_time</entry>
49            </parameter>
50            <response_format number="1"><!--For example: 120*1*7*1#-->
51                <entry position="6" key="status_code"/>
52            </response_format>
53        </command>
54        <command name="deactivate"><!--For example: #120*1#-->
55            <service_code>120</service_code>
56            <action_code>#</action_code>
57            <parameter number="1">
58                <entry position="1">1</entry>
59            </parameter>
60            <response_format number="1"><!--For example: 120*1*6*2#-->
61                <entry position="6" key="status_code"/>
62            </response_format>
63        </command>
64        <command_result number="3">
65            <entry key="status_code" definition="activate">7</entry>
66            <entry key="status_code" definition="deactivate">6</entry>
67            <entry key="status_code" definition="unregister">4</entry>
68        </command_result>
69    </feature>
70    <feature name="callerid">
71        <command name="activate"><!--For example: *148*2*password#-->
72            <service_code>148</service_code>
73            <action_code>*</action_code>
74            <parameter number="2">
75                <entry position="1">2</entry>
76                <entry position="2">tag_password</entry>
77            </parameter>
78            <response_format number="1"><!--For example: 148*7#-->
79                <entry position="4" key="status_code"/>
80            </response_format>
81        </command>
82        <command name="deactivate"><!--For example: *148*1*password#-->
83            <service_code>148</service_code>
84            <action_code>*</action_code>
85            <parameter number="2">
86                <entry position="1">1</entry>
87                <entry position="2">tag_password</entry>
88            </parameter>
89            <response_format number="1"><!--For example: 148*7#-->
90                <entry position="4" key="status_code"/>
91            </response_format>
92        </command>
93        <command_result number="1">
94            <entry key="status_code" definition="ok">7</entry>
95        </command_result>
96    </feature>
97</resources>
98