This file is indexed.

/etc/kamailio/pi_framework.xml is in kamailio-xml-modules 4.0.4-1ubuntu2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
<?xml version="1.0"?>
<framework>
	<!--	Declare all db connections
		Each db connection MUST have:
		 - an "id" to be identified by a tabe
		 - a URL pointing to the actual database
		 Supported databases:
		 * berkeley
		 * cassandra
		 * cluster
		 * flatstore
		 * mysql
		 * oracle
		 * postgres
		 * sqlite
		 * text
		 * unixodbc
	-->
	<db_url id="mysql">mysql://kamailio:kamailiorw@localhost/kamailio</db_url>
	<!--
	<db_url id="dbtext">text:///usr/local/etc/kamailio/dbtext</db_url>
	-->
	<!--	Declare all tables
		Each table MUST have:
		 - an "id" to be identified by a command
		 - a "table_name" pointing to the actual table name in the database
		 - a "db_url_id" to identify the db connection
		 - multiple "column" nodes with "field"i, "validation" and "type":
			/* type */
		DB1_INT,		/**< represents an 32 bit integer number */
		DB1_BIGINT,	/**< represents an 64 bit integer number */
		DB1_DOUBLE,	/**< represents a floating point number */
		DB1_STRING,	/**< represents a zero terminated const char* */
		DB1_STR,		/**< represents a string of 'str' type */
		DB1_DATETIME,	/**< represents date and time */
		DB1_BLOB,	/**< represents a large binary object */
		DB1_BITMAP	/**< an one-dimensional array of 32 flags */
			/* validation */
		P_HOST_PORT	/**< represents [proto:]host[:port] */
		P_IPV4_PORT	/**< represents [proto:]IPv4[:port] */
		IPV4		/**< represents an IPv4 */
		URI		/**< represents a SIP URI */
		URI_IPV4HOST	/**< represents a SIP URI w/ IPv4 as host */
	-->
	<db_table id="dispatcher"><table_name>dispatcher</table_name>
		<db_url_id>mysql</db_url_id>
		<column><field>id</field>		<type>DB1_INT</type></column>
		<column><field>setid</field>		<type>DB1_INT</type></column>
		<column><field>destination</field>	<type>DB1_STR</type>
			<validate>URI_IPV4HOST</validate></column>
		<column><field>flags</field>		<type>DB1_INT</type></column>
		<column><field>priority</field>		<type>DB1_INT</type></column>
		<column><field>attrs</field>		<type>DB1_STR</type></column>
		<column><field>description</field>	<type>DB1_STR</type></column>
	</db_table>
	<db_table id="dialplan"><table_name>dialplan</table_name>
		<db_url_id>mysql</db_url_id>
		<column><field>id</field>		<type>DB1_INT</type></column>
		<column><field>dpid</field>		<type>DB1_INT</type></column>
		<column><field>pr</field>		<type>DB1_INT</type></column>
		<column><field>match_op</field>		<type>DB1_INT</type></column>
		<column><field>match_exp</field>	<type>DB1_STR</type></column>
		<column><field>match_len</field>	<type>DB1_INT</type></column>
		<column><field>subst_exp</field>	<type>DB1_STR</type></column>
		<column><field>repl_exp</field>		<type>DB1_STR</type></column>
		<column><field>attrs</field>		<type>DB1_STRING</type></column>
	</db_table>
	<!--	Declare all mod
		Each mod must have:
		 - a "mod_name"
		 - at least one "cmd"
		Each cmd must have:
		 - a "cmd_name"
		 - a "db_table_id"
		 - a "cmd_type":	c  q  o
			DB1_QUERY	ov m  o
			DB1_INSERT	-  mv -
			DB1_DELETE	mv -  -
			DB1_UPDATE	ov mv -
			DB1_REPLACE	-  mv -
		Clause cols can have the following operators:
		 - "<"		&lt;
		 - ">"		&gt;
		 - "="		=
		 - "<="		&lt;=
		 - ">="		&gt;=
		 - "!="		!=
	-->
	<!-- dispatcher provisioning -->
	<mod>   <mod_name>dispatcher</mod_name>
		<cmd>   <cmd_name>show_destinations_with_small_setid</cmd_name>
			<db_table_id>dispatcher</db_table_id>
			<cmd_type>DB1_QUERY</cmd_type>
			<clause_cols>
				<col><field>setid</field><operator>&lt;</operator></col>
			</clause_cols>
			<query_cols>
				<col><field>id</field></col>
				<col><field>setid</field></col>
				<col><field>destination</field></col>
				<col><field>description</field></col>
			</query_cols>
		</cmd>
		<cmd>   <cmd_name>show_all</cmd_name>
			<db_table_id>dispatcher</db_table_id>
			<cmd_type>DB1_QUERY</cmd_type>
			<query_cols>
				<col><field>id</field></col>
				<col><field>setid</field></col>
				<col><field>destination</field></col>
				<col><field>flags</field></col>
				<col><field>priority</field></col>
				<col><field>attrs</field></col>
				<col><field>description</field></col>
			</query_cols>
		</cmd>
		<cmd>   <cmd_name>update_setid</cmd_name>
			<db_table_id>dispatcher</db_table_id>
			<cmd_type>DB1_UPDATE</cmd_type>
			<clause_cols>
				<col><field>id</field><operator>=</operator></col>
			</clause_cols>
			<query_cols>
				<col><field>setid</field></col>
			</query_cols>
		</cmd>
		<cmd>   <cmd_name>update_destination</cmd_name>
			<db_table_id>dispatcher</db_table_id>
			<cmd_type>DB1_UPDATE</cmd_type>
			<clause_cols>
				<col><field>id</field><operator>=</operator></col>
			</clause_cols>
			<query_cols>
				<col><field>destination</field></col>
			</query_cols>
		</cmd>
		<cmd>   <cmd_name>update_attr</cmd_name>
			<db_table_id>dispatcher</db_table_id>
			<cmd_type>DB1_UPDATE</cmd_type>
			<clause_cols>
				<col><field>id</field><operator>=</operator></col>
			</clause_cols>
			<query_cols>
				<col><field>attrs</field></col>
			</query_cols>
		</cmd>
		<cmd>   <cmd_name>update_description</cmd_name>
			<db_table_id>dispatcher</db_table_id>
			<cmd_type>DB1_UPDATE</cmd_type>
			<clause_cols>
				<col><field>id</field><operator>=</operator></col>
			</clause_cols>
			<query_cols>
				<col><field>description</field></col>
			</query_cols>
		</cmd>
		<cmd>   <cmd_name>add_gw</cmd_name>
			<db_table_id>dispatcher</db_table_id>
			<cmd_type>DB1_INSERT</cmd_type>
			<query_cols>
				<col><field>setid</field></col>
				<col><field>destination</field></col>
				<!--<col><field>flags</field></col>-->
				<col><field>priority</field></col>
				<col><field>attrs</field></col>
				<col><field>description</field></col>
			</query_cols>
		</cmd>
		<cmd>   <cmd_name>add_server_with_setid_100</cmd_name>
			<db_table_id>dispatcher</db_table_id>
			<cmd_type>DB1_INSERT</cmd_type>
			<query_cols>
				<col><field>setid</field>
					<value id="100">100</value>
				</col>
				<col><field>destination</field></col>
				<!--<col><field>flags</field></col>-->
				<col><field>priority</field></col>
				<col><field>attrs</field></col>
				<col><field>description</field></col>
			</query_cols>
		</cmd>
		<cmd>   <cmd_name>delete_by_id</cmd_name>
			<db_table_id>dispatcher</db_table_id>
			<cmd_type>DB1_DELETE</cmd_type>
			<clause_cols>
				<col><field>id</field><operator>=</operator></col>
			</clause_cols>
		</cmd>
	</mod>
	
	<!-- dialplan provisioning -->
	<mod>	<mod_name>dialplan</mod_name>
		<cmd>	<cmd_name>show_all</cmd_name>
			<db_table_id>dialplan</db_table_id>
			<cmd_type>DB1_QUERY</cmd_type>
			<query_cols>
				<col><field>id</field></col>
				<col><field>dpid</field></col>
				<col><field>pr</field></col>
				<col><field>match_op</field></col>
				<col><field>match_exp</field></col>
				<!--<col><field>match_len</field></col>-->
				<col><field>subst_exp</field></col>
				<col><field>repl_exp</field></col>
				<col><field>attrs</field></col>
			</query_cols>
			<order_by_cols><col><field>id</field></col></order_by_cols>
		</cmd>
		<cmd>	<cmd_name>show_dpid</cmd_name>
			<db_table_id>dialplan</db_table_id>
			<cmd_type>DB1_QUERY</cmd_type>
			<clause_cols>
				<col><field>dpid</field><operator>=</operator></col>
			</clause_cols>
			<query_cols>
				<col><field>id</field></col>
				<col><field>dpid</field></col>
				<col><field>pr</field></col>
				<col><field>match_op</field></col>
				<col><field>match_exp</field></col>
				<col><field>match_len</field></col>
				<col><field>subst_exp</field></col>
				<col><field>repl_exp</field></col>
				<col><field>attrs</field></col>
			</query_cols>
			<order_by_cols><col><field>id</field></col></order_by_cols>
		</cmd>
		<cmd>	<cmd_name>show_exact_matching</cmd_name>
			<db_table_id>dialplan</db_table_id>
			<cmd_type>DB1_QUERY</cmd_type>
			<clause_cols>
				<col><field>match_op</field><operator>=</operator>
					<value id="equal">0</value></col>
			</clause_cols>
			<query_cols>
				<col><field>id</field></col>
				<col><field>dpid</field></col>
				<col><field>pr</field></col>
				<col><field>match_op</field></col>
				<col><field>match_exp</field></col>
				<col><field>match_len</field></col>
				<col><field>subst_exp</field></col>
				<col><field>repl_exp</field></col>
				<col><field>attrs</field></col>
			</query_cols>
		</cmd>
		<cmd>	<cmd_name>show_regex_matching</cmd_name>
			<db_table_id>dialplan</db_table_id>
			<cmd_type>DB1_QUERY</cmd_type>
			<clause_cols>
				<col><field>match_op</field><operator>=</operator>
					<value id="regex">1</value></col>
			</clause_cols>
			<query_cols>
				<col><field>id</field></col>
				<col><field>dpid</field></col>
				<col><field>pr</field></col>
				<col><field>match_op</field></col>
				<col><field>match_exp</field></col>
				<col><field>match_len</field></col>
				<col><field>subst_exp</field></col>
				<col><field>repl_exp</field></col>
				<col><field>attrs</field></col>
			</query_cols>
		</cmd>
		<cmd>	<cmd_name>add</cmd_name>
			<db_table_id>dialplan</db_table_id>
			<cmd_type>DB1_INSERT</cmd_type>
			<query_cols>
				<col><field>dpid</field></col>
				<col><field>pr</field></col>
				<col><field>match_op</field>
					<value id="equal">0</value>
					<value id="regexp">1</value>
				</col>
				<col><field>match_exp</field></col>
				<col><field>match_len</field></col>
				<col><field>attrs</field></col>
			</query_cols>
		</cmd>
		<cmd>	<cmd_name>delete</cmd_name>
			<db_table_id>dialplan</db_table_id>
			<cmd_type>DB1_DELETE</cmd_type>
			<clause_cols>
				<col><field>id</field><operator>=</operator></col>
			</clause_cols>
		</cmd>
		<cmd>	<cmd_name>update_attr</cmd_name>
			<db_table_id>dialplan</db_table_id>
			<cmd_type>DB1_UPDATE</cmd_type>
			<clause_cols>
				<col><field>id</field><operator>=</operator></col>
			</clause_cols>
			<query_cols>
				<col><field>attrs</field></col>
			</query_cols>
		</cmd>
		<cmd>	<cmd_name>update_repl_exp</cmd_name>
			<db_table_id>dialplan</db_table_id>
			<cmd_type>DB1_UPDATE</cmd_type>
			<clause_cols>
				<col><field>id</field><operator>=</operator></col>
			</clause_cols>
			<query_cols>
				<col><field>repl_exp</field></col>
			</query_cols>
		</cmd>
		<cmd>	<cmd_name>replace</cmd_name>
			<db_table_id>dialplan</db_table_id>
			<cmd_type>DB1_REPLACE</cmd_type>
			<query_cols>
				<col><field>dpid</field></col>
				<col><field>pr</field></col>
				<col><field>match_op</field></col>
				<col><field>match_exp</field></col>
				<col><field>match_len</field></col>
				<col><field>subst_exp</field></col>
				<col><field>repl_exp</field></col>
				<col><field>attrs</field></col>
			</query_cols>
		</cmd>
	</mod>
</framework>