From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [RFC] voicecall: Allow second stage string on Dial()
Date: Fri, 19 Jul 2013 08:57:37 -0500 [thread overview]
Message-ID: <51E945D1.3090603@gmail.com> (raw)
In-Reply-To: <CAMOw1v6paRAonYJN-GgjxFMSB78Z+WJPiwvhyVxO2TxVL+TDGA@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 3531 bytes --]
Hi Lucas,
> Humn... I was guided by this comment in dial_handle_result():
>
> /*
> * Dial request may return before existing active call
> * is put on hold or after dialed call has got active
> */
>
> So either I misunderstood what "after dialed call has got active" means or:
>
> ATD...;
> CALLSTATE: dialing
> CALLSTATE: alerting
> CALLSTATE: active
> OK
>
I've not seen this behavior, in theory it is possible. But mostly that
comment is about the case of three way calls. Even then, we can simply
run the dial string from the ATD callback.
>> The user can disconnect / switch the call to a Held state mid-way for
>
> mid-way while the tones are being sent, right?
Correct. Try it on an iPhone for example. Your tone will never get sent.
>
>> example, in which case all the tones are lost. I think that this is just
>> fine, unless you have some nice way of presenting this fact to the user?
>
> I was thinking about a property SecondStageNumber that is set once we
> start sending it and then if it errors out, we set it to "error" or
> the like.
> Or we can update the property like below:
>
> SecondStageNumber=1234567AB
> ...
> SecondStageNumber=4567AB
> ...
> SecondStageNumber=AB
> SecondStageNumber="failed"
>
> Just throwing away some ideas... We could do it with signals too:
Throw these away ;) I don't see the point in setting the error. As I
said, do you have a user usecase for it?
>
> SendToneStarted(string complete_number)
> SendToneUpdate(string partial_number)
> SendToneEnd()
>
This is much more likely, however having three signals is way too much,
the TODO proposal is likely enough.
> I think this would cover the other TODO item?
>
> "
> - Provide feedback of sent DTMF tones. Emit SendingTones signal if modem can
> provide approximate starting and stopping times for DTMF tones. Signal
> argument contains a string of DTMF tones to be sent, or empty string when
> all tones has been sent."
>
> Or what the TODO item says.
>
AFAIK the original reason this was here was to have the Audio Framework
generate the DTMF tones locally. It was not intended for user feedback.
The question is how you want your UI to look like. For example, do you
want to show the progress of the DTMF tones (e.g. text changing from
gray -> black) as they are being dialed?
>>
>> Another interesting case to consider is what should happen if we have a
>> Three-Way call, start a DTMF queue and then swap calls.
>
> Right now we continue sending the tones, right? We could change
> voicecall.c to associate a queue to the active call and throw it away
> when this call change state, setting the property to error as above.
>
The trouble is DTMFs can be applied to a dialing call as well, though
I'll need to do some digging to understand how/why.
>
>>
>>
<snip>
>>> @@ -1570,12 +1601,24 @@ static DBusMessage *manager_dial(DBusConnection
>>> *conn,
>>>
>>> vc->pending = dbus_message_ref(msg);
>>>
>>> + tones = strpbrk(number, "pP");
>>> +
>>
>>
>> Doing this is not safe, you might want to sanitize this input.
>
> How so? Searching for "pP" is as safe as calculating the length in
> valid_number_format().
The number being dialed is sanitized in voicecall_dial. You do not
sanitize the tones at all. tone_queue will reject invalid input, but
then you should not even accept an invalid dial string here in the first
place.
Regards,
-Denis
next prev parent reply other threads:[~2013-07-19 13:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-17 23:23 [RFC] voicecall: Allow second stage string on Dial() Lucas De Marchi
2013-07-18 18:50 ` Denis Kenzior
2013-07-19 5:36 ` Lucas De Marchi
2013-07-19 13:57 ` Denis Kenzior [this message]
2013-07-19 14:10 ` Lucas De Marchi
2013-07-19 14:21 ` Denis Kenzior
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=51E945D1.3090603@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.