Talkilla/SPA API: Difference between revisions

Line 69: Line 69:


==Receiving a call==
==Receiving a call==
  postMessage({topic: "offer", data: {from: "+16501231234", offer: <offer>}});
  postMessage({topic: "offer", data: {peer: "+16501231234", offer: {type:"offer", sdp:"v=0\r\no=Mozilla-SIPUA..."}}});


Talkilla will either reply with an 'answer' message:
Talkilla will either reply with an 'answer' message:
event.data contains
event.data contains
  {topic: "answer", data: {to: "+16501231234", answer: <answer>}}
  {topic: "answer", data: {peer: "+16501231234", answer: {type:"answer", sdp:"v=0\r\no=Mozilla-SIPUA..."}}}
or reject the call:
 
or reject the call: (not implemented yet)
event.data contains
event.data contains
  {topic: "reject", data: {to: "+16501231234"}}
  {topic: "reject", data: {peer: "+16501231234"}}


==Placing a call==
==Placing a call==
Confirmed users
87

edits