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

Re: Proposal: WebTelephony API for multi-SIMs

21 views
Skip to first unread message

Hsin-Yi Tsai

unread,
Nov 6, 2012, 6:36:33 AM11/6/12
to dev-w...@lists.mozilla.org, dev...@lists.mozilla.org, Shian-Yow Wu, Thinker Lee, James Ho
[including dev-webapi and dev-b2g]

Hi all,

Here is a revision of the proposal for multi-SIMs WebTelephony API and
RIL implementation. This revision adds the possible RIL implementation [1].

Below is the main idea. With various hardware design, there might be
multiple ril-daemon (rild), one rild taking care of one SIM, while it is
also possible that a single rild manipulates all the SIMs. To make our
architecture flexible enough, we are planning to have 'rilproxy' in
charge of sending RIL parcels to the correct rild, no matter how many
there are.

Also, we are proposing to add a new object called
'MSimRadioInterfaceLayer', which takes responsibility of creating
RadioInterfaceLayer instances for every SIM, getting worker of each
instance and receiving IPC messages. Once it receives the IPC messages, it
dispatches the messages to the right RadioInterfaceLayer instance
according to the 'subscriptionId' property. Then that instance should
handle those messages. It is also each instance's job to send messages
to content.

You can refer to the wiki [1] for more details.

Your comments are very welcome. Thanks :)

[1]
https://wiki.mozilla.org/WebAPI/WebTelephony/Multi-SIM#RIL_Implementation

Best,
Hsinyi

On 2012年10月23日 17:06, Hsin-Yi Tsai wrote:
> Dear all,
>
> Currently B2G supports a single SIM architecture. I would like to
> initiate the discussion about multi-SIMs support.
>
> This draft proposal extend the current WebTelephony API for
> multi-SIMs. It introduces a central 'nsIDOMTelephonyManager' to
> manage several DOMTelephony objects. One DOMTelephony object is binded
> to a physical SIM slot. User can get all the phones (DOMTelephony),
> the default phone and all the calls through nsIDOMTelephonyManager.
> User can also get calls of a specific SIM through this API, of course.
>
> Proposed APIs are listed below. You can also refer to the wiki [1] to
> get more details, including usecase, possible implementation and
> potential issues.
>
> interface nsIDOMTelephonyManager : nsIDOMEventTarget
> {
> attribute boolean muted; /* Moved from the original nsIDOMTelephony */
> attribute boolean speakerEnabled; /* Moved from the original
> nsIDOMTelephony */
>
> readonly attribute jsval active;
> readonly attribute jsval calls;
> readonly attribute phoneState; /* Ringing, Offhook, Idle */
> readonly attribute jsval phones;
> readonly attribute nsIDOMTelephony defaultPhone;
>
> [implicit_jscontext] attribute jsval onincoming;
> [implicit_jscontext] attribute jsval oncallschanged;
> };
>
> interface nsIDOMTelephony: nsIDOMEventTarget
> {
> nsIDOMTelephonyCall dial(in DOMString number);
>
> // The call that is "active", i.e. receives microphone input and tones
> // generated via startTone.
> readonly attribute jsval active;
>
> // Array of all calls that are currently connected.
> readonly attribute jsval calls;
>
> void startTone(in DOMString tone);
> void stopTone();
>
> attribute nsIDOMEventListener onincoming;
> attribute nsIDOMEventListener oncallschanged;
> };
>
> interface nsIDOMTelephonyCall: nsIDOMEventTarget
> {
> readonly attribute DOMString number;
>
> // "dialing", "alerting", "busy", "connecting", "connected",
> "disconnecting",
> // "disconnected", "incoming", "holding", "held", "resuming"
> readonly attribute DOMString state;
>
> readonly attribute nsIDOMDOMError error;
> readonly attribute nsIDOMTelephony phone; /* New attribute */
>
> // functions to mediate a call.
> void answer();
> void hangUp();
> void hold();
> 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;
> attribute nsIDOMEventListener onholding;
> attribute nsIDOMEventListener onheld;
> attribute nsIDOMEventListener onresuming;
> };
>
>
> Your comments and suggestions are always welcome. :)
>
> [1] https://wiki.mozilla.org/WebAPI/WebTelephony/Multi-SIM
>
> Thanks,
> Hsinyi
>
>
>
>
>

