Ok, all the pages under 

https://developer.mozilla.org/en-US/docs/Web/API/TelephonyCallGroup/

are now all filled in.

The one question I still have is - what are the possible state values for 
TelephonyCallGroup?

Best regards,

Chris Mills
  Senior tech writer || Mozilla
developer.mozilla.org || MDN
  [email protected] || @chrisdavidmills



> On 4 Jun 2015, at 10:33, Chris Mills <[email protected]> wrote:
> 
> 
>> On 4 Jun 2015, at 05:48, Szu-Yu Chen <[email protected]> wrote:
>> 
>> Hi Chris,
>> 
>> Really thank you for the work. The document is awesome.
> 
> You’re welcome - thank you too for the help in completing it. It was fun to 
> learn more about how it works.
> 
>> For the questions, please see my response below.
>> 
>> On Thu, Jun 4, 2015 at 2:39 AM, Chris Mills <[email protected]> wrote:
>> Hi all,
>> 
>> Just a quick heads up: whilst fixing a few dev-doc-needed bug requests, I 
>> came upon some recent additions to the Web Telephony API that needed adding. 
>> This quickly turned into a huge rabbit hole, as it turns out our Web 
>> Telephony API docs are way out of date. So I’ve created a proper landing 
>> page:
>> 
>> https://developer.mozilla.org/en-US/docs/Web/API/Web_Telephony_API
>> 
>> And updated all the interfaces and their members, except for 
>> TelephonyCallGroup, which I don’t really understand yet, and have run out of 
>> time to document for now.
>> 
>> A few questions to do with other bits that I didn’t quite understand:
>> 
>> 1. what does the “alerting” call state relate to/mean?
>> 
>> When a user makes an outgoing call, the call will be in 'dialing' state at 
>> the very beginning.
>> Then, the network will try to find the remote party. If the network 
>> successfully reach it, the user who makes the call will hear the 'alerting' 
>> tone from the phone.
>> That's 'alerting' state and it means the call is successful but the remote 
>> side has not yet responded by answering or rejecting.
> 
> Ok, I’ve filled in a description on 
> https://developer.mozilla.org/en-US/docs/Web/API/TelephonyCall/state
> 
> How does this differ from ‘connected’ - does ‘connected' occur after the 
> receiving phone has answered the call?
> 
>> 
>> 2. I’ve included a list of the possible TelephonyCall.disconnectedReason 
>> strings, but I also wanted to include a list of the possible 
>> TelephonyCall.error strings. Where can I find one?
>> 
>> Actually, we are going to deprecate TelephonyCall.error and that's the 
>> reason why disconnectedReason is created.
> 
> I appreciate that, but I still wanted to include information about error, so 
> anyone interested can see the history behind it and have the information 
> available if they want to develop anything specifically on an older version.
> 
>> 
>> Currently, that will be exactly same set with 
>> TelephonyCall.disconnectedReason enum but having an additional suffix 'Error'
>> So, that will be
>> 
>> "BadNumberError",
>> "NoRouteToDestinationError",
>> …
> 
> ok, cool. I’ll add that to the error page.
> 
>> 
>> 3. what do onremotehold and onremoteresumed - relate to? When do the 
>> associated events fire?
>> 
>> When the remote party hold/resume the call, the associated events fire. 
>> Based on that, the UI could show some messages to user.
>> 
> 
> Great, thanks! I’ve updated the relevant pages and descriptions.
> 
>> 4. I’ve basically taken a guess at how the Telephony.ready property would be 
>> used, so I’d especially appreciate it if someone checked out that page.
>> 
>> Should it be telephony.ready.then(callback) instead of .resolve() ?
>> // Telephony object
>> 
>> var tel = navigator.mozTelephony;
>> 
>> 
>> tel
>> .ready.then(function() {
>> 
>> 
>> // ok, now let's make some calls
>> 
>> });
>> When Telephony object is created, it takes some time to sync the information 
>> with underlying layer and to be fully initialized.
>> If a user try to read something like telephony.call before telephony.ready 
>> is resolved, the value may not be correct.
> 
> Ah, thanks for that info! I think I just got a bit confused because I’d not 
> seen a promise-based property before, only methods. But that makes sense now. 
> I’ve updated the article accordingly. 
> 
>> 
>> 5. Has anyone got a brief test example they can show me of how 
>> TelephonyCallGroup/conference calls work?
>> 
>> 
>> var telephony = navigator.mozTelephony;
>> 
>> var call1, call2;
>> telephony.dial(number1).then(call => call1 = call);
>> telephony.dial(number2).then(call => call2 = call);
>> 
>> // now, I've made two calls and assume both of them are answered by remote.
>> // You'll see two entries in telephony.calls (call1, call2)
>> 
>> var conference = telephony.conferenceGroup;
>> conference.add(call1, call2);
>> 
>> // I've merged call1 and call2 into a conference call
>> // And now, that will be two entries in conference.calls (call1, call2) but 
>> nothing in telephony.calls
>> 
>> var call3;
>> telephony.dial(number3).then(call => call3 = call);
>> 
>> // made the 3rd call.
>> // two entries in conference.calls (call1, call2) and one entry in 
>> telephony.calls (call3)
>> 
>> conference.add(call3);
>> 
>> // merged the 3rd call into existing conference
>> // result in three entries in conference.calls (call1, call2, call3)
>> 
>> conference.remove(call2);
>> 
>> // remove (separate) call2 from conference
>> // two entries in conference.calls (call1, call3) and one entry in 
>> telephony.calls (call2)
>> 
>> For hold(), resume(), hangUp(), the actions perform on entire conference, 
>> i.e., each call in the conference.
>> 
>> conference.hangUp()
>> 
>> // hangup the entire conference call.
>> // now, only one entry remain in telephony.calls (call2)
> 
> Thanks for your excellent code explanation. This makes it very easy to 
> understand, and I’ve used this in my code example. See:
> 
> https://developer.mozilla.org/en-US/docs/Web/API/TelephonyCallGroup
> 
> I’ll carry on and fill in all the member pages later on.
> 
> One related question: what possible values does TelephonyCallGroup.state 
> have? In general where can I find the enums for such things in mxr?
> 
>> 
>> 
>> thanks,
>> 
>> Chris Mills
>>  Senior tech writer || Mozilla
>> developer.mozilla.org || MDN
>>  [email protected] || @chrisdavidmills
>> 
>> 
>> 
>> _______________________________________________
>> dev-b2g mailing list
>> [email protected]
>> https://lists.mozilla.org/listinfo/dev-b2g
>> 
>> 
>> 
>> -- 
>> Szu-Yu (Aknow) Chen
>> Mozilla Taiwan
> 

_______________________________________________
dev-b2g mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-b2g

Reply via email to