[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Linphone-developers] Linphonecsh return status flag for ringing

From: Henrik Pauli
Subject: [Linphone-developers] Linphonecsh return status flag for ringing
Date: Mon, 04 May 2015 16:47:53 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0

I couldn't find if I have sent a mail about this before, so here goes again.
Just like off-hook, autoanswer and so on, it would be nice if it were possible to detect ringing via linphonecsh.

I have a patch for it, though I left out a number from the flags just to avoid clashing with you if in the meantime you extend them. You could change it of course. What do you think?

diff --git a/console/shell.c b/console/shell.c
index 7a502ec..77b2245 100644
--- a/console/shell.c
+++ b/console/shell.c
@@ -48,6 +48,7 @@
 #define STATUS_AUTOANSWER (1<<3)
 #define STATUS_IN_CONNECTED (1<<4) /* incoming call accepted */
 #define STATUS_OUT_CONNECTED (1<<5) /*outgoing call accepted */
+#define STATUS_INCOMING (1<<7)

 static int make_status_value(const char *status_string){
@@ -70,6 +71,9 @@ static int make_status_value(const char *status_string){
     if (strstr(status_string,"hook=answered")){
+ if (strstr(status_string,"ncoming call from")){ // was "incoming" around 3.6, "Incoming" in 3.8
+        ret|=STATUS_INCOMING;
+    }
     return ret;

reply via email to

[Prev in Thread] Current Thread [Next in Thread]