--
Hsin-Yi Tsai 蔡欣宜
Mozilla Taiwan
T: +886-2-87861100 ext:312
ht...@mozilla.com

Hsin-Yi Tsai

unread,
Feb 20, 2013, 5:22:19 AM2/20/13
to dev-w...@lists.mozilla.org, Shian-Yow Wu, Ken Chang
Dear all,

Updates of the proposal of WebTelephony API for multi-SIM scenario
again! You are welcome to visit mozWiki [1] to have more details.

The main modification of wiki is adding the description of user scenario
as below.

== Multisim Scenario ==
In the multisim scenario, the phone, the whole device, could use all sim
cards that are all on standby. All cards are working separately and they
can be connected to different networks simultaneously, like gsm, cdma,
etc. Each app should be able to allow user to choose a sim card as the
user currently wants. Taking telephony as example, user should be able
to choose via which sim card he wants to make a call. User can choose to
use a specific sim or simply use the default one. He can call friend A
by sim no. 1 and to call friend B by sim no. 2. He is definitely able to
receive calls from any sim. Also, among different APIs such as mobile
connections and telephony, technically user can set a default sim for 3G
data connection and another default sim for telephony voice calls.

In reality, hardware implementation for multi-SIM scenario varies. Some
devices may have one antenna while others have multiple. Some devices
may have one modem but others have multiple. If the device has one
antenna only, then even in multisim scenario, user is uncapable of
placing calls with both sim cards at the same time. If the hardware
supports multi-antenna as well, then placing calls with both sim cards
at the same time works. Nevertheless, in fact, though most existing
multisim-devices claim they support multi-sim-standby, they
automatically disable other sim card while one is in call. If user talks
on one sim card and get an incoming call on other, the second call will
be redirected to voice mail or user will be unavailable. Very few, but
there is, supports the full multi-sim-standby feature.

===================

Below is almost the proposal that I posted before. It extends the
current WebTelephony API for multi-SIMs by introducing a central
'nsIDOMTelephonyManager' to manage several nsIDOMTelephony objects. One
Telephony object is binded to a physical SIM slot. User can get all the
telephony services, the default service and all the calls through
nsIDOMTelephonyManager. User can also get calls of a specific SIM card
through this API, of course.

The new nsIDOMTelephony and nsIDOMTelephonyCall are almost the same as
those for single-sim scenario, except that we move audio control to
nsIDOMTelephonyManager from nsIDOMTelephony and we add a new attribute
'subscriptionId' in nsIDOMTelephonyCall to tell which sim card the call
comes from.

== Proposal of WebTelephonyAPI ==

interface nsIDOMNavigatorTelephony : nsISupports
{
readonly attribute nsIDOMTelephonyManager mozTelephonyManager;
};

interface nsIDOMTelephonyManager : nsIDOMEventTarget
{
attribute boolean muted; /* Moved from the original nsIDOMTelephony */
attribute boolean speakerEnabled; /* Moved from the original nsIDOMTelephony */

// Calls existing in all the sim cards.
readonly attribute jsval calls;
readonly attribute phoneState; /* ringtone, incall, idle */
// Array of nsIDOMTelephony. Each service is taking care of one sim card.
readonly attribute jsval services;
readonly attribute nsIDOMTelephony defaultService;

[implicit_jscontext] attribute jsval onincoming;
[implicit_jscontext] attribute jsval oncallschanged;
};


