Loop/Architecture/MVP: Difference between revisions

Jump to navigation Jump to search
m
 
(39 intermediate revisions by 4 users not shown)
Line 8: Line 8:
|-
|-
| Fri Jun 20 16:34:31 CDT 2014 || Adam Roach || Added urlDate to <tt>GET /calls?version=<version></tt>
| Fri Jun 20 16:34:31 CDT 2014 || Adam Roach || Added urlDate to <tt>GET /calls?version=<version></tt>
|-
| Tue Jun 24 12:08:55 CDT 2014 || Adam Roach || Added 'state' to <tt>GET /calls?version=<version></tt>; Added 'calleeId' to <tt>GET /call/{token}</tt>
|-
| Thu Jun 26 15:57:55 UTC+1 2014 || Alexis Métaireau || Changed WSS URLs so they are just domains + ports.
|-
| Mon Jun 30 18:32:31 UTC+1 2014 || Rémy Hubscher || Add missing calleeId information.
|-
| Thu Aug 01 14:52:00 UTC+1 2014 || Alexis Métaireau || replace POST by PUT for /call-url/{token}
|-
| Wed Jul  2 15:20:40 CDT 2014 || Adam Roach || Added "channel" parameter to <tt>POST /calls</tt> (see {{bug|1033573}})
|-
| Mon Jul 14 11:58:01 CDT 2014 || Adam Roach || Increased connecting timer from 5 seconds to 10 seconds (see {{bug|1037979}})
|-
| Wed Jul 16 14:57:15 CDT 2014 || Adam Roach || Added two new channel types for mobile and standalone clients
|-
| Fri Jul 18 12:01:12 CDT 2014 || Rémy Hubscher || Change the Transition paragraph with last decisions.
|}
|}


Line 57: Line 73:
     "sessionToken": "T1==cGFydG5lcl9pZD00NDcwMD",
     "sessionToken": "T1==cGFydG5lcl9pZD00NDcwMD",
     "callId": "1afeb4340d995938248ce7b3e953fe80",
     "callId": "1afeb4340d995938248ce7b3e953fe80",
     '''"progressURL": "wss://loop214.services.mozilla.com:443/call_progress/1afeb4340d995938248ce7b3e953fe80"'''
     '''"progressURL": "wss://loop214.services.mozilla.com:443",'''
    '''"calleeId": "Adam Roach"'''
  }
  }


New parameters:
New parameters:
* '''progressURL''': WebSockets URL the client needs to connect to in order to receive call setup progress information and control call setup.
* '''progressURL''': WebSockets URL the client needs to connect to in order to receive call setup progress information and control call setup.
* '''calleeId''': The name of the URL issuer that the caller is calling.


==== GET /calls?version=<version> ====
==== GET /calls?version=<version> ====
Line 86: Line 104:
             "callId": "1afeb4340d995938248ce7b3e953fe80",
             "callId": "1afeb4340d995938248ce7b3e953fe80",
             '''"callType": "audio-video",'''
             '''"callType": "audio-video",'''
             '''"callerId": "adam@example.com",'''
             '''"callerId": "alexis@example.com",'''
             '''"progressURL": "wss://loop214.services.mozilla.com:443/call_progress/1afeb4340d995938248ce7b3e953fe80",'''
             '''"progressURL": "wss://loop214.services.mozilla.com:443",'''
             '''"call_url": "http://localhost:5000/calls/FfzMMm2hSP"''' ''// optional''
             '''"state": "init"'''
             '''"urlDate": "1403300282"''' ''//optional''
            '''"callUrl": "http://localhost:5000/calls/FfzMMm2hSP"''' ''// optional''
             '''"urlCreationDate": "1403300282"''' ''//optional''
         }
         }
     ]
     ]
