Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Comments on latest Telephony API

8 views
Skip to first unread message

JOSE MANUEL CANTERA FONSECA

unread,
Mar 23, 2012, 6:34:43 AM3/23/12
to dev-w...@lists.mozilla.org
Hi there,

Some comments on the latest Telephony API at [1].

1.The calls array is the set of calls which are currently 'connected'. I assume that would also include calls connected but held, right?

2. What's the use case for the 'oncallschange' event handler?

3. I think holdCall and resumeCall should be renamed to 'hold' and 'resume' as these are within a Call context.

4. At this respect I don't know if the latest suggested changes such as changing 'ringing' by 'alerting' have been implemented


Thanks, best

________________________________
Este mensaje se dirige exclusivamente a su destinatario. Puede consultar nuestra pol?tica de env?o y recepci?n de correo electr?nico en el enlace situado m?s abajo.
This message is intended exclusively for its addressee. We only send and receive email on the basis of the terms set out at
http://www.tid.es/ES/PAGINAS/disclaimer.aspx

Jonas Sicking

unread,
Mar 23, 2012, 8:10:11 PM3/23/12
to JOSE MANUEL CANTERA FONSECA, dev-w...@lists.mozilla.org
On Fri, Mar 23, 2012 at 3:34 AM, JOSE MANUEL CANTERA FONSECA
<jm...@tid.es> wrote:
> Hi there,
>
> Some comments on the latest Telephony API at [1].
>
> 1.The calls array is the set of calls which are currently 'connected'. I assume that would also include calls connected but held, right?

Yes.

> 2. What's the use case for the 'oncallschange' event handler?

Hmm.. I forget the specifics. But it's to enable getting notified when
a call is placed. Currently you get notified (through the onincoming
event) when someone calls into the phone, but you don't get notified
when the call places a call.

> 3. I think holdCall and resumeCall should be renamed to 'hold' and 'resume' as these are within a Call context.

Good point, I agree.

> 4. At this respect I don't know if the latest suggested changes such as changing 'ringing' by 'alerting' have been implemented

I don't think it has.

/ Jonas

JOSE MANUEL CANTERA FONSECA

unread,
Mar 24, 2012, 7:21:46 AM3/24/12
to Jonas Sicking, dev-w...@lists.mozilla.org


El 24/03/12 01:10, "Jonas Sicking" <jo...@sicking.cc> escribió:

>On Fri, Mar 23, 2012 at 3:34 AM, JOSE MANUEL CANTERA FONSECA
><jm...@tid.es> wrote:
>> Hi there,
>>
>> Some comments on the latest Telephony API at [1].
>>
>> 1.The calls array is the set of calls which are currently 'connected'.
>>I assume that would also include calls connected but held, right?
>
>Yes.
>
>> 2. What's the use case for the 'oncallschange' event handler?
>
>Hmm.. I forget the specifics. But it's to enable getting notified when
>a call is placed. Currently you get notified (through the onincoming
>event) when someone calls into the phone, but you don't get notified
>when the call places a call.

Wouldn't it be better to have an 'outgoing' event to indicate that an
outgoing call has been launched?. It would be more elegant and easier to
understand its purpose.

On the other hand it seems confusing the oncallschange because the calls
array would only change when a call is connected or disconnected ... I
don't know if I'm missing something ...

>
>> 3. I think holdCall and resumeCall should be renamed to 'hold' and
>>'resume' as these are within a Call context.
>
>Good point, I agree.
>
>> 4. At this respect I don't know if the latest suggested changes such as
>>changing 'ringing' by 'alerting' have been implemented
>
>I don't think it has.
>
>/ Jonas


Este mensaje se dirige exclusivamente a su destinatario. Puede consultar nuestra política de envío y recepción de correo electrónico en el enlace situado más abajo.

Hsin-Yi Tsai

unread,
Mar 25, 2012, 11:34:39 PM3/25/12
to dev-w...@lists.mozilla.org, Jonas Sicking, jm...@tid.es
於 2012年03月24日 19:21, JOSE MANUEL CANTERA FONSECA 提到:
>
> El 24/03/12 01:10, "Jonas Sicking"<jo...@sicking.cc> escribió:
>
>> On Fri, Mar 23, 2012 at 3:34 AM, JOSE MANUEL CANTERA FONSECA
>> <jm...@tid.es> wrote:
>>> Hi there,
>>>
>>> Some comments on the latest Telephony API at [1].
>>>
>>> 1.The calls array is the set of calls which are currently 'connected'.
>>> I assume that would also include calls connected but held, right?
>> Yes.
>>
>>> 2. What's the use case for the 'oncallschange' event handler?
>> Hmm.. I forget the specifics. But it's to enable getting notified when
>> a call is placed. Currently you get notified (through the onincoming
>> event) when someone calls into the phone, but you don't get notified
>> when the call places a call.
> Wouldn't it be better to have an 'outgoing' event to indicate that an
> outgoing call has been launched?. It would be more elegant and easier to
> understand its purpose.
>
> On the other hand it seems confusing the oncallschange because the calls
> array would only change when a call is connected or disconnected ... I
> don't know if I'm missing something ...

Yes, the calls array change when an incoming call is answered, an
outgoing call is made successfully and call disconnected.
I also agree that oncallschanged seems confusing and could be replaced
with more specific events.

If only from the perspective of dialer, outgoing event seems not
necessary because the outgoing call is made from UI, right?
But if other application needs this event, I think adding the outgoing
event on Telephony would be a good idea.
Also, looks like ondilaing on TelephonyCall shouldn't be there. It
implies the same as onoutgoing on Telephony.
There should also be onconnected and ondisconnected events to indicate a
call is added in or removed from the calls array.

