siproc

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

commit 7c47624c49bed6f39f4d513ea9e48040c5cabbef
parent a54a9b5a0b7c146dfa186d77bf29f4e6554eb648
Author: Dominik Schmidt <dominik@schm1dt.ch>
Date:   Sat, 31 Aug 2019 22:10:28 +0200

Add a manpage

Diffstat:
Asiproc.1 | 113+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 113 insertions(+), 0 deletions(-)

diff --git a/siproc.1 b/siproc.1 @@ -0,0 +1,113 @@ +.TH siproc 1 "2019-08-31" "0.0.1" "siproc man page" +.SH NAME +siproc \- a SIP softphone spawning processes for calls +.SH SYNOPSIS +.SY +siproc [EXECUTABLE] +.YS +.SH DESCRIPTION +siproc is a SIP client, that spawns a given process for every incoming or outgoing call. +Using standard input and output, these processes can interact with the peer and do tasks +like answering calls, playing files and many more. +The account settings and other configuration are read via environment variables. +.SS MAIN PROGRAM COMMANDS +The main program reads some commands on stdin, terminated by newlines: +.TP +.B QUIT +Terminates the program, disconnecting all calls. +.TP +.B CALL [SIP URI] +Call a number, with +.B SIP URI +the address to be called, e.g. sip:contact@remote.tld +.SS SUBPROCESS ENVIRONMENT VARIABLES +The processes invoked by siproc are passed various environment variables: +.TP +.B SIPROC_REMOTE_URI +The SIP URI of the remote end +.TP +.B SIPROC_REMOTE_ID +Some pjsip interna, look it up in their documentation of the struct CallInfo +.TP +.B SIPROC_REMOTE_CONTACT +Some pjsip interna, look it up in their documentation of the struct CallInfo +.TP +.B SIPROC_OUTGOING +Whether the call being handled by this process is an incoming call (="n") or an +outgoing call (="y") +.SS SUBPROCESS COMMANDS +The process can then give commands via stdout and read events via stdin. +Each command or event is separated by a newline ('\n'). +The following commands are supported: +.TP +.B RINGING +Let's the remote end know that we are ringing. +.TP +.B ANSWER +Answer an incoming call +.TP +.B HANGUP +Hang up a call +.TP +.B TRANSFER [URI] +Redirect a call to an URI of the form sip:contact@remote +.TP +.B DTMF [STRING] +Dial the DTMF tones of each character in +.B STRING +.TP +.B PLAY [FILE] +Play a file from a given path, relative to the current working directory of the +main siproc process. Multiple files can be played at the same time. +.TP +.B STOP +Stop the file that has been added last. +.TP +.B MESSAGE [STRING] +Send a SIP message to the remote side +.TP +.B RECORD [FILE] +Record the conversation to the given file. If no file is given, the current recording is stopped. +.SS SUBPROCESS EVENTS +The following events can be read on stdin: +.TP +.B DTMF [CHARACTER] +When the client receives a DTMF character +.TP +.B CONNECTED +When the remote end has picked up the phone +.TP +.B STOPPED [FILE] +Playback of the given file has finished. This is also given when a file has been stopped +with the +.B STOP +command +.TP +.B MESSAGE [STRING] +The given message has been received. +.SS CALL TERMINATION +When the remote end hangs up, or the call is terminated in any other manner, +the process is killed via SIGTERM, so a program can catch that signal for cleaning up. +.SH ENVIRONMENT +Configuration parameters are given via environment variables +.TP +.B SIPROC_REGISTRAR_URI +The server siproc should connect to, as a SIP URI (e.g "sip:myserver.tld") +.TP +.B SIPROC_ID_URI +The ID URI of the account used, e.g. "Full Name <sip:Account@myserver.lan>" +.TP +.B SIPROC_USERNAME +The username of the account +.TP +.B SIPROC_USERNAME +The password of the account +.TP +.B SIPROC_TRANSPORT_PORT +The port used by siproc. This variable is optional, and defaults to 5060. +If you want to run multiple instances of siproc on the same machine, set it to different values. +.SH BUGS +Call forwarding does not seem to work +.SH AUTHOR +Dominik Schmidt (dominik@schm1dt.ch) +