siproc

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

commit 5a2b05eb8a228121115ffaed227844f5632ec402
parent 0880d8d2213242094b3fb244452a5b5708316c92
Author: Dominik Schmidt <dominik@schm1dt.ch>
Date:   Sat, 10 Aug 2019 22:50:01 +0200

Explain the new commands in the readme

Diffstat:
Readme.md | 16+++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/Readme.md b/Readme.md @@ -17,6 +17,13 @@ $ export SIPROC_PASSWORD="secret" $ ./siproc /path/to/executable args... ``` +### Main Control + +The siproc executable takes multiple commands on stdin: + +* `QUIT`: Shuts down the program +* `CALL sip:contact@remote`: Call the given sip URI + ### Calls Whenever a call is made or received, `/path/to/executable` is executed, and is given the following environment variables @@ -24,26 +31,33 @@ Whenever a call is made or received, `/path/to/executable` is executed, and is g * SIPROC_REMOTE_URI: The address of the caller * SIPROC_REMOTE_ID: Some pjsip interna, look up their documentation * SIPROC_REMOTE_CONTACT: Ditto +* SIPROC_OUTGOING: Whether a call is being made (SIPROC_OUTGOING="y") or received (SIPROC_OUTGOING="n") The program can then perform actions via STDIO. Each command is separated by a newline ('\n'). The following commands are supported: +* `RINGING`: Let's the remote end know that we are ringing. * `ANSWER`: Answer an incoming call * `HANGUP`: Hang up a call +* `TRANSFER sip:contact@remote`: Redirect a call * `DTMF string`: Dial the DTMF tones of each character in `string` * `PLAY /path/to/file.wav`: Play a file +* `STOP`: Stop the file that has been added last. +* `MESSAGE <msg>`: Send a SIP message to the remote side The following lines can be received via stdin: * `DTMF c`: When the client receives the DTMF character `c` +* `CONNECTED`: When the remote end has picked up the phone +* `STOPPED /path/to/file.wav`: Playback of the given file has been terminated. +* `MESSAGE <msg>`: The remote end has sent a message. When the remote end hangs up, the process is killed via SIGTERM, so you might want to catch that signal for cleaning up. To-Do ----- -* [ ] Making calls * [ ] Recording audio * [ ] Expose more of pjsips features to the process!