siproc

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

commit 26d40a942400fbc654934094e8bda4df9a4ffb1f
parent 87865cacdd9f24a606050cf5e9142f48a195faee
Author: Dominik Schmidt <dominik@schm1dt.ch>
Date:   Sat, 16 Nov 2019 21:51:59 +0100

Add the connected() function to MyCall

This reports back whether the call is currently connected to
a remote end or not.

This will later be used to determine whether we should execute
a certain command or not

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

diff --git a/src/siproc.cpp b/src/siproc.cpp @@ -200,6 +200,11 @@ class MyCall: public Call{ command("CONNECTED\n"); } } + + bool connected(){ + CallInfo ci = getInfo(); + return ci.state == PJSIP_INV_STATE_CONFIRMED; + } bool onPlayerFinished(char *path, MyAudioMediaPlayer* who){ command("STOPPED %s\n", path);