vue-advanced-chat icon indicating copy to clipboard operation
vue-advanced-chat copied to clipboard

feat: Add JJSIP based phone option to chat

Open adriavidal opened this issue 5 months ago • 0 comments
trafficstars

Integrates JJSIP.js to enable voice call functionality within chat rooms.

Key changes:

  • Added jjsipService.js to manage JJSIP User Agent, call session lifecycle (make, answer, hangup), and event handling.
  • Modified Room.vue to:
    • Initialize and use jjsipService.
    • Manage call states (incoming, active, errors).
    • Render UI for incoming call notifications (with Answer/Decline) and active call display (with Hang Up).
    • Include an <audio> element for remote audio playback, connected via jjsipService.
  • Updated RoomHeader.vue to include a "Call" button that initiates calls.
  • Made JJSIP credentials (SIP URI, password, server) configurable via props from your demo application (App.vue -> ChatContainer.vue -> ChatWindow.vue -> Room.vue).
  • Added a placeholder vendor/jjsip.min.js as the JJSIP library was not found on standard package managers/CDNs during development.
  • Implemented unit tests for jjsipService.js, Room.vue, and RoomHeader.vue to cover the new functionality, including mocking of the JJSIP library and service interactions.

What kind of change does this PR introduce? (check at least one)

  • [ ] Bugfix
  • [ ] Feature
  • [ ] Code style update
  • [ ] Refactor
  • [ ] Build-related changes
  • [ ] Other, please describe:

Does this PR introduce a breaking change? (check one)

  • [ ] Yes
  • [ ] No

If yes, please describe the impact and migration path for existing applications:

The PR fulfills these requirements:

  • [ ] When resolving a specific issue, it's referenced in the PR's title (e.g. fix #xxx[,#xxx], where "xxx" is the issue number)
  • [ ] All tests are passing

If adding a new feature, the PR's description includes:

  • [ ] A convincing reason for adding this feature (to avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it)

Other information:

adriavidal avatar May 28 '25 06:05 adriavidal