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:
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);