Hi folks,
More details about the proposal for the improved API are shown below.
How do you think about this? Any feedbacks are welcome. Thanks!
於 2012年03月14日 17:37, Hsin-Yi Tsai 提到:
> Hi there,
>
> Currently we can only answer() or hangUp() a call. However, we should
> be able to hold a call and answer it later.
>
https://bugzilla.mozilla.org/show_bug.cgi?id=735170
> <
https://bugzilla.mozilla.org/show_bug.cgi?id=735170>
>
> Here are the details of the scenarios of holding a call.
>
> First, we are making a phone call with A, i.e. the call is in
> connected state. Then we want to hold A for a while and keep talking
> to it later. So, we should make the call into "held" state, then
> resume connecting with A later.
>
> Second, we are talking with A, so the call is in connected state. In
> the meanwhile, B is trying to reach us via phone. Since we are
> connected with A, the call state of B is "waiting." If we want to
> answer B (make B from waiting into connected), then we should also
> make the call of A into held. Later we can resume connecting with A.
>
> Below you can find an enhanced WebTelephony API for holding a call.
>
> interface nsIDOMTelephonyCall : nsIDOMEventTarget
> {
> readonly attribute DOMString number;
> readonly attribute DOMString state;
> // "dialing", "ringing", "busy", "connecting", "connected",
> "disconnecting", "disconnected", "incoming",
> // Add new states: "waiting", "holding", "held", "resuming"
//current states:dialing, ringing, busy, connecting, connected,
disconnecting, disconnected, incoming
// NEW states: "waiting", another type of incoming call when there is a
connected call
// NEW states: "holding", "held", "resuming"
readonly attribute DOMString state;
//Specify which call the dialer is handling? Not very sure whether this
is needed.
readonly attribute DOMString callIndex;
>
> void answer(); //change an incoming call or a waiting call into
> "connected"
//Make an incoming call to be connected
// Call A:incoming --> connected
//Make a waiting call to be connected, and switch the existing connected
call to "held" state
// Call A:waiting --> connected, Call B: connected --> held
void answer();
> void hangUp();
//Make a call to be disconnected if there is no waiting call or held call
// A: any --> disconnected
//Reject an incoming call
// A: incoming --> disconnected
//Reject a waiting call, and remain the existing connected call
// A: waiting --> disconnected, B: connected --> connected
//Hang up the existing connected call, and make a waiting call to be
connected
// A: connected --> disconnected, B: waiting --> connected
void hangUp();
> void hold(); //change a connected call into "held"
//Change a connected call to "held" state
// A: connected --> held
void hold();
> void resume(); //change a "held" call into connected
//Switch a "held" call back to "connected" state
// A: held --> connected
//If there has already been a connected call, then switch the existing
connected call to "held" state
// A: held --> connected, B: connected --> held
void resume();
Best regards,
Hsinyi