Updated license
[anna.git] / include / anna / diameter / helpers / tme / defines.hpp
1 // ANNA - Anna is Not Nothingness Anymore
2 //
3 // (c) Copyright 2005-2014 Eduardo Ramos Testillano & Francisco Ruiz Rayo
4 //
5 // https://bitbucket.org/testillano/anna
6 //
7 // Redistribution and use in source and binary forms, with or without
8 // modification, are permitted provided that the following conditions
9 // are met:
10 //
11 //     * Redistributions of source code must retain the above copyright
12 // notice, this list of conditions and the following disclaimer.
13 //     * Redistributions in binary form must reproduce the above
14 // copyright notice, this list of conditions and the following disclaimer
15 // in the documentation and/or other materials provided with the
16 // distribution.
17 //     * Neither the name of Google Inc. nor the names of its
18 // contributors may be used to endorse or promote products derived from
19 // this software without specific prior written permission.
20 //
21 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
25 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
27 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 //
33 // Authors: eduardo.ramos.testillano@gmail.com
34 //          cisco.tierra@gmail.com
35
36
37 #ifndef anna_diameter_helpers_tme_defines_hpp
38 #define anna_diameter_helpers_tme_defines_hpp
39
40
41 // Local
42 #include <anna/diameter/helpers/defines.hpp>
43
44 // STL
45 #include <string>
46
47 // TME
48 #include <anna/diameter/helpers/tme/codectypes/codectypes.hpp>
49
50
51 /** Contextualized definitions (avp id) */
52 #define anna_diameter_helpers_define_avp(avpname,code)  anna_diameter_helpers_define_avp_in_context(avpname,code,tme)
53
54 /** Contextualized definitions (avp id and values) */
55 #define anna_diameter_helpers_define_avp_with_values(avpname,code)  anna_diameter_helpers_define_avp_with_values_in_context(avpname,code,tme)
56
57
58 namespace anna {
59
60 namespace diameter {
61
62 namespace helpers {
63
64 namespace tme {
65
66
67 /**
68 * Avps
69 */
70 anna_diameter_helpers_define_avp(CS_Additional_Calling_Party_Number, 1);
71 anna_diameter_helpers_define_avp(CS_Announcement, 2);
72 anna_diameter_helpers_define_avp(CS_Announcement_Code, 3);
73 anna_diameter_helpers_define_avp(CS_Announcement_Data, 4);
74 anna_diameter_helpers_define_avp_with_values(CS_Announcement_Data_Type, 5) {
75   enum v_ {
76     Integer32 = 1,
77     ISDNNumber = 2,
78     Time = 3
79   };
80 };
81
82 anna_diameter_helpers_define_avp(CS_Announcement_Data_Value, 6);
83 anna_diameter_helpers_define_avp(CS_Bearer_Capability, 7);
84 anna_diameter_helpers_define_avp(CS_Call_Reference_Number, 8);
85 anna_diameter_helpers_define_avp(CS_Called_Party_Number, 9);
86 anna_diameter_helpers_define_avp(CS_Calling_Partys_Category, 10);
87 anna_diameter_helpers_define_avp(CS_Calling_Party_Number, 11);
88 anna_diameter_helpers_define_avp_with_values(CS_Event_Type_BCSM, 12) {
89   enum v_ {
90     collectedInfo = 2,
91     analyzedInformation = 3,
92     routeSelectFailure = 4,
93     oCalledPartyBusy = 5,
94     oNoAnswer = 6,
95     oAnswer = 7,
96     oDisconnect = 9,
97     oAbandon = 10,
98     termAttemptAuthorized = 12,
99     tBusy = 13,
100     tNoAnswer = 14,
101     tAnswer = 15,
102     tDisconnect = 17,
103     tAbandon = 18
104   };
105 };
106
107 anna_diameter_helpers_define_avp_with_values(CS_First_Call_Indication, 13) {
108   enum v_ {
109     FIRST_CALL_FALSE = 0,
110     FIRST_CALL_TRUE = 1
111   };
112 };
113
114 anna_diameter_helpers_define_avp(CS_Free_Format_Data, 14);
115 anna_diameter_helpers_define_avp(CS_Furnish_Charging_Information, 15);
116 anna_diameter_helpers_define_avp(CS_High_Layer_Compatibility, 16);
117 anna_diameter_helpers_define_avp(CS_Information, 17);
118 anna_diameter_helpers_define_avp(CS_Location_Information, 18);
119 anna_diameter_helpers_define_avp(CS_MSC_Address, 19);
120 anna_diameter_helpers_define_avp(CS_Original_Called_Party_ID, 20);
121 anna_diameter_helpers_define_avp(CS_Originating_Location_Number, 21);
122 anna_diameter_helpers_define_avp(CS_Party_To_Charge, 22);
123 anna_diameter_helpers_define_avp(CS_Redirecting_Party_Number, 23);
124 anna_diameter_helpers_define_avp(CS_Redirection_Information, 24);
125 anna_diameter_helpers_define_avp(CS_Release_Cause_Code, 25);
126 anna_diameter_helpers_define_avp(CS_Rerouting_Number, 26);
127 anna_diameter_helpers_define_avp(CS_Service_Key, 27);
128 anna_diameter_helpers_define_avp(CS_Terminating_VLR_Number, 28);
129 anna_diameter_helpers_define_avp(CS_Warning_Period, 29);
130 anna_diameter_helpers_define_avp(CS_Accumulated_Time, 30);
131 anna_diameter_helpers_define_avp_with_values(CS_Announcement_Logic, 31) {
132   enum v_ {
133     NOT_TO_BE_PLAYED = 0,
134     PLAYED_TO_CALLING_PARTY = 1,
135     PLAYED_TO_CALLED_PARTY = 2,
136     PLAYED_TO_BOTH_PARTIES = 3
137   };
138 };
139
140 anna_diameter_helpers_define_avp_with_values(CS_Announcement_Type, 32) {
141   enum v_ {
142     IMMEDIATE_ANNOUNCEMENT = 0,
143     MIDCALL_ANNOUNCEMENT = 1,
144     ENDCALL_ANNOUNCEMENT = 2
145   };
146 };
147
148 anna_diameter_helpers_define_avp(CS_Balance_TopUp_Data, 33);
149 anna_diameter_helpers_define_avp(CS_Call_SetUp_Result_Code, 34);
150 anna_diameter_helpers_define_avp(CS_Customer_Data, 35);
151 anna_diameter_helpers_define_avp_with_values(CS_Dialogue_Handling, 36) {
152   enum v_ {
153     NORMAL = 0,
154     OPTIMIZED = 1
155   };
156 };
157
158 anna_diameter_helpers_define_avp(CS_ISUP_Release_Cause_Code, 37);
159 anna_diameter_helpers_define_avp(CS_Max_Call_Duration, 38);
160 anna_diameter_helpers_define_avp(CS_Result_Code, 39);
161 anna_diameter_helpers_define_avp(CS_Start_Of_Charging, 40);
162 anna_diameter_helpers_define_avp(CS_Teleservice_Code, 41);
163 anna_diameter_helpers_define_avp(CS_Traffic_Case, 42);
164 anna_diameter_helpers_define_avp(CS_AoC_Info, 43);
165 anna_diameter_helpers_define_avp(CS_AoC_Info_e1, 44);
166 anna_diameter_helpers_define_avp(CS_AoC_Info_e2, 45);
167 anna_diameter_helpers_define_avp(CS_AoC_Info_e3, 46);
168 anna_diameter_helpers_define_avp(CS_AoC_Info_e4, 47);
169 anna_diameter_helpers_define_avp(CS_AoC_Info_e5, 48);
170 anna_diameter_helpers_define_avp(CS_AoC_Info_e6, 49);
171 anna_diameter_helpers_define_avp(CS_AoC_Info_e7, 50);
172 anna_diameter_helpers_define_avp(CS_Called_Party_BCD_Number, 51);
173 anna_diameter_helpers_define_avp(CS_Conference_Id, 52);
174 anna_diameter_helpers_define_avp(CS_MultiParty_Call_Indication, 53);
175 anna_diameter_helpers_define_avp(CS_Network_Type, 54);
176 anna_diameter_helpers_define_avp(CS_Service_Id, 55);
177 anna_diameter_helpers_define_avp(OCS_Account_Management_Op, 56);
178
179 // VIRTUAL PRIVATE NETWORK (VPN) SERVICE
180 anna_diameter_helpers_define_avp_with_values(VPN_Access_Type, 100) {
181   enum v_ {
182     Normal = 0,
183     Registered = 1,
184     Remote = 2
185   };
186 };
187
188 anna_diameter_helpers_define_avp(VPN_Identifier, 101);
189 anna_diameter_helpers_define_avp(VPN_Information, 102);
190 anna_diameter_helpers_define_avp_with_values(VPN_Office_Zone_Indicator, 103) {
191   enum v_ {
192     Office_zone_call = 0,
193     Non_Office_zone_call = 1
194   };
195 };
196
197 anna_diameter_helpers_define_avp_with_values(VPN_On_Net_Indicator, 104) {
198   enum v_ {
199     On_net_call__Intragroup_Mobile_destination = 0,
200     On_net_call__Intergroup_Mobile_destination = 1,
201     On_net_call__Intragroup_Fixed_destination = 2,
202     On_net_call__Intergroup_Fixed_destination = 3,
203     Off_net_call = 4
204   };
205 };
206
207 anna_diameter_helpers_define_avp(VPN_Public_Calling_Party_Number, 105);
208 anna_diameter_helpers_define_avp(VPN_Public_Redirecting_Party_Number, 106);
209 anna_diameter_helpers_define_avp_with_values(VPN_Soft_Hard_Treatment, 107) {
210   enum v_ {
211     Soft_global_and_partial_online_cost_controls = 0,
212     Hard_global_online_cost_control = 1,
213     Hard_voice_online_cost_control = 2,
214     Hard_global_and_voice_online_cost_control = 3,
215     Hard_global_online_cost_control_without_cut_off = 5,
216     Hard_voice_online_cost_control_without_cut_off = 6,
217     Hard_global_and_voice_online_cost_control_without_cut_off = 7
218   };
219 };
220
221 // VIRTUAL CALLING CARD (VCC) SERVICE
222 anna_diameter_helpers_define_avp(VCC_Information, 151);
223 anna_diameter_helpers_define_avp(VCC_Number, 152);
224
225
226 /**
227 * Commands
228 */
229
230
231 }
232 }
233 }
234 }
235
236
237 #undef anna_diameter_helpers_define_avp
238 #undef anna_diameter_helpers_define_avp_with_values
239
240 #endif
241