From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [PATCH 4/4] Fix: Fill in the phone number info for outgoing call
Date: Wed, 11 Nov 2009 16:23:02 -0600 [thread overview]
Message-ID: <200911111623.02579.denkenz@gmail.com> (raw)
In-Reply-To: <1257578131.2888.6.camel@zzhan17-mobl.ccr.corp.intel.com>
[-- Attachment #1: Type: text/plain, Size: 2560 bytes --]
Hi Zhenhua,
> This is the latest version. Sorry for the noising from previous patches.
>
> There're two cases of outgoing call: dial from HF or dial from
> phone.
>
> In the first case, some phones may not support enhanced call status
> (AT+CLCC) to query outgoing number. So we need to pass struct
> atd_cb_data to fill in the number and type. Later, we invoke
> AT+CLCC to query phone number and overwrite ours if we are wrong.
This is actually not necessary. The core already tracks the outgoing number
and fills it in if the dial returns before the new call is notified. This
should be always the case in HFP, since the ATD returns before CIEV is
signaled, correct?
> +static GSList *parse_clcc(GAtResult *result)
> +{
> + GAtResultIter iter;
> + GSList *l = NULL;
> + int id, dir, status, type;
> + struct ofono_call *call;
> +
> + g_at_result_iter_init(&iter, result);
> +
> + while (g_at_result_iter_next(&iter, "+CLCC:")) {
> + const char *str = "";
> + int number_type = 129;
> +
> + if (!g_at_result_iter_next_number(&iter, &id))
> + continue;
> +
> + if (!g_at_result_iter_next_number(&iter, &dir))
> + continue;
> +
> + if (!g_at_result_iter_next_number(&iter, &status))
> + continue;
> +
> + if (!g_at_result_iter_next_number(&iter, &type))
> + continue;
> +
> + if (!g_at_result_iter_skip_next(&iter))
> + continue;
> +
> + if (g_at_result_iter_next_string(&iter, &str))
> + g_at_result_iter_next_number(&iter, &number_type);
> +
> + call = g_try_new0(struct ofono_call, 1);
> +
> + if (!call)
> + break;
> +
> + call->id = id;
> + call->direction = dir;
> + call->status = status;
> + call->type = type;
> + strncpy(call->phone_number.number, str,
> + OFONO_MAX_PHONE_NUMBER_LENGTH);
> + call->phone_number.type = number_type;
> +
> + if (strlen(call->phone_number.number) > 0)
> + call->clip_validity = 0;
> + else
> + call->clip_validity = 2;
> +
> + l = g_slist_insert_sorted(l, call, at_util_call_compare);
> + }
> +
> + return l;
> +}
If this function is a copy from atmodem, please put it into atutils instead of
duplicating it here.
> + ofono_voicecall_notify(vc, call);
> +
As I mentioned above, you do not need to do this. oFono will synthesize the
outgoing call properly. Worst case we will send a PropertyChanged signal
after CLCC is polled and the new number is obtained.
Also, there's actually two separate cases here. Ideally I'd like them
separated into two patches.
Regards,
-Denis
next prev parent reply other threads:[~2009-11-11 22:23 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-07 7:15 [PATCH 4/4] Fix: Fill in the phone number info for outgoing call Zhenhua Zhang
2009-11-11 22:23 ` Denis Kenzior [this message]
2009-11-12 2:34 ` Zhang, Zhenhua
2009-11-12 9:25 ` Zhang, Zhenhua
[not found] <1257545952-2776-1-git-send-email-zhenhua.zhang@intel.com>
2009-11-09 1:03 ` Zhang, Zhenhua
[not found] <1257337416-8647-1-git-send-email-zhenhua.zhang@intel.com>
2009-11-05 13:57 ` Zhang, Zhenhua
2009-11-06 14:02 ` Zhang, Zhenhua
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=200911111623.02579.denkenz@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 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.