[Kamailio-Users] new feature: execute mi commands via rpc

Daniel-Constantin Mierla miconda at gmail.com
Tue Jun 30 12:56:39 CEST 2009


Hello,

there is a new module in repository that allow you to execute most of 
the mi commands from Kamailio modules (see readme) via RPC interface 
inherited from SER:
http://sip-router.org/docbook/sip-router/branch/master/modules/mi_rpc/mi_rpc.html
http://sip-router.org/docbook/sip-router/branch/master/rpc/ser_rpc.html

One of the nicest things you can out of this is usage of sercmd - 
command line interface tool. It is located in utils/sercmd. Thanks to 
Andrei, sercmd does now tab completion for mi command.

How to use it:
- get sip router from git:

git clone --depth 1 git://git.sip-router.org/sip-router
cd sip-router
make all

- add to your config file:
loadmodule "ctl.so" # located in 'modules_s'
loadmodule "mi_rpc.so" # located in 'modules'

- use sercmd
cd utils/sercmd
make
./sercmd

Then you should get:

sercmd> mi <tab><tab>
arg              nh_show_rtpp     t_reply          ul_rm_contact
cleanup          ps               t_uac_cancel     ul_show_contact
debug            pwd              t_uac_dlg        uptime
dum              refreshWatchers  ul_add           version
kill             shv_get          ul_dump          which
nh_enable_ping   shv_set          ul_flush         
nh_enable_rtpp   t_hash           ul_rm

sercmd> mi uptime
200 OK

+ Now:: Tue Jun 30 12:47:54 2009
+ Up since:: Tue Jun 30 12:47:26 2009
+ Up time:: 28 [sec]

Via sercmd you can control lot of internals at runtime -- see 'help' 
command -- more about:
http://git.sip-router.org/cgi-bin/gitweb.cgi?p=sip-router;a=blob_plain;f=utils/sercmd/README;hb=HEAD

Enjoy,
Daniel

-- 
Daniel-Constantin Mierla
http://www.asipto.com/




More information about the Users mailing list