SYNOPSIS
osipsconsoleosipsconsole command [ parameters ]
DESCRIPTION
osipsconsole is a console like utility for provisioning 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 -.
FILES
/etc/opensips/osipsconsolerc~/.osipsconsolerc
COMMANDS
- help
-
Displays a short usage description, including all available options.
- Command 'online' - dump online users from memory
- online
-
display online users
- Command 'monitor' - show internal status
- monitor
-
show server's internal status
- Command 'ping' - ping a SIP URI (OPTIONS)
- ping <uri>
-
ping <uri> with SIP OPTIONS
- Command 'ul|alias' - manage user location or aliases
- ul show [<username>]
- show in-RAM online users
- ul show --brief
- show in-RAM online users in short format
- ul rm <username> [<contact URI>]
- delete user's usrloc entries
- ul add <username> <uri>
- introduce a permanent usrloc entry
- ul add <username> <uri> <expires>
-
introduce a temporary usrloc entry
- Command 'start|stop|restart'
- restart
- restart OpenSIPS
- start
- start OpenSIPS
- stop
-
stop OpenSIPS
- Command 'tls'
- tls rootCA [<etcdir>]
- creates new rootCA
- tls userCERT <user> [<etcdir>]
-
creates user certificate
default <etcdir> is /usr/local/etc/opensips/tls
- Command 'acl' - manage access control lists (acl)
- acl show [<username>]
- show user membership
- acl grant <username> <group>
- grant user membership (*)
- acl revoke <username> [<group>]
-
revoke user membership(s) (*)
- Command 'cr' - manage carrierroute tables
- cr show
- show tables
- cr reload
- reload tables
- cr dump
- show in memory tables
- cr addrt <routing_tree_id> <routing_tree>
- add a tree
- cr rmrt <routing_tree>
- rm a tree
- cr addcarrier <carrier> <scan_prefix> <domain> <rewrite_host>
- [<prob>] [<strip>] [<rewrite_prefix>] [<rewrite_suffix>] [<flags>] [<mask>] [<comment>] add a carrier
- cr rmcarrier <carrier> <scan_prefix> <domain>
-
rm a carrier
- Command 'rpid' - manage Remote-Party-ID (RPID)
- rpid add <username> <rpid>
- add rpid for a user (*)
- rpid rm <username>
- set rpid to NULL for a user (*)
- rpid show <username>
-
show rpid of a user
- Command 'add|passwd|rm' - manage subscribers
- add <username> <password>
- add a new subscriber (*)
- passwd <username> <passwd>
- change user's password (*)
- rm <username>
-
delete a user (*)
- Command 'add|dump|reload|rm|show' - manage address
- address show
- show db content
- address dump
- show cache content
- address reload
- reload db table into cache
- address add <grp> <ip> <mask> <port> <proto> [<context_info>] [<pattern>]
-
add a new entry
address rm <grp> <ip> <mask> <port>
remove all entries for the given grp ip mask and port
- Command 'dispatcher' - manage dispatcher
- dispatcher show
- show dispatcher gateways
- dispatcher reload
- reload dispatcher gateways
- dispatcher dump
- show in memory dispatcher gateways
- dispatcher addgw <setid> <destination> <flags> <description>
-
add gateway
- dispatcher rmgw <id>
-
delete gateway
- Command 'db' - database operations
- db exec <query>
- execute SQL query
- db roexec <roquery>
- execute read-only SQL query
- db run <id>
- execute SQL query from $id variable
- db rorun <id>
- execute read-only SQL query from $id variable
- db show <table>
-
display table content
- Command 'speeddial' - manage speed dials (short numbers)
- speeddial show <speeddial-id>
- show speeddial details
- speeddial list <sip-id>
- list speeddial for uri
- speeddial add <sip-id> <sd-id> <new-uri> [<desc>]
- add a speedial (*)
- speeddial rm <sip-id> <sd-id>
- remove a speeddial (*)
- speeddial help
-
help message
- Command 'avp' - manage AVPs
- avp list [-T table] [-u <sip-id|uuid>] [-a attribute] [-v value] [-t type]
- list AVPs
- avp add [-T table] <sip-id|uuid> <attribute> <type> <value>
- add AVP (*)
- avp rm [-T table] [-u <sip-id|uuid>] [-a attribute] [-v value] [-t type]
- remove AVP (*)
- avp help
-
help message
- Command 'alias_db' - manage database aliases
- alias_db show <alias>
- show alias details
- alias_db list <sip-id>
- list aliases for uri
- alias_db add <alias> <sip-id>
- add an alias (*)
- alias_db rm <alias>
- remove an alias (*)
- alias_db help
-
help message
- Command 'domain' - manage local domains
- domain reload
- reload domains from disk
- domain show
- show current domains in memory
- domain showdb
- show domains in the database
- domain add <domain>
- add the domain to the database
- domain rm <domain>
-
delete the domain from the database
- Command 'fifo'
- fifo
-
send raw FIFO command
- Command 'dialplan' - manage dialplans
- dialplan show <dpid>
- show dialplan tables
- dialplan reload
- reload dialplan tables
- dialplan addrule <dpid> <prio> <match_op> <match_exp> <match_len> <subst_exp> <repl_exp> <attrs>
- add a rule
- dialplan rm
- removes the entire dialplan table
- dialplan rmdpid <dpid>
- removes all the gived dpid entries
- dialplan rmrule <dpid> <prio>
-
removes all the gived dpid/prio entries
- Command 'unixsock'
- unixsock
-
send raw unixsock command
- Command 'droute'
- dr gateway add <address=address_param> [<type=type_param>] [<strip=strip_param>] [<pri_prefix=pri_prefix_param>] [<description=description_param>]
- adds new route
- dr gateway rm <gwid=gwid_param>
- removes route
- dr gateway list <type=type_param>
- lists route(s)
- dr gateway list <address=address_param>
- lists route(s)
- dr gateway list
- lists all routes
- dr gateway h
- droute help
- 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)
- dr rules rm <ruleid=ruleid_param>
- removes rules
- dr rules list
- lists rules(s)
- dr rules list <gwlist=gwlist_param>
- lists rules(s)
- dr rules list <groupid=groupid_param>
- lists rules(s)
- dr rules h
- dr rules help
- dr h
-
dr help
- Databases management:
- db create <db name or db_path, optional>
- creates a new database
- db presence adds the presence related tables
- db extra
- adds the extra tables
- db migrate <old_db> <new_db>
- migrates DB from 1.5 to 1.6
- db drop <db name or db_path, optional>
- !entirely deletes tables!
- db reinit <db name or db_path, optional>
- !entirely deletes and than re-creates tables!
- db backup <file>
- dumps current database to file
- db restore <file>
- restores tables from a file
- db copy <new_db>
-
creates a new db from an existing one
- Berkeley DB tables management:
- bdb | db_berkeley list
- lists the underlying db files in DB_PATH
- bdb | db_berkeley cat <db>
- db_dump the underlying db file to STDOUT
- bdb | db_berkeley swap <db>
- installs db.new by db -> db.old; db.new -> db
- bdb | db_berkeley append <db> <datafile>
- appends data to an existing db;output DB_PATH/db.new
- bdb | db_berkeley newappend <db> <datafile>
- appends data to a new instance of db; output DB_PATH/db.new
- bdb | db_berkeley export <dump_dir>
- exports table data to plain-txt files in dump_dir
- bdb | db_berkeley import <dump_dir>
-
imports plain-txt table data and creates new db tables in db_path
NOTES
Commands labeled with (*) will prompt for a MySQL password. If the environment variable PW is set, the password will not be prompted.
IP addresses must be entered in dotted quad format e.g. 1.2.3.4
AUTHORS
see /usr/share/doc/opensips/AUTHORS
This manual page was written by Alejandro Rios P. <[email protected]>, based on opensipsctl manpage by Bogdan-Andrei Iancu <[email protected]>, for the Debian project (and may be used by others).