* [PATCH] hfp: Handle extra CCWA event
@ 2015-08-18 17:53 Kuba Pawlak
2015-08-24 21:29 ` Denis Kenzior
0 siblings, 1 reply; 2+ messages in thread
From: Kuba Pawlak @ 2015-08-18 17:53 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 2340 bytes --]
When a call is waitng, CCWA event is sent and call object
in state WAITING is created. on ReleaseAndAnswer it is
promoted to INCOMING and later to ACTIVE.
iPhones send an extra CCWA event when active call is ended.
This extra event is creating a second call object in state
WAITING. It is not possible to have two WAITING calls, but
previously waiting call was already promoted to INCOMING.
For a brief time we have two calls from the same number,
one INCOMING and one WAITING. Later WAITING one is removed.
As we cannot have a waiting and incoming call at the same
time, ignore CCWA when there is already an INCOMING call.
< \r\n+CIEV: 3,3\r\n
< \r\n+CIEV: 2,1\r\n
< \r\n+CIEV: 3,0\r\n
< \r\n+CCWA: "01234567890",129,1,"Me"\r\n
< \r\n+CIEV: 3,1\r\n
> AT+CLCC\r
< \r\n+CLCC: 1,0,0,0,0,"09876543210",129,"Me"\r\n
< \r\n+CLCC: 2,1,5,0,0,"01234567890",129,"Me"\r\n
< \r\nOK\r\n
< \r\n+CIEV: 2,0\r\n
< \r\n+CCWA: "01234567890",129,1,"Me"\r\n
< \r\n+CIEV: 2,1\r\n
< \r\n+CIEV: 3,0\r\n
> AT+CLCC\r
< \r\n+CLCC: 2,1,0,0,0,"01234567890",129,"Me"\r\n
< \r\nOK\r\n
---
drivers/hfpmodem/voicecall.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/hfpmodem/voicecall.c b/drivers/hfpmodem/voicecall.c
index 7542fe4bd41424774dc888e11a6afed4b159f546..b6e0886c8d62e667421b0f5d43ac1565c94e0838 100644
--- a/drivers/hfpmodem/voicecall.c
+++ b/drivers/hfpmodem/voicecall.c
@@ -712,6 +712,16 @@ static void ccwa_notify(GAtResult *result, gpointer user_data)
at_util_call_compare_by_status))
return;
+ /* some phones may send extra CCWA after active call is ended
+ * this would trigger creation of second call in state 'WAITING'
+ * as our previous WAITING call has been promoted to INCOMING
+ */
+ if (g_slist_find_custom(vd->calls,
+ GINT_TO_POINTER(CALL_STATUS_INCOMING),
+ at_util_call_compare_by_status))
+ return;
+
+
g_at_result_iter_init(&iter, result);
if (!g_at_result_iter_next(&iter, "+CCWA:"))
--
1.7.11.7
Intel Deutschland GmbH
Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de
Managing Directors: Christin Eisenschmid, Prof. Dr. Hermann Eul
Chairperson of the Supervisory Board: Tiffany Doon Silva
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] hfp: Handle extra CCWA event
2015-08-18 17:53 [PATCH] hfp: Handle extra CCWA event Kuba Pawlak
@ 2015-08-24 21:29 ` Denis Kenzior
0 siblings, 0 replies; 2+ messages in thread
From: Denis Kenzior @ 2015-08-24 21:29 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 758 bytes --]
Hi Kuba,
On 08/18/2015 12:53 PM, Kuba Pawlak wrote:
> When a call is waitng, CCWA event is sent and call object
> in state WAITING is created. on ReleaseAndAnswer it is
> promoted to INCOMING and later to ACTIVE.
> iPhones send an extra CCWA event when active call is ended.
> This extra event is creating a second call object in state
> WAITING. It is not possible to have two WAITING calls, but
> previously waiting call was already promoted to INCOMING.
> For a brief time we have two calls from the same number,
> one INCOMING and one WAITING. Later WAITING one is removed.
> As we cannot have a waiting and incoming call at the same
> time, ignore CCWA when there is already an INCOMING call.
>
Applied, thanks.
Regards,
-Denis
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-08-24 21:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-18 17:53 [PATCH] hfp: Handle extra CCWA event Kuba Pawlak
2015-08-24 21:29 ` Denis Kenzior
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.