WebAPI/AppDefinedTeleophony: Difference between revisions

Line 40: Line 40:


== Add a Friend ==
== Add a Friend ==
Most communication Apps have their own contacts.  The information in their contacts database are very similar.  Basically, the user need only one copy of themThey don't want to maintain multiple copy of contactsSo, the user will keep all contacts in the database of Contacts API and forget contacts of communication Apps.  But, communication Apps still maintain their-owned contacts for showing status of friends or for other purposes.
Most communication Apps have their own contacts.  By using a common format of data and sharing through Data Store API, all contacts can be showed in one application to provide an integrated user experienceContacts of an user may be provided by several applications redundantlyThe Contacts App may group and aggregate them together to provide a better UX.


=== Make a Voice Call ===
=== Make a Voice Call ===
When the user want to make a voice call to John; one of his friends,  
When the user want to make a voice call to John; one of his friends,  
* the user go to Contacts App to find out John.
* the user go to Contacts App to find out John.
* Then, the user press on John's Skype phone account.
* Then, the user press on John's Skype phone account listed in immp field.
* Contacts App ask the user what he want to do.  Sending a message, making a voice call, or making a video call.
* Contacts App ask the user what he want to do.  Sending a message, making a voice call, or making a video call.
* The user ask for making a voice call.
* The user ask for making a voice call.
* Contacts App make an activity for Skype to make a voice call to John.
* Contacts App make an activity for Skype to make a voice call to John.
var act = new Activity({name: "telephony::Skype", data: { action: "voicecall", callee: "John" }});


=== Send a Message ===
=== Send a Message ===
Line 57: Line 59:
* The user ask for sending a message.
* The user ask for sending a message.
* Contacts App ask Facebook App to send a message to John.
* Contacts App ask Facebook App to send a message to John.
* User input a message in Facebook App, and press the "Send" button to send it out.
var act = new Activity({name: "telephony::Facebook", data: { action: "sendmessage", receiver: "John" }});


=== Add a Number from Call History ===
=== Add a Number from Call History ===
So, the idea is to borrow the experience of mobile phone.  When you ask your friend for phone number, you will call it at first to make sure the number is correct.  Then, you create a new contact from call history.  You select the number of your friend from call history and the phone will ask you what do you want to do.  You ask the phone to add the phone number to contacts, then you pick up an existing contact or create a new one.  It can also be applied to SIP phone or Skype.
So, the idea is to borrow the experience of mobile phone.  When you ask your friend for phone number, you will call it at first to make sure the number is correct.  Then, you create a new contact from call history.  You select the number of your friend from call history and the phone will ask you what do you want to do.  You ask the phone to add the phone number to contacts, then you pick up an existing contact or create a new one.  It can also be applied to SIP phone or Skype.
* When the user make a call,
* When the user make a SIP call,
* it add a new record with Call History API.
* SIP App add a new record in the Data Store for the Call History.
* Then, the user read all history with Call History App,
* Then, the user read all history with Call History App,
* and select the SIP phone number/address or Skype friend account to create a new contact, or add it to an existing one.
* and select the record to create a new contact,
* then, the Call History App ask SIP App to add that record to it's contacts.
* the Call History App receives a notification for the new contact being created.


=== Add a New Friend at Communication App ===
var act = new Activity({name: "telephony::SIP", data: { action: "addcontact", callhistoryid: <object id> }});
Another scenario is to wake up Contacts App to handle the new friend account/address/or number when adding a new friend in a communication App.  That is saying,  
* when the user add a friend in Skype,
* Skype will wake up Contacts App; with Web Activities, and ask it to remember the friend account.
* Then Contact App will ask the user if he want to create a new contacts or to add the account/address/or number to an existing contacts.


=== Add a Friend at Contacts App ===
=== Add a Friend at Contacts App ===
The user can also initiate an action of adding a new Skype friend at Contacts App.  The following description is a possible UX.
* The user press on an existing contact.
* Contact App ask the user what he want to do.
* The user ask Contact App to add a new contact address for the contact.
* Contact App ask the user what kind of address; Skype, Twitter, WhatsApp, ... etc.
* The user ask Contact App to add a Skype address.
* Contacts App wakes up Skype for adding a new friend.
* The user add a new friend of Skype, and Skype will check if the account is valid.
* If it is a valid account, and the peer, the friend, accept the request of adding as a friend.  Then,
** add the address to the contact that the user choose to initiate the action, or
** postResult() with peer's account/address.


== Import Contacts from Communication Apps ==
== Import Contacts from Communication Apps ==
Confirmed users
398

edits