siproc

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

commit 4039acfc61c5d22db371970b44bfc8607f269e18
parent 50c36d24da7e233ea641a888a58c86ad57f2cfd3
Author: Dominik Schmidt <dominik@schm1dt.ch>
Date:   Mon, 22 Jul 2019 14:36:59 +0200

Implement the ringing command

On incoming calls this leads to the caller hearing a ringing-tone,
i.e. telling him that there is a phone on the other end that is
waiting to be picked up.

Diffstat:
src/siproc.cpp | 9+++++++++
1 file changed, 9 insertions(+), 0 deletions(-)

diff --git a/src/siproc.cpp b/src/siproc.cpp @@ -220,6 +220,12 @@ public: AudioMedia& play_dev_med=playdev(); player.stopTransmit(play_dev_med); } + + void cmd_ringing(){ + CallOpParam prm; + prm.statusCode = PJSIP_SC_RINGING; + answer(prm); + } void command_machine(char *command){ @@ -248,6 +254,9 @@ public: else if(strcmp(command, "RECORD")==0){ cmd_record(args); } + else if(strcmp(command, "RINGING")==0){ + cmd_ringing(); + } } void handle_line(){