siproc

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

commit ef5fc39099d760490f648ac068f72ce8d7b7b2c7
parent de9df97c239128eb35cc77ae8ef8d23753595e9e
Author: Dominik Schmidt <dominik@schm1dt.ch>
Date:   Sat, 31 Aug 2019 20:48:50 +0200

Rename the readme to uppercase

Diffstat:
README.md | 70++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Readme.md | 70----------------------------------------------------------------------
2 files changed, 70 insertions(+), 70 deletions(-)

diff --git a/README.md b/README.md @@ -0,0 +1,70 @@ +SiProc +====== + +SiProc is a primitive SIP Client used for call automatization by spawning a given process for each call. +It uses the [pjsip](http://www.pjsip.org/) library as a backend. + +Usage +----- + +The main process can be started as follows: + +``` +$ export SIPROC_REGISTRAR_URI="sip:myserver.lan" +$ export SIPROC_ID_URI="Full Name <sip:Account@myserver.lan>" +$ export SIPROC_USERNAME="Account" +$ export SIPROC_PASSWORD="secret" +$ ./siproc /path/to/executable args... +``` + +Additionally, one may define any of the following, which default to the values in the readme: + +``` +$ export SIPROC_TRANSPORT_PORT="5060" +``` + +### 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 + +* 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. Multiple files can be played at the same time. +* `STOP`: Stop the file that has been added last. +* `MESSAGE <msg>`: Send a SIP message to the remote side +* `RECORD </path/to/file.wav>`: Record the conversation to the given file. If no file is given, the current recording is stopped. + +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 +----- + +* [ ] Expose more of pjsips features to the process! +* [ ] Allow connecting to alsa devices + diff --git a/Readme.md b/Readme.md @@ -1,70 +0,0 @@ -SiProc -====== - -SiProc is a primitive SIP Client used for call automatization by spawning a given process for each call. -It uses the [pjsip](http://www.pjsip.org/) library as a backend. - -Usage ------ - -The main process can be started as follows: - -``` -$ export SIPROC_REGISTRAR_URI="sip:myserver.lan" -$ export SIPROC_ID_URI="Full Name <sip:Account@myserver.lan>" -$ export SIPROC_USERNAME="Account" -$ export SIPROC_PASSWORD="secret" -$ ./siproc /path/to/executable args... -``` - -Additionally, one may define any of the following, which default to the values in the readme: - -``` -$ export SIPROC_TRANSPORT_PORT="5060" -``` - -### 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 - -* 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. Multiple files can be played at the same time. -* `STOP`: Stop the file that has been added last. -* `MESSAGE <msg>`: Send a SIP message to the remote side -* `RECORD </path/to/file.wav>`: Record the conversation to the given file. If no file is given, the current recording is stopped. - -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 ------ - -* [ ] Expose more of pjsips features to the process! -* [ ] Allow connecting to alsa devices -