Line 98: Line 117:
* '''callerId''': Identity of calling party. Can be email address, E.164-format phone number (must start with a "+" character), or memento indicated by user at link generation time.
* '''callerId''': Identity of calling party. Can be email address, E.164-format phone number (must start with a "+" character), or memento indicated by user at link generation time.
* '''progressURL''': WebSockets URL the client needs to connect to in order to receive call setup progress information and control call setup.
* '''progressURL''': WebSockets URL the client needs to connect to in order to receive call setup progress information and control call setup.
* '''call_url''': For link-clicker calls, the URL that was used to initiate this call. This is used to revoke the URL at call alerting time, if necessary.
* '''state''': Call setup state for the incoming call (see [[#WebSockets Connection for Call Progress]], below).
* '''urlDate''': For link-clicker calls, the date on which the link was generated.
* '''callUrl''': For link-clicker calls, the URL that was used to initiate this call. This is used to revoke the URL at call alerting time, if necessary.
* '''urlCreationDate''': For link-clicker calls, the date on which the link was generated.


=== New API Calls ===
=== New API Calls ===
Line 119: Line 139:
  {
  {
     calleeName: "Adam Roach"
     calleeName: "Adam Roach"
    calleeId: "adam@nostrum.com" ''// optional, only present if link generator is logged in''
  }
  }


Line 124: Line 145:


==== POST /calls ====
==== POST /calls ====
''New Operation'' -- see {{bug|1015085}}
''New Operation'' -- see {{bug|1015085}} and {{bug|1033573}}


  POST /calls/user HTTP/1.1
  POST /calls HTTP/1.1
  Accept: application/json
  Accept: application/json
  Authorization: ''<authentication information>''
  Authorization: ''<authentication information>''
   
   
  {
  {
     "identity": [
     "calleeId": [
       "adam@example.com",
       "adam@example.com",
       "+12145551234"
       "+12145551234",
      {"phoneNumber": "(817) 569-8900", "mcc": "310"}
     ],
     ],
     "callType": "audio-video"
     "callType": "audio-video",
    "channel": "nightly"
  }
  }


* '''identity''': Array of identities the calling party has for the user they are trying to reach. This is a list of one or more identities of the following types:
* '''calleeId''': Array of identities the calling party has for the user they are trying to reach. This is a list of one or more identities of the following types:
** ''Phone numbers'': fully-qualified (i.e., starting with "+") [http://en.wikipedia.org/wiki/E.164 E.164]-format phone number.
** ''Phone numbers'': fully-qualified (i.e., starting with "+") [http://en.wikipedia.org/wiki/E.164 E.164]-format phone number.
** ''Email addresses''
** ''Email addresses''
* '''callType''': Specifies the type of media the remote party intends to send. Valid values are "audio" or "audio-video".
* '''callType''': Specifies the type of media the remote party intends to send. Valid values are "audio" or "audio-video".
* '''channel''': The release channel of the calling client; this is the value from the <tt>app.update.channel</tt> pref, and can be any one of:
** ''release''
** ''esr''
** ''beta''
** ''aurora''
** ''nightly''
** ''default'' -- I believe this value indicates that the browser is not configured for automatic updates.
** ''mobile'' -- used for the Firefox OS Mobile client
** ''standalone'' -- used for the standalone / "link-clicker" client


  HTTP/1.1 200 OK
  HTTP/1.1 200 OK
Line 153: Line 185:
     "sessionToken": "T1==cGFydG5lcl9pZD00NDcwMD",
     "sessionToken": "T1==cGFydG5lcl9pZD00NDcwMD",
     "callId": "1afeb4340d995938248ce7b3e953fe80",
     "callId": "1afeb4340d995938248ce7b3e953fe80",
     "progressURL": "wss://loop214.services.mozilla.com:443/call_progress"
     "progressURL": "wss://loop214.services.mozilla.com:443",
    "calleeId": "adam@example.com"
  }
  }


The response body is interepreted in the same way as for POST /call/{token}
The response body is interepreted in the same way as for POST /call/{token}


==== POST /call-url/{token} ====
==== PUT /call-url/{token} ====
''New Operation'' -- In discussions with Darrin, it has been assumed that the link generator can update the information associated with the link at a later time.
''New Operation'' -- In discussions with Darrin, it has been assumed that the link generator can update the information associated with the link at a later time.


This operation allows the properties associated with the given token to be modified.
This operation allows the properties associated with the given token to be modified.


  POST /call-url/FfzMMm2hSlP HTTP/1.1
  PUT /call-url/FfzMMm2hSlP HTTP/1.1
  Accept: application/json
  Accept: application/json
  Content-Type: application/json; charset=utf-8
  Content-Type: application/json; charset=utf-8
Line 217: Line 250:
  {
  {
   "messageType": "hello",
   "messageType": "hello",
  "callId: "''<call identifier>''",
   "auth": "''<authentication information>''"
   "auth": "''<authentication information>''"
  }
  }
Line 327: Line 361:


===== Connection Timer =====
===== Connection Timer =====
Upon receiving an "accept" from the called user, the server starts a connection timer of 5 seconds. If the call setup state does not reach "connected" in this time period, then both parties will receive a "progress"/"terminated" message with a reason of "timeout".
Upon receiving an "accept" from the called user, the server starts a connection timer of 10 seconds. If the call setup state does not reach "connected" in this time period, then both parties will receive a "progress"/"terminated" message with a reason of "timeout".


==== Client Timers ====
==== Client Timers ====
Line 407: Line 441:
== URL Generation, Tracking, and Revocation ==
== URL Generation, Tracking, and Revocation ==
During the UX discussions for MVP, several issues were raised that necessitate moving away from the model in which all state is encoded in the URLs themselves. In particular:
During the UX discussions for MVP, several issues were raised that necessitate moving away from the model in which all state is encoded in the URLs themselves. In particular:
* The length of the issued URLs were deemed too cumbersome for users to easily deal with.
* The length of the issued URLs were deemed too cumbersome for users to easily deal with (see {{bug|1026426}}).
* A need to issue a URL with incomplete or incorrect "caller id" information, with the option to complete or correct the information at a later point in time.
* A need to issue a URL with incomplete or incorrect "caller id" information, with the option to complete or correct the information at a later point in time.


Line 431: Line 465:


=== Transition ===
=== Transition ===
It is possible to implement this transition without moving to a different set of servers; and without requiring a "flag day" on which all old URLs stop working. Our current tokens are on the order of 200 characters in length, while the new tokens are 11. If a token is longer than some break-over point, say 80 characters, it can be interpreted as an old-style token (information is extracted directly from the token). If it is shorter than that, then it is assumed to exist in the URL token table, and is looked up there instead.


This is, of course, temporary: after a 30-day period, this functionality can be removed, as all old-style URLs will have expired by that time.
MLP and MVP version are not compatible.
 
Since there is only nightly users on MLP (Loop 0.5.0) and that it only handle call-url, all old call-url will stop working and defined as expired.
 
During the transition from MLP to MVP all old user will have to recreate call-url in order to get the new format.
 
The initial plan was to have both URLs working during a month to smooth the transition but it doesn't worth it with regards to the number of existing call-urls.


== Advanced Call Handling ==
== Advanced Call Handling ==
Line 446: Line 485:
''This section is not yet completed''
''This section is not yet completed''
See http://dev.w3.org/2011/webrtc/editor/webrtc.html#identity
See http://dev.w3.org/2011/webrtc/editor/webrtc.html#identity
[[Category:Firefox Hello]]
canmove, Confirmed users, Bureaucrats and Sysops emeriti
3,698

edits

Navigation menu