Open Source Telephony
 help / color / mirror / Atom feed
From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [PATCH 0/3] Driver specific dial string validation
Date: Thu, 06 Aug 2015 17:40:02 -0500	[thread overview]
Message-ID: <55C3E242.8040708@gmail.com> (raw)
In-Reply-To: <1438880221-23834-2-git-send-email-kubax.t.pawlak@intel.com>

[-- Attachment #1: Type: text/plain, Size: 1040 bytes --]

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-voicecall-Don-t-accept-USSD-strings-in-Dial.patch --]
[-- Type: text/x-patch, Size: 726 bytes --]

>From 9ec8d03c7c579a0d661fb7885b2627c0300f14c1 Mon Sep 17 00:00:00 2001
From: Denis Kenzior <denkenz@gmail.com>
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


  reply	other threads:[~2015-08-06 22:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-06 16:56 [PATCH 0/3] Driver specific dial string validation Kuba Pawlak
2015-08-06 16:56 ` Kuba Pawlak
2015-08-06 22:40   ` Denis Kenzior [this message]
2015-08-07 14:27     ` Pawlak, KubaX T
2015-08-06 16:56 ` [PATCH 1/3] voicecall.h: add dial string validation to driver Kuba Pawlak
2015-08-06 16:57 ` [PATCH 2/3] voicecall.c: call driver's dial string validation Kuba Pawlak
2015-08-06 16:57 ` [PATCH 3/3] hfp: define driver specific " Kuba Pawlak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55C3E242.8040708@gmail.com \
    --to=denkenz@gmail.com \
    --cc=ofono@ofono.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox