2008年11月9日 星期日

kamctl usage

usr/local/sbin/kamctl

Existing commands:

-- command 'start|stop|restart'

restart ............................ restart Kamailio
start .............................. start Kamailio
stop ............................... stop Kamailio

-- command 'acl' - manage access control lists (acl)

acl show [] .............. show user membership
acl grant ....... grant user membership (*)
acl revoke [] .... 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 *
* and 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
............... add a gateway with flags, tag and strip ............
................(flags, tag, and strip are optional arguments) .....
lcr rmgw ..........................................................
............... delete a gateway
lcr addroute .................................
.............. add a route ( use '' to match anything in )
lcr rmroute .................................
.............. delete a route

-- command 'cr' - manage carrierroute tables

cr show ....................................................... show tables
cr reload ..................................................... reload tables
cr dump ....................................................... show in memory tables
cr addrt ..................... add a tree
cr rmrt ....................................... rm a tree
cr addcarrier ................
...............
.........................add a carrier
(prob, strip, rewrite_prefix, rewrite_suffix,...................
flags, mask and comment are optional arguments) ...............
cr rmcarrier ................ rm a carrier

-- command 'rpid' - manage Remote-Party-ID (RPID)

rpid add ......... add rpid for a user (*)
rpid rm ................. set rpid to NULL for a user (*)
rpid show ............... show rpid of a user

-- command 'add|passwd|rm' - manage subscribers

add .......... add a new subscriber (*)
passwd ......... change user's password (*)
rm ...................... delete a user (*)

-- command 'add|dump|reload|rm|show' - manage trusted

trusted show ...................... show db content
trusted dump ...................... show cache content
trusted reload .................... reload db table into cache
trusted add
....................... add a new entry
....................... (from_pattern and tag are optional arguments)
trusted rm ............... 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
.......................... add gateway
dispatcher rmgw ................ delete gateway

-- command 'db' - database operations

db exec ..................... execute SQL query
db roexec ................. execute read-only SQL query
db run ......................... execute SQL query from $id variable
db rorun ....................... execute read-only SQL query from
$id variable
db show ..................... display table content

-- command 'speeddial' - manage speed dials (short numbers)

speeddial show ....... show speeddial details
speeddial list ............. list speeddial for uri
speeddial add [] ...
........................... add a speedial (*)
speeddial rm ....... remove a speeddial (*)
speeddial help ...................... help message
- , must be an AoR (username@domain)
- must be an AoR (username@domain)
- must be a SIP AoR (sip:username@domain)
- a description for speeddial

-- command 'avp' - manage AVPs

avp list [-T table] [-u ]
[-a attribute] [-v value] [-t type] ... list AVPs
avp add [-T table]
............ add AVP (*)
avp rm [-T table] [-u ]
[-a attribute] [-v value] [-t type] ... remove AVP (*)
avp help .................................. help message
- -T - table name
- -u - SIP id or unique id
- -a - AVP name
- -v - AVP value
- -t - AVP name and type (0 (str:str), 1 (str:int),
2 (int:str), 3 (int:int))
- must be an AoR (username@domain)
- must be a string but not AoR

-- command 'alias_db' - manage database aliases

alias_db show .............. show alias details
alias_db list ............. list aliases for uri
alias_db add ...... add an alias (*)
alias_db rm ................ remove an alias (*)
alias_db help ...................... help message
- must be an AoR (username@domain)"
- 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 ................. add the domain to the database
domain rm .................. delete the domain from the database

沒有留言: