================================================================= usage: opensipsdbctl create <db name or db_path, optional> .....(creates a new database) 新建一个数据库 opensipsdbctl drop <db name or db_path, optional> .......(!entirely deletes tables!) 完全删除一个数据库 opensipsdbctl reinit <db name or db_path, optional> .....(!entirely deletes and than re-creates tables!) 删除后再新建 opensipsdbctl backup <file> .............................(dumps current database to file) 当前数据库的转储文件 opensipsdbctl restore <file> ............................(restores tables from a file) 从文件中恢复表 opensipsdbctl copy <new_db> .............................(creates a new db from an existing one) 模板新建一个数据库 opensipsdbctl migrate <old_db> <new_db> ................. (migrates DB from 1.2 to 1.3, not implemented yet!) ? opensipsdbctl presence ...................................(adds the presence related tables) 添加相关表的存在 opensipsdbctl extra ......................................(adds the extra tables) 增加额外的表 if you want to manipulate database as other database user than root, want to change database name from default value "opensips", or want to use other values for users and password, edit the "config vars" section of the command opensipsdbctl. =================================================================== Existing commands: -- command 'start|stop|restart' restart ............................ restart OpenSIPS 重启 start .............................. start OpenSIPS 开始 stop ............................... stop OpenSIPS 停止 =================================================================== -- command 'acl' - manage access control lists (acl) 管理访问控制列表 acl show [<username>] .............. show user membership 显示用户成员 acl grant <username> <group> ....... grant user membership (*) 授予用户会员 acl revoke <username> [<group>] .... grant user membership(s) (*) 撤销用户会员 =================================================================== -- command 'lcr' - manage least cost routes (lcr) 最低成本路由管理? * IP addresses must be entered in dotted quad format e.g. 1.2.3.4 * * <uri_scheme> and <transport> must be entered in integer or text,* * e.g. transport '2' is identical to transport 'tcp'. * * scheme: 1=sip, 2=sips; transport: 1=udp, 2=tcp, 3=tls * * Examples: lcr addgw level3 1.2.3.4 5080 sip tcp 1 * * lcr addroute +1 '' 1 1 * lcr show ....................... show routes, gateways and groups 显示路由、网关和群组 lcr reload ..................... reload lcr gateways 重新载入网关 lcr addgw <gw_name> <ip> <port> <scheme> <transport> <grp_id> <flags> <tag> <strip> ............... add a gateway with flags, tag and strip 以选项 flags tag strip (必选项)添加网关 lcr rmgw <gw_name> ............ delete a gateway 删除一个网关 lcr addroute <prefix> <from> <grp_id> <prio> ................ .............. add a route ( use '' to match anything in <from> ) 以选项 prefix from grp_id prio (必选项)添加网关 lcr rmroute <prefix> <from> <grp_id> <prio> .... delete a route 删除一个路由 ==================================================================== -- command 'cr' - manage carrierroute tables 管理 carrierroute 表 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 增加一个 carrier (prob, strip, rewrite_prefix, rewrite_suffix,................... flags, mask and comment are optional arguments) ............... cr rmcarrier <carrier> <scan_prefix> <domain> ................ rm a carrier 删除一个 carrier ===================================================================== -- command 'rpid' - manage Remote-Party-ID (RPID) 管理远程?ID rpid add <username> <rpid> ......... add rpid for a user (*) 为一个用户新建一个 rpid rpid rm <username> ................. set rpid to NULL for a user (*) 设置为空? rpid show <username> ............... show rpid of a user 显示一个 rpid 用户的信息 ================================================================== -- 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 trusted 信任管理 trusted show ...................... show db content 显示db 内容 trusted dump ...................... show cache content 显示缓存的内容 trusted reload .................... reload db table into cache 加载 db 表到缓存中 trusted add <src_ip> <proto> <from_pattern> <tag> ....................... add a new entry 新建一个新条目,from_pattern tag 为必选项 ....................... (from_pattern and tag are optional arguments) trusted rm <src_ip> ............... remove all entres for the given src_ip 删除指定的 ? ================================================================= -- command 'dispatcher' - manage dispatcher 调度管理 * Examples: dispatcher addgw 1 sip:1.2.3.1:5050 1 'outbound gateway' * dispatcher addgw 2 sip:1.2.3.4:5050 3 '' * dispatcher rmgw 4 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 执行SQL 查询 db roexec <roquery> ................. execute read-only SQL query 执行只读 SQL 查询 db run <id> ......................... execute SQL query from $id variable 执行从 ID 变量的SQL查询 db rorun <id> ....................... execute read-only SQL query from 执行从 ID 变量的只读 SQL查询 $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 快速拨号帮助信息 - <speeddial-id>, <sd-id> must be an AoR (username@domain) - <sip-id> must be an AoR (username@domain) - <new-uri> must be a SIP AoR (sip:username@domain) - <desc> a description for speeddial 快速拨号列表信息 ================================================================== -- command 'avp' - manage AVPs AVPs 管理 avp list [-T table] [-u <sip-id|uuid>] [-a attribute] [-v value] [-t type] ... list AVPs AVPs 列表 avp add [-T table] <sip-id|uuid> <attribute> <type> <value> ............ add AVP (*) 新建 AVPs avp rm [-T table] [-u <sip-id|uuid>] [-a attribute] [-v value] [-t type] ... remove AVP (*) 删除 AVPs avp help .................................. help message AVPs 帮助信息 - -T - table name 表的名字 - -u - SIP id or unique id sip is 或 唯一表示 - -a - AVP name AVPs 的名字 - -v - AVP value AVPs 变量 - -t - AVP name and type (0 (str:str), 1 (str:int), 2 (int:str), 3 (int:int)) - <sip-id> must be an AoR (username@domain) - <uuid> must be a string but not AoR ================================================================== -- command 'alias_db' - manage database aliases 别名数据库管理 alias_db show <alias> .............. show alias details 显示别名书库据库信息 alias_db list <sip-id> ............. list aliases for uri 显示别名数据库中用户 id 的信息 alias_db add <alias> <sip-id> ...... add an alias (*) 新建一个别名数据库 alias_db rm <alias> ................ remove an alias (*) 删除一个别名数据库 alias_db help ...................... help message 别名数据库帮助信息 - <alias> must be an AoR (username@domain)" - <sip-id> must be an AoR (username@domain)" ================================================================= -- 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 'cisco_restart' - restart CISCO phone (NOTIFY) 重启思科电话 cisco_restart <uri> ................ restart phone configured for <uri> -- 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 一个 sip 的URL 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 以短格式显示在线用户的 ram? 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 'fifo' fifo ............................... send raw FIFO command 发送原始 fifo 命令 |
|
来自: shangat > 《Linux 文章》