File: osipsconsole.8

package info (click to toggle)
opensips 2.2.2-3.1
  • links: PTS
  • area: main
  • in suites: bullseye, sid
  • size: 31,160 kB
  • sloc: ansic: 334,348; xml: 91,231; perl: 6,659; sh: 5,148; sql: 4,175; makefile: 3,167; yacc: 2,499; python: 1,197; cpp: 611; php: 573
file content (438 lines) | stat: -rw-r--r-- 9,157 bytes parent folder | download | duplicates (2)
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
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
.\" $Id: osipsconsole.8 5891 2009-11-22 12:53:09Z alerios $
.TH osipsconsole 8 22.11.2009 opensips-console "OpenSIPS" 
.\" Process with
.\" groff -man -Tascii osipsconsole.8 
.\"
.SH NAME
osipsconsole \- utility for provisioning OpenSIPS
.SH SYNOPSIS
.B osipsconsole

.B osipsconsole
.BI command
[
.BI parameters
]

.SH DESCRIPTION
.B osipsconsole
is a console like utility for provisioning
.B OpenSIPS SIP server.
It can be used to manage users, domains, aliases and other server options. If
command arguments are passed it will work in non-interactive mode, and behave
as old opensipsctl and opensipsdbctl tools.
If no arguments are passed, it behaves as a console - you will get a prompt,
and can run the available commands, with embedded help and command history -.

.SH FILES
.PD 0
.I /etc/opensips/osipsconsolerc
.br
.I ~/.osipsconsolerc
.br

.SH COMMANDS
.TP 12
.B help
Displays a short usage description, including all available options.

.TP 16
.I Command 'online' - dump online users from memory
.TP 12
.B online 
display online users

.TP 16
.I Command 'monitor' - show internal status
.TP 12
.B monitor 
show server's internal status

.TP 16
.I Command 'ping' - ping a SIP URI (OPTIONS)
.TP 12
.B ping <uri> 
ping <uri> with SIP OPTIONS

.TP 16
.I Command 'ul|alias' - manage user location or aliases
.TP 12
.B ul show [<username>]
show in-RAM online users
.TP
.B ul show --brief
show in-RAM online users in short format
.TP
.B ul rm <username> [<contact URI>]
delete user's usrloc entries
.TP
.B ul add <username> <uri> 
introduce a permanent usrloc entry
.TP
.B ul add <username> <uri> <expires> 
introduce a temporary usrloc entry

.TP 16
.I Command 'start|stop|restart'
.TP 12
.B restart 
restart OpenSIPS
.TP
.B start 
start OpenSIPS
.TP
.B stop 
stop OpenSIPS

.TP 16
.I Command 'tls'
.TP 12
.B tls rootCA [<etcdir>] 
creates new rootCA
.TP
.B tls userCERT <user> [<etcdir>] 
creates user certificate
default <etcdir> is /usr/local/etc/opensips/tls

.TP 16
.I Command 'acl' - manage access control lists (acl)
.TP 12
.B acl show [<username>] 
show user membership
.TP
.B acl grant <username> <group> 
grant user membership (*)
.TP
.B acl revoke <username> [<group>] 
revoke user membership(s) (*)

.TP 16
.I Command 'cr' - manage carrierroute tables
.TP 12
.B cr show 
show tables
.TP
.B cr reload 
reload tables
.TP
.B cr dump 
show in memory tables
.TP
.B cr addrt <routing_tree_id> <routing_tree> 
add a tree
.TP
.B cr rmrt  <routing_tree> 
rm a tree
.TP
cr addcarrier <carrier> <scan_prefix> <domain> <rewrite_host> 
[<prob>] [<strip>] [<rewrite_prefix>] [<rewrite_suffix>]
[<flags>] [<mask>] [<comment>]
add a carrier
.TP
.B cr rmcarrier  <carrier> <scan_prefix> <domain> 
rm a carrier

.TP 16
.I Command 'rpid' - manage Remote-Party-ID (RPID)
.TP 12
.B rpid add <username> <rpid> 
add rpid for a user (*)
.TP
.B rpid rm <username> 
set rpid to NULL for a user (*)
.TP
.B rpid show <username> 
show rpid of a user

.TP 16
.I Command 'add|passwd|rm' - manage subscribers
.TP 12
.B add <username> <password> 
add a new subscriber (*)
.TP
.B passwd <username> <passwd> 
change user's password (*)
.TP
.B rm <username> 
delete a user (*)

.TP 16
.I Command 'add|dump|reload|rm|show' - manage address
.TP 12
.B address show 
show db content
.TP
.B address dump 
show cache content
.TP
.B address reload 
reload db table into cache
.TP
.B address add <grp> <ip> <mask> <port> <proto> [<context_info>] [<pattern>]
add a new entry
.B address rm <grp> <ip> <mask> <port>
remove all entries for the given grp ip mask and port

.TP 16
.I Command 'dispatcher' - manage dispatcher
.TP 12
.B dispatcher show 
show dispatcher gateways
.TP
.B dispatcher reload 
reload dispatcher gateways
.TP
.B dispatcher dump 
show in memory dispatcher gateways
.TP
.B dispatcher addgw <setid> <destination> <flags> <description>			
add gateway
.TP
.B dispatcher rmgw <id> 
delete gateway

.TP 16
.I Command 'db' - database operations
.TP 12
.B db exec <query> 
execute SQL query
.TP
.B db roexec <roquery> 
execute read-only SQL query
.TP
.B db run <id> 
execute SQL query from $id variable
.TP
.B db rorun <id> 
execute read-only SQL query from $id variable
.TP
.B db show <table> 
display table content

.TP 16
.I Command 'speeddial' - manage speed dials (short numbers)
.TP 12
.B speeddial show <speeddial-id> 
show speeddial details
.TP
.B speeddial list <sip-id> 
list speeddial for uri
.TP
.B speeddial add <sip-id> <sd-id> <new-uri> [<desc>] 
add a speedial (*)
.TP
.B speeddial rm <sip-id> <sd-id> 
remove a speeddial (*)
.TP
.B speeddial help 
help message

.TP 16
.I Command 'avp' - manage AVPs
.TP 12
.B avp list [-T table] [-u <sip-id|uuid>] [-a attribute] [-v value] [-t type] 
list AVPs
.TP
.B avp add [-T table] <sip-id|uuid> <attribute> <type> <value> 
add AVP (*)
.TP
.B avp rm [-T table]  [-u <sip-id|uuid>] [-a attribute] [-v value] [-t type] 
remove AVP (*)
.TP
.B avp help 
help message

.TP 16
.I Command 'alias_db' - manage database aliases
.TP 12
.B alias_db show <alias> 
show alias details
.TP
.B alias_db list <sip-id> 
list aliases for uri
.TP
.B alias_db add <alias> <sip-id> 
add an alias (*)
.TP
.B alias_db rm <alias> 
remove an alias (*)
.TP
.B alias_db help 
help message

.TP 16
.I Command 'domain' - manage local domains
.TP 12
.B domain reload 
reload domains from disk
.TP
.B domain show 
show current domains in memory
.TP
.B domain showdb 
show domains in the database
.TP
.B domain add <domain> 
add the domain to the database
.TP
.B domain rm <domain> 
delete the domain from the database

.TP 16
.I Command 'fifo'
.TP 12
.B fifo 
send raw FIFO command

.TP 16
.I Command 'dialplan' - manage dialplans
.TP 12
.B dialplan show <dpid> 
show dialplan tables
.TP
.B dialplan reload 
reload dialplan tables
.TP
.B dialplan addrule <dpid> <prio> <match_op> <match_exp> <match_len> <subst_exp> <repl_exp> <attrs>
add a rule
.TP
.B dialplan rm 
removes the entire dialplan table
.TP
.B dialplan rmdpid <dpid> 
removes all the given dpid entries
.TP
.B dialplan rmrule <dpid> <prio> 
removes all the given dpid/prio entries

.TP 16
.I Command 'unixsock'
.TP 12
.B unixsock 
send raw unixsock command

.TP 16
.I Command 'droute'
.TP 12
.B dr gateway add <address=address_param> [<type=type_param>] [<strip=strip_param>]  [<pri_prefix=pri_prefix_param>] [<description=description_param>]
adds new route
.TP
.B dr gateway rm <gwid=gwid_param>
removes route
.TP
.B dr gateway list <type=type_param>
lists route(s)
.TP
.B dr gateway list <address=address_param>
lists route(s)
.TP
.B dr gateway list 
lists all routes
.TP
.B dr gateway h
droute help
.TP
.B dr rules add <gwlist=gwlist_param> [<groupid=groupid_param>][<prefix=prefix_param>] [<timerec=timerec_param>][<priority=priority_param>][<routeid=routeid_param>][<description=description_param>]
adds new rule(s)
.TP
.B dr rules rm <ruleid=ruleid_param> 
removes rules
.TP
.B dr rules list
lists rules(s)
.TP
.B dr rules list <gwlist=gwlist_param>
lists rules(s)
.TP
.B dr rules list <groupid=groupid_param>
lists rules(s)
.TP
.B dr rules h
dr rules help
.TP
.B dr h
dr help

.TP 16
.I Databases management:
.TP 12
.B db create <db name or db_path, optional> 
.TP
creates a new database
.B db presence 
adds the presence related tables
.TP
.B db extra 
adds the extra tables
.TP
.B db migrate <old_db> <new_db> 
migrates DB from 1.5 to 1.6
.TP
.B db drop <db name or db_path, optional> 
!entirely deletes tables!
.TP
.B db reinit <db name or db_path, optional> 
!entirely deletes and than re-creates tables!
.TP
.B db backup <file> 
dumps current database to file
.TP
.B db restore <file> 
restores tables from a file
.TP
.B db copy <new_db> 
creates a new db from an existing one

.TP 16
.I Berkeley DB tables management:
.TP 12
.B bdb | db_berkeley list
lists the underlying db files in DB_PATH
.TP
.B bdb | db_berkeley cat       <db>
db_dump the underlying db file to STDOUT
.TP
.B bdb | db_berkeley swap      <db>
installs db.new by db -> db.old; db.new -> db
.TP
.B bdb | db_berkeley append    <db> <datafile>
appends data to an existing db;output DB_PATH/db.new
.TP
.B bdb | db_berkeley newappend <db> <datafile>
appends data to a new instance of db; output DB_PATH/db.new
.TP
.B bdb | db_berkeley export <dump_dir>
exports table data to plain-txt files in dump_dir
.TP
.B bdb | db_berkeley import <dump_dir>
imports plain-txt table data and creates new db tables in db_path



.SH NOTES
.PP
Commands labeled with (*) will prompt for a MySQL password.
If the environment variable PW is set, the password will not be prompted.
.PP
IP addresses must be entered in dotted quad format e.g. 1.2.3.4

.SH AUTHORS

see 
.B /usr/share/doc/opensips/AUTHORS
.PP
This manual page was written by Alejandro Rios P. <alerios@debian.org>,
based on opensipsctl manpage by Bogdan-Andrei Iancu <bogdan@opensips.org>,
for the Debian project (and may be used by others).

.SH SEE ALSO
.BR opensips(8), opensips.cfg(5), opensipsctl(8), osipsconfig(8)
.PP
Full documentation on opensips is available at
.I http://www.opensips.org/.
.PP
Mailing lists:
.nf 
users@lists.opensips.org - opensips user community
.nf 
devel@lists.opensips.org - opensips development, new features and unstable version