Skip to contentSkip to conversation

voicecall: fix release and answer existing call validation

PATCH In review Mike Brudevold 2 participants 3 messages Apr 19, 2012 – Apr 21, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 voicecall: fix release and answer existing call validation

From: Michael Brudevold <[email protected]>

Release and answer should be allowed when there are held calls as well as the existing check for waiting calls. Most implementations use AT+CHLD=1 which will resume the other call, be it waiting or held. This follows the HFP, GSM 07.07 and 3GPP 27.007 specs.

---
 src/voicecall.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
src/voicecall.c +1 -1
index 263f1ee..2d261bf 100644
@@ -1684,7 +1684,7 @@ static DBusMessage *manager_release_and_answer(DBusConnection *conn,
 	if (vc->pending || vc->dial_req || vc->pending_em)
 		return __ofono_error_busy(msg);
 
-	if (!voicecalls_have_waiting(vc))
+	if (!(voicecalls_have_waiting(vc) || voicecalls_have_held(vc)))
 		return __ofono_error_failed(msg);
 
 	if (vc->driver->release_all_active == NULL)
Signature · 1 line
1.7.5.4
#1 lore raw

Hi Michael,

Quoted 10 lines · Mike Brudevold

From: Michael Brudevold <[email protected]>

Release and answer should be allowed when there are held calls as well as the existing check for waiting calls. Most implementations use AT+CHLD=1 which will resume the other call, be it waiting or held. This follows the HFP, GSM 07.07 and 3GPP 27.007 specs.

---
 src/voicecall.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

This isn't really a bug, but an explicit choice we made with the API. See the previous discussion here:
http://lists.ofono.org/pipermail/ofono/2011-January/008029.html.

For HFP this is further made funny by the fact that CHLD=1X is supposed to retrieve the held call automatically for you by the AG according to section 4.32.1, making CHLD=1 behavior in question somewhat redundant.

However, I do see that this could be useful, so I suggest we add a new ReleaseAndSwap method. I prefer this approach especially since the current D-Bus API is frozen and I don't want to modify the behavior of existing methods.

Regards,
-Denis

author
#2 lore raw

Hi Denis,

Quoted 22 lines · Denis Kenzior

Hi Michael,

Quoted 10 lines · Mike Brudevold

From: Michael Brudevold <[email protected]>

Release and answer should be allowed when there are held calls as well as the existing check for waiting calls.  Most implementations use AT+CHLD=1 which will resume the other call, be it waiting or held.  This follows the HFP, GSM 07.07 and 3GPP 27.007 specs.
---
 src/voicecall.c |    2 +-

 1 files changed, 1 insertions(+), 1 deletions(-)

This isn't really a bug, but an explicit choice we made with the API. See the previous discussion here:
http://lists.ofono.org/pipermail/ofono/2011-January/008029.html.

For HFP this is further made funny by the fact that CHLD=1X is supposed to retrieve the held call automatically for you by the AG according to section 4.32.1, making CHLD=1 behavior in question somewhat redundant.

Quoted 7 lines

However, I do see that this could be useful, so I suggest we add a new ReleaseAndSwap method.  I prefer this approach especially since the current D-Bus API is frozen and I don't want to modify the behavior of existing methods.

Regards,
-Denis

Sounds good to me. Clearly not having the ability to do this is annoying to more than just me! My first solution was as you proposed before where the active call was hungup, but that left the held call on hold. Not having read the spec fully yet left me a bit confused as to why I would want that behavior. So, the preferred solution is getting this all done in one step, and ReleaseAndSwap should do nicely.

Mike