Other question, when is onbusy on TelephonyCall needed in the current
design? I cannot get the point ...

I reviewed my last proposal, and a new proposal on Telephony and
TelephonyCall is shown below
or in
https://wiki.mozilla.org/WebAPI/WebTelephony#Proposal:_Enhance_WebTelephony_API_to_hold_a_call

interface nsIDOMTelephony : nsIDOMEventTarget
{
attribute nsIDOMEventListener onincoming;

//attribute nsIDOMEventListener oncallschanged;

/* new events */
attribute nsIDOMEventListener onoutgoing;
attribute nsIDOMEventListener onconnected;
attribute nsIDOMEventlistener ondisconnected;
}




interface nsIDOMTelephonyCall : nsIDOMEventTarget
{
readonly attribute DOMString number;

// "dialing", "alerting", "busy", "connecting", "connected", "disconnecting", "disconnected", "incoming"
// Add new states: "holding", "held", "resuming"
readonly attribute DOMString state;

void answer();
void hangUp();

//make a "connected" call into "held"
void hold();
//make a "held" call back to "connected"
void resume();

attribute nsIDOMEventListener onstatechange;


//attribute nsIDOMEventListener ondialing;

attribute nsIDOMEventListener onalerting;
attribute nsIDOMEventListener onbusy;
attribute nsIDOMEventListener onconnecting;
attribute nsIDOMEventListener onconnected;
attribute nsIDOMEventListener ondisconnecting;
attribute nsIDOMEventListener ondisconnected;

// attribute nsIDOMEventListener onincoming;
/* new events */
attribute nsIDOMEventListener onholding;
attribute nsIDOMEventListener onheld;
attribute nsIDOMEventListener onresuming;
};



>>> 3. I think holdCall and resumeCall should be renamed to 'hold' and
>>> 'resume' as these are within a Call context.
>> Good point, I agree.
>>
>>> 4. At this respect I don't know if the latest suggested changes such as
>>> changing 'ringing' by 'alerting' have been implemented
>> I don't think it has.

This issue has been implemented. Related modification has been made in
the new proposal as well.

Thanks,
Hsinyi

>>
>> / Jonas
>
> Este mensaje se dirige exclusivamente a su destinatario. Puede consultar nuestra política de envío y recepción de correo electrónico en el enlace situado más abajo.
> This message is intended exclusively for its addressee. We only send and receive email on the basis of the terms set out at
> http://www.tid.es/ES/PAGINAS/disclaimer.aspx
> _______________________________________________
> dev-webapi mailing list
> dev-w...@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-webapi

JOSE MANUEL CANTERA FONSECA

unread,
Mar 26, 2012, 4:57:51 AM3/26/12
to Hsin-Yi Tsai, dev-w...@lists.mozilla.org, Jonas Sicking


El 26/03/12 05:34, "Hsin-Yi Tsai" <ht...@mozilla.com> escribió:
Yes, you are right

>But if other application needs this event, I think adding the outgoing
>event on Telephony would be a good idea.

Yes, for instance the 'Recent Calls' app might be interested in this event
... Or for instance the Notifications app might also be interested in
knowing when a call gets disconnected, that's something was needed in our
OWD prototype ...

>Also, looks like ondilaing on TelephonyCall shouldn't be there. It
>implies the same as onoutgoing on Telephony.

Mmm I think we need this event to know explicitly that the current call is
progressing ok ...

>There should also be onconnected and ondisconnected events to indicate a
>call is added in or removed from the calls array.
>
>Other question, when is onbusy on TelephonyCall needed in the current
>design? I cannot get the point ...

I think it is needed to get notified that the party you wanna call is busy

Jonas Sicking

unread,
Mar 26, 2012, 5:56:56 AM3/26/12
to Hsin-Yi Tsai, jm...@tid.es, dev-w...@lists.mozilla.org
On Sun, Mar 25, 2012 at 8:34 PM, Hsin-Yi Tsai <ht...@mozilla.com> wrote:
> Other question, when is onbusy on TelephonyCall needed in the current
> design? I cannot get the point ...

When you are calling someone, but receive a busy signal. It's nice if
the application UI can reflect this in addition to the audio busy tone
that is played in the speaker.

/ Jonas

Hsin-Yi Tsai

unread,
Mar 26, 2012, 6:22:17 AM3/26/12
to JOSE MANUEL CANTERA FONSECA, dev-w...@lists.mozilla.org, Jonas Sicking
於 2012年03月26日 16:57, JOSE MANUEL CANTERA FONSECA 提到:
Sounds right.

> There should also be onconnected and ondisconnected events to indicate a
> call is added in or removed from the calls array.
>
> Other question, when is onbusy on TelephonyCall needed in the current
> design? I cannot get the point ...
> I think it is needed to get notified that the party you wanna call is busy
Got it. Thanks.

Robert Kaiser

unread,
Mar 27, 2012, 4:02:59 PM3/27/12
to mozilla-d...@lists.mozilla.org
Hsin-Yi Tsai schrieb:
> If only from the perspective of dialer, outgoing event seems not
> necessary because the outgoing call is made from UI, right?
> But if other application needs this event, I think adding the outgoing
> event on Telephony would be a good idea.

I can easily envision e.g. a status bar (which probably is a different
app than the dialer) showing that there is a call in progress, maybe
even with its type (incoming/outgoing), and giving an easy access point
to get back to the dialer managing that call when you switched to a
different app, e.g. to check for a free slot in your calendar to use for
the appointment with the person you called.
In that scenario, the status bar getting events for those calls would be
a good idea. :)

Robert Kaiser
0 new messages