Hi Kuba,

On 08/06/2015 11:56 AM, Kuba Pawlak wrote:
Dial() method is generic for all modems but hfpmodem may not support some dial
strings. HFP 1.6 SPEC for ATD says: "Only voice calls are covered in this
specification."
Problem is with dialling USSD codes. Request is accepted and a call object
is state dialling is created. USSD code is completed, result displays on
the phone, but there are no events that would allow oFono to remove this fake
call object.
We may end up in such situation (Samsung S3 4.3):
ofonod[292]: > ATD*132#;\r
ofonod[292]: < \r\nOK\r\n

Funny that the HFP AG implementation accepts this, but okay.

On a phone, the Dialer was instructed to call SupplementaryServices.Initiate() first, before calling VoiceCallManager.Dial(). See doc/mmi-codes.txt.

Since we have no SupplementaryServices / ussd atom, I guess it would make sense to have the voicecall atom double check that the passed in string is not a USSD string.

Try the attached patch.

Regards,
-Denis
>From 9ec8d03c7c579a0d661fb7885b2627c0300f14c1 Mon Sep 17 00:00:00 2001
From: Denis Kenzior <[email protected]>
Date: Thu, 6 Aug 2015 17:16:03 -0500
Subject: [PATCH] voicecall: Don't accept USSD strings in Dial()

---
 src/voicecall.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/voicecall.c b/src/voicecall.c
index 550b79b..b088239 100644
--- a/src/voicecall.c
+++ b/src/voicecall.c
@@ -1513,6 +1513,9 @@ static int voicecall_dial(struct ofono_voicecall *vc, const char *number,
 	if (g_slist_length(vc->call_list) >= MAX_VOICE_CALLS)
 		return -EPERM;
 
+	if (valid_ussd_string(number, vc->call_list != NULL))
+		return -EINVAL;
+
 	if (!valid_long_phone_number_format(number))
 		return -EINVAL;
 
-- 
2.3.6

_______________________________________________
ofono mailing list
[email protected]
https://lists.ofono.org/mailman/listinfo/ofono

Reply via email to