Module: sip-router
Branch: master
Commit: bcc002cb9cb1fef569357695ee073d7f531af3c9
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=bcc002c…
Author: Juha Heinanen <jh(a)tutpro.com>
Committer: Juha Heinanen <jh(a)tutpro.com>
Date: Sun May 10 11:37:40 2009 +0300
* Added note on how to generate README of a module.
---
INSTALL | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/INSTALL b/INSTALL
index 4d659b0..e157b9a 100644
--- a/INSTALL
+++ b/INSTALL
@@ -411,6 +411,10 @@ make man
Generates a manpage for all the modules that support it (.xml file in the
module directory).
+make modules=modules_k/foo modules-readme
+
+Generates README file for modules_k/foo.
+
Install:
make prefix=/usr/local install
Module: sip-router
Branch: master
Commit: b477f413dd740862de642790f6b3d80acc61dae0
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=b477f41…
Author: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Committer: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Date: Thu May 7 22:23:12 2009 +0200
sercmd: doc added (README)
---
utils/sercmd/EXAMPLES | 2 +-
utils/sercmd/README | 217 +++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 218 insertions(+), 1 deletions(-)
diff --git a/utils/sercmd/EXAMPLES b/utils/sercmd/EXAMPLES
index b46542d..079dc6a 100644
--- a/utils/sercmd/EXAMPLES
+++ b/utils/sercmd/EXAMPLES
@@ -4,7 +4,7 @@ sercmd usage examples
help:
- sercmd unixd:/tmp/unix_dgram -h
+ sercmd -h
use an udp ser control socket:
ser config:
diff --git a/utils/sercmd/README b/utils/sercmd/README
new file mode 100644
index 0000000..1c9c823
--- /dev/null
+++ b/utils/sercmd/README
@@ -0,0 +1,217 @@
+# $Id$
+#
+# History:
+# --------
+# 2009-05-07 created by Andrei Pelinescu-Onciul <andrei(a)iptel.org>
+
+
+Overview
+========
+
+sercmd is a unix tool for interfacing with sip-router using ser exported RPCs.
+It uses binrpc (a proprietary protocol, designed for minimal packet size and
+fast parsing) over a variety of transports (unix stream sockets, unix datagram
+ sockets, udp or tcp).
+For more details on binrpc see the ctl module documentation
+(modules_s/ctl/README).
+
+sercmd can work in command line mode (the RPC or command name is just another
+command line parameter) or in interactive mode. The interactive mode supports
+history and tab-completion (if sercmd was compiled with libreadline support).
+
+On ser side the ctl module must be loaded.
+
+
+Usage
+=====
+
+ sercmd [options][-s address] [ cmd ]
+
+Options:
+ -s address unix socket name or host name to send the commands on
+ -R name force reply socket name, for the unix datagram socket mode
+ -D dir create the reply socket in the directory <dir> if no reply
+ socket is forced (-R) and an unix datagram socket is selected
+ as the transport
+ -f format print the result using format. Format is a string containing
+ %v at the places where values read from the reply should be
+ substituted. To print '%v', escape it using '%': %%v.
+ -v Verbose
+ -V Version number
+ -h Help message
+address:
+ [proto:]name[:port] where proto is one of tcp, udp, unixs, unix or unixd
+ e.g.: tcp:localhost:2048 , unixs:/tmp/ser_ctl
+ If the protocol is not specified, unixs will be
+ used if name is a filesystem path and udp if not.
+ "unixs" or "unix" stand for unix stream sockets
+ and "unixd" for unix datagram sockets.
+cmd:
+ method [arg1 [arg2...]]
+arg:
+ string or number; to force a number to be interpreted as string
+ prefix it by "s:", e.g. s:1
+
+If no address is specified (no -s), sercmd will use by default
+unixs:/tmp/ser_ctl. This is also the default for the ctl module (if no
+ "binrpc" module parameters are present in the config).
+
+
+Command Types
+=============
+
+There are 3 types of commands: "raw" ser RPC, sercmd aliases and sercmd
+ builtins.
+
+The "raw" RPC commands work directly with ser with no change on the input or
+ the output.
+All the RPCs can be seen using sercmd ls.
+
+The aliases are just other easier to remember names for some ser RPCs, which
+some time include nicer formatting of the rpc result.
+One can see all the defined aliases using: sercmd help|grep alias: .
+Example:
+ ps is an alias for core.ps with the output formatted in a more readable way.
+ sercmd ps is equivalent to sercmd -f"%v\t%v\n" core.ps.
+ Without the formatting, the output of sercmd core.ps looks like:
+
+11262
+attendant
+11268
+udp receiver child=0 sock=127.0.0.1:5060
+...
+ Using sercmd ps (or sercmd -f"%v\t%v\n" core.ps) the output looks like:
+
+11262 attendant
+11268 udp receiver child=0 sock=127.0.0.1:5060
+...
+
+The built-in commands can combine several different rpcs.
+One can see all the built-in commands using: sercmd help|grep builtin: .
+
+
+Getting help on a command
+=========================
+
+To get the help message associated with a command use
+sercmd help <command_name>.
+Example:
+$ sercmd help ps
+ps is an alias for core.ps with reply formatting: "%v\t%v\n"
+$ sercmd help core.ps
+Returns the description of running SER processes.
+
+
+Listing all the commands
+========================
+
+To see all the available commands (ser RPCs, aliases and bultins) use
+ sercmd help.
+To see only the "raw" RPCs, user sercmd ls.
+Note: since each module can define its own RPCs, the available RPCs depend
+ on the loaded modules.
+
+
+Examples
+========
+
+Using the default socket (requires only loadmodule "ctl" in ser.cfg):
+
+$ sercmd ps
+11262 attendant
+11268 udp receiver child=0 sock=127.0.0.1:5060
+11269 udp receiver child=1 sock=127.0.0.1:5060
+11270 udp receiver child=0 sock=192.168.1.101:5060
+11271 udp receiver child=1 sock=192.168.1.101:5060
+11272 slow timer
+11273 timer
+11274 ctl handler
+11275 tcp receiver child=0
+11276 tcp receiver child=1
+11277 tcp main process
+
+$ sercmd help # list all the supported commands
+dst_blacklist.add
+ctl.who
+...
+
+$ sercmd help core.uptime # help for the core.uptime rpc
+Returns uptime of SER server.
+
+$ sercmd cfg.cfg_set_int_now debug 5 # turn debug level to 5 (needs cfg)
+
+$ sercmd # enters interactive mode
+
+Using a tcp socket
+(assumes modparam("ctl", "binrpc", "tcp:localhost:2048") in ser.cfg)
+
+$ sercmd -s tcp:localhost:2048 core.version
+Server: Sip EXpress router (2.1.0-dev23-make (i386/linux))
+
+$ sercmd -s tcp:localhost:2048 SRV _sip._udp.iptel.org
+ name: _sip._udp.iptel.org
+ type: SRV
+ size (bytes): 104
+ reference counter: 2
+ expires in (s): 67693
+ last used (s): 0
+ error flags: 0
+ rr name: sip.iptel.org
+ rr port: 5060
+ rr priority: 0
+ rr weight: 0
+ rr expires in (s): 67693
+ rr error flags: 0
+
+sercmd -s tcp:127.0.0.1:2048 # enters interactive mode over tcp
+
+For more examples see utils/sercmd/EXAMPLES
+ [http://git.sip-router.org/cgi-bin/gitweb.cgi?p=sip-router;a=blob;f=utils/se…].
+
+
+Interactive Mode
+================
+
+To enter the interactive mode start sercmd without specifying a command name
+ on the command line.
+If sercmd was compiled with libreadline support (automatically if
+libreadline dev files are installed), the interactive mode will have tab
+completion and history support.
+
+Example:
+
+$ sercmd
+sercmd 0.1
+Copyright 2006 iptelorg GmbH
+This is free software with ABSOLUTELY NO WARRANTY.
+For details type `warranty'.
+sercmd> core.s<tab>
+core.sctp_info core.sctp_options core.shmmem
+sercmd> help core.shmmem
+Returns shared memory info.
+sercmd> core.shmmem
+{
+ total: 33554432
+ free: 33147816
+ used: 190644
+ real_used: 406616
+ max_used: 406616
+ fragments: 2
+}
+sercmd> quit
+
+
+Related Stuff
+=============
+
+
+ctl module: required, implements binrpc on ser side, without it sercmd
+doesn't work.
+See modules_s/ctl/README
+ [http://git.sip-router.org/cgi-bin/gitweb.cgi?p=sip-router;a=blob;f=modules_…].
+
+cfg_rpc module: allows setting or reading configuration parameters on-the-fly.
+For example one could change the tcp connection lifetime to 180s using:
+$ sercmd cfg.set_now_int tcp.connection_lifetime 180
+See modules_s/cfg_rpc/README
+ [http://git.sip-router.org/cgi-bin/gitweb.cgi?p=sip-router;a=blob;f=modules_…].
(forwarding to sr-dev).
Jan.
On 07-05 14:34, Jan Janak wrote:
> On 07-05 14:22, Henning Westerholt wrote:
> > On Sonntag, 3. Mai 2009, Daniel-Constantin Mierla wrote:
> > > 1. Admin Guide
> > >
> > > - 1.1. Overview
> > > - 1.2. Dependencies
> > > [..]
> > > + 1. Overview
> > > + 2. Dependencies
> >
> > Hi Jan,
> >
> > i noticed that the READMEs generated for modules_k looks now a bit
> > different then the ones generated for the modules_s. The k ones uses "1.",
> > the s ones "1.1", for the first chapter for example.
>
> This is because docbook documents in ser modules start with <section>, not
> <book>, we do not use <book> and <chapter> tags anymore in our docbook
> documents because it makes it hard to include such documents into other
> documents.
>
> > Another thing that is
> > missing both of them is modules_s READMEs, is the list of the examples. Is
> > this a bug or do you wanted to change this?
>
> This was intentional. I think it makes no sense to have lists of examples in
> short plain-text documents like the READMEs (there are no page numbers
> anyway).
>
> I have also removed the list of functions and parameters. I think such lists
> are only useful if you have page numbers, so that you can jump to the
> corresponding function/parameter/example quickly, but READMEs have no page
> numbers and the less boilerplate we have at the beginning of the document the
> better, IMHO.
>
> Nevertheless, if people think that READMEs should have lists of functions and
> parameters at the beginning, I can modify the templates and put it back.
>
> Jan.
Module: sip-router
Branch: master
Commit: 030e80b538e6ec3f29a73fcc5660af86cb385926
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=030e80b…
Author: Henning Westerholt <henning.westerholt(a)1und1.de>
Committer: Henning Westerholt <henning.westerholt(a)1und1.de>
Date: Thu May 7 18:09:11 2009 +0200
test: port r5833 from kamailio
---
test/unit/3.sh | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/test/unit/3.sh b/test/unit/3.sh
index b336d8d..a5f808f 100755
--- a/test/unit/3.sh
+++ b/test/unit/3.sh
@@ -19,8 +19,9 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-# Needs a mysql database, the root user password must be given
-# in the file 'dbrootpw' in the test directory
+# Needs a mysql database, the root user password must be assigned to
+# the 'PW' variable in the file 'dbrootpw' in the test directory, e.g.:
+# PW=sql_root_passwd
source include/common
@@ -46,7 +47,7 @@ sed -i "s/TEST=\"false\"/TEST=\"true\"/g" $DBCTL
# set the mysql root password
cp $DBCTL.mysql $DBCTL.mysql.bak
-sed -i "s/#PW=""/PW="$PW"/g" $DBCTL.mysql
+sed -i "s/#PW=\"\"/PW=\"$PW\"/g" $DBCTL.mysql
./$DBCTL create $tmp_name > /dev/null
ret=$?
@@ -62,4 +63,4 @@ mv $DBCTL.mysql.bak $DBCTL.mysql
mv $DBCTL.bak $DBCTL
cd ../test
-exit $ret
\ No newline at end of file
+exit $ret