nheko icon indicating copy to clipboard operation
nheko copied to clipboard

VoIP v1 implementation

Open r0hit05 opened this issue 3 years ago • 1 comments

Improved Signalling for 1:1 VoIP

Implementation to support VoIP version 1, as specified by MSC2746

To-Do List (tentative)

  • Change version fields to "1"

    • [x] Add v1 to call events
    • [x] Change methods to allow v0 compatible calling
  • Add invitee field to m.call.invite

    • [x] Add to mtxclient
    • [x] Send invite
    • [x] Handle invite events
  • Add party_id to all VoIP events

    • [x] Add to mtxclient
    • [x] Generate party_id for every call session
  • Introduce m.call.select_answer

    • [x] Add call select struct
    • [x] Handle event (Local user is callee)
    • [x] Send select answer event when reject is accepted (Local user is caller)
    • [x] Send select answer event when answer is accepted (Local user is caller)
  • Introduce m.call.reject

    • [x] Send reject
    • [x] Handle reject event
  • Clarify what actions a client may take in response to an invite

    • [x] Accept the call
    • [x] Reject the call - Reject on every device if one device rejects the call. In case two device have conflicting responses (one device chooses to accept while the other rejects), the caller selects an answer and call continues or ends based on which answer is selected
    • [x] Ignore call - Mute ringtone.
  • Reason codes for m.call.hangup

    • [x] Add new reason codes to hangup struct
    • [ ] Send reasonable reason for respective hangup events
  • Introduce m.call.negotiate

    • [x] Add struct for call negotiation
    • [ ] Send offer negotiation
    • [ ] Accept offer by sending answer
  • Changes to m.call.candidate

    • [ ] Change handle events to appoint correct candidates to their respective invites
  • Add explicit recommendations for call event liveness

    • [ ] Check invite event validity against lifetime by using the age field in sync response.
    • [ ] Send signal on valid invite only after processing sync response
  • [x] Define the configurations of WebRTC streams and tracks
  • [ ] Designate one party as polite
  • [ ] Introduce recommendations for batching of ICE candidates
  • [ ] Mandate the end-of-candidates candidate
  • [ ] Add DTMF
  • [x] Specify exact grammar for VoIP IDs
  • [ ] Specify behavior on room leave
  • [ ] Clarify that supported codecs should follow the WebRTC spec

r0hit05 avatar Aug 20 '22 22:08 r0hit05

Seems to be on the right track to me, I just found some minor nits or pieces we could discuss, I guess :3

deepbluev7 avatar Aug 29 '22 22:08 deepbluev7

Looks good for me so far. If you fix the CI, I think we can merge it :3

deepbluev7 avatar Sep 30 '22 11:09 deepbluev7

Hm, I think you messed up the rebase

deepbluev7 avatar Oct 12 '22 11:10 deepbluev7

Hm, I think you messed up the rebase

How do I fix it?

r0hit05 avatar Oct 13 '22 15:10 r0hit05

Looks good to me, thank you so much!

deepbluev7 avatar Oct 14 '22 13:10 deepbluev7