siproc

A primitive SIP client that spawns processes for each call
git clone git://xatko.vsos.ethz.ch/siproc.git
Log | Files | Refs | README | LICENSE

commit 794823dd717ced9acef927aa61d113bc65ec4f2f
parent 24a083c1a8f344209edd122686cc065844f061ff
Author: Dominik Schmidt <dominik@schm1dt.ch>
Date:   Mon, 28 Oct 2019 15:39:41 +0100

Improve the example in siproc.1 to be more instructive

Diffstat:
Msiproc.1 | 22+++++++++++++---------
1 file changed, 13 insertions(+), 9 deletions(-)

diff --git a/siproc.1 b/siproc.1 @@ -149,14 +149,14 @@ Call forwarding does not seem to work An example, that plays the file .I message.wav and hangs up afterwords is shown in the following two sections. -.PP -The parent process is made to listen on a named pipe, s.t. an outgoing call can -be placed via some outer process +It calls every SIP URI it gets on the standard input and does the same process as above. . .SS PARENT PROCESS -The parent process can be started as follows, and may then take commands via -the named pipe -.I siproc_in +The parent process can be started as follows, and may then take SIP URIs via standard input. +For every call it receives or places, +.I handler.sh +is executed and passed the name of a file as first argument. +Additionally, the remote ends are recorded in a log file . .PP .EX @@ -165,14 +165,18 @@ export SIPROC_PASSWORD="max1234" export SIPROC_ID_URI='Max Muster <sip:max@sipproxy.com>' export SIPROC_REGISTRAR_URI='sip:sipproxy.com' -mkfifo siproc_in -exec siproc ./handle.sh message.wav <siproc_in +while read uri +do + echo "CALL $uri" +done | siproc ./handle.sh message.wav <siproc_in .EE . .SS HANDLER This is the corresponding handler .I handle.sh -that implements the call automation logic +that implements the call automation logic. +If the call that is being handled is incoming, then the call ist answered first. +Afterwords, the file given on $1 is played, and once that is done, the call hung up. . .PP .EX