interface nsIDOMTelephony: nsIDOMEventTarget
{
nsIDOMTelephonyCall dial(in DOMString number);

// The call that is "active", i.e. receives microphone input and tones
// generated via startTone.
readonly attribute jsval active;

// Array of all calls that are currently connected.
readonly attribute jsval calls;

void startTone(in DOMString tone);
void stopTone();

attribute nsIDOMEventListener onincoming;
attribute nsIDOMEventListener oncallschanged;
};

interface nsIDOMTelephonyCall: nsIDOMEventTarget
{
readonly attribute DOMString number;

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

readonly attribute nsIDOMDOMError error;

// Indicate which SIM card this call belongs to.
readonly attribute unsigned long subscriptionId; /* New attribute */

// Functions to mediate a call.
void answer();
void hangUp();
void hold();
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;
attribute nsIDOMEventListener onholding;
attribute nsIDOMEventListener onheld;
attribute nsIDOMEventListener onresuming;
};


Comments and suggestions are welcome as always :)

[1] https://wiki.mozilla.org/WebAPI/WebTelephony/Multi-SIM

Best regards,

JOSE MANUEL CANTERA FONSECA

unread,
Feb 20, 2013, 10:29:23 AM2/20/13
to Hsin-Yi Tsai, dev-w...@lists.mozilla.org, Shian-Yow Wu, Ken Chang
El 20/02/13 11:22, "Hsin-Yi Tsai" <ht...@mozilla.com> escribió:

>Dear all,
>
>Updates of the proposal of WebTelephony API for multi-SIM scenario
>again! You are welcome to visit mozWiki [1] to have more details.
>
>The main modification of wiki is adding the description of user scenario
>as below.
>
>== Multisim Scenario ==

Thanks for the scenario, very enlightening

>
>Below is almost the proposal that I posted before. It extends the
>current WebTelephony API for multi-SIMs by introducing a central
>'nsIDOMTelephonyManager' to manage several nsIDOMTelephony objects. One
>Telephony object is binded to a physical SIM slot. User can get all the
>telephony services, the default service and all the calls through
>nsIDOMTelephonyManager. User can also get calls of a specific SIM card
>through this API, of course.

In the context of W3C standardization We had a preliminary discussion with
Intel people last week about this. They were proposing to have a 'service'
extra param in the dial method that will allow to select what service will
be used for dialing. (instead of having separate DOMTelephony objects).
why you are proposing multiple Telephony objects instead of a unique
interface and extra parameters to know what service you refer to? Do you
foresee any problem with that other approach?
>_______________________________________________
>dev-webapi mailing list
>dev-w...@lists.mozilla.org
>https://lists.mozilla.org/listinfo/dev-webapi
>



________________________________

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

Hsin-Yi Tsai

unread,
Feb 21, 2013, 6:29:34 AM2/21/13
to JOSE MANUEL CANTERA FONSECA, dev-w...@lists.mozilla.org, Ken Chang, Shian-Yow Wu

On 2013年02月20日 23:29, JOSE MANUEL CANTERA FONSECA wrote:
>
> In the context of W3C standardization We had a preliminary discussion with
> Intel people last week about this. They were proposing to have a 'service'
> extra param in the dial method that will allow to select what service will
> be used for dialing. (instead of having separate DOMTelephony objects).
> why you are proposing multiple Telephony objects instead of a unique
> interface and extra parameters to know what service you refer to? Do you
> foresee any problem with that other approach?
>
We've also considered the extra-parameter proposal as well. At the same
time, we were also thinking to keep the backward compatibility to the
single sim api. The 3-layer proposal reaches the compatibility better,
we thought. Once user gets Telephony objects by
navigator.mozTelephonyManager.defaultService or
navigator.mozTelephonyManager.services[index], user does things via the
service the same as using single-sim api. Besides, the 3-layer proposal
helps listen to the events coming from a specific sim card. It provides
clearer structure and relationship, for example, to get calls only from
sim card no. X: mozTelephonyManager.services[X].calls.
0 new messages