siproc

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

commit 93bd13c4d02519ad69c6daf84a34e5f5983017e2
parent 3e79a540801f2df587407f977a3055c29baef2fa
Author: Dominik Schmidt <dominik@schm1dt.ch>
Date:   Sat, 10 Aug 2019 19:18:18 +0200

Implement the transfer command.

This redirects a call to another sip URI

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

diff --git a/src/siproc.cpp b/src/siproc.cpp @@ -259,6 +259,13 @@ class MyCall: public Call{ answer(prm); } + void cmd_transfer(char *number){ + CallOpParam prm; + + prm.statusCode = PJSIP_SC_RINGING; + xfer(std::string(number), prm); + } + void command_machine(char *command){ char *args = strstr(command, " "); @@ -290,6 +297,9 @@ class MyCall: public Call{ else if(strcmp(command, "RINGING") == 0){ cmd_ringing(); } + else if(strcmp(command, "TRANSFER") == 0){ + cmd_transfer(args); + } } void handle_line(){