---
name: "osipsconsole"
section: "8"
platform: "linux"
package: "opensips"
version: "2.2.2-3"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/osipsconsole"
---

# osipsconsole(8)

utility for provisioning OpenSIPS

## NAME

osipsconsole - utility for provisioning OpenSIPS

## SYNOPSIS

**osipsconsole**

**osipsconsole** **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 given dpid entries

- **dialplan rmrule \<dpid\> \<prio\>**

  removes all the given 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. \<alerios@debian.org\>, based on opensipsctl manpage by Bogdan-Andrei Iancu \<bogdan@opensips.org\>, for the Debian project (and may be used by others).

## SEE ALSO

**[opensips(8)](/opensips/8.md),**[opensips.cfg(5)](/opensips.cfg/5.md),**[opensipsctl(8)](/opensipsctl/8.md),**[osipsconfig(8)](/osipsconfig/8.md)

Full documentation on opensips is available at *http://www.opensips.org/.*

Mailing lists:

```
users@lists.opensips.org - opensips user community
devel@lists.opensips.org - opensips development, new features and unstable version
```
