-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement Janus SDK #347
base: main
Are you sure you want to change the base?
Implement Janus SDK #347
Commits on Mar 11, 2024
-
feat: implement websocket connection management and transaction manager
* Introduces `Connection` class to handle WebSocket connections. * Defines connection states (connecting, connected, closing, closed) and exposes getters. * Implements event listeners for connection state changes and messages. * Creates `TransactionManager` class to manage transactions over the connection. * Enables queuing transactions when the connection is unavailable. * Binds `TransactionManager` to the `Connection` for message handling. This commit is part of a major change to support reliable communication and transaction management.
Configuration menu - View commit details
-
Copy full SHA for 917fff3 - Browse repository at this point
Copy the full SHA 917fff3View commit details -
chore: add helper functions for message handling and promise management
* Introduces `isSipError`, `isSipHangupEvent`, `isSIPIncomingCallMessage`, `isSIPCallAcceptedEvent`, and `isSipRingingEvent` functions in `janus.ts` to identify specific Janus response types for SIP events. * Adds a `deferredPromise` function in `promise.ts` to create deferred promises for asynchronous operations. These functions enhance code readability and provide flexible promise control for improved message and task management.
Configuration menu - View commit details
-
Copy full SHA for fe571b2 - Browse repository at this point
Copy the full SHA fe571b2View commit details -
chore: add eventemitter3 dependency
* Includes eventemitter3 for event management within the connection class. This dependency provides a robust event system for the WebSocket connection.
Configuration menu - View commit details
-
Copy full SHA for 3ba312e - Browse repository at this point
Copy the full SHA 3ba312eView commit details -
feat: implement keep-alive-agent for connection maintenance
* Introduces `KeepAliveAgent` class to maintain connection health. * Utilizes `Connection` and `transactionManager` for communication. * Sends periodic keep-alive transactions (default 10 seconds) to the server. * Monitors connection state and restarts keep-alive on reconnection. * Implements failure handling with a configurable retry mechanism. This feature ensures the connection remains active and facilitates reliable communication.
Configuration menu - View commit details
-
Copy full SHA for 56ae7ce - Browse repository at this point
Copy the full SHA 56ae7ceView commit details -
feat: implement sip-registration-agent for managing sip registration
* Introduces `SIPRegistrationAgent` class to handle SIP registration. * Interacts with `Connection`, `transactionManager`, and `Handler` for communication. * Manages registration state (`unregistered`, `registering`, `registered`, `error`). * Sends SIP registration transactions using `transactionManager`. * Handles registration responses, updating state and triggering events. * Implements error handling and signaling through events. * Includes a placeholder for `unregister()` for future implementation. This feature enables automatic SIP registration with error handling and event notifications.
Configuration menu - View commit details
-
Copy full SHA for 4e0d42e - Browse repository at this point
Copy the full SHA 4e0d42eView commit details -
feat: implement call class for managing sip calls
* Introduces `Call` class to represent SIP calls. * Manages call states (new, connecting, ringing, active, held, done). * Handles incoming and outbound call scenarios. * Provides methods for answering, hanging up, and getting call stats (placeholder). * Includes functionality for setting Telnyx call control IDs. feat: implement call-agent for handling sip call interactions * Introduces `CallAgent` class for managing SIP call flow. * Creates and manages `Call` instances for incoming and outgoing calls. * Interacts with `Connection`, `Peer`, `TransactionManager`, and `Handler`. * Handles incoming call events (`SIPIncomingCallMessage`). * Handles SIP hangup events (`JanusSIPHangupEvent`). * Handles SIP call accepted events (`JanusSIPCallAcceptedEvent`). * Triggers events (`SwEvent.Notification`) for call updates. * Implements audio handling for ringtones and ringback tones. feat: Implement Peer class for WebRTC peer connections * Introduces `Peer` class to handle WebRTC peer connections for calls. * Supports creating offer and answer peers based on call options. * Handles local media stream acquisition with constraints. * Manages adding media tracks to the peer connection. * Provides methods for handling ICE trickles and negotiation needed events. * Implements methods for setting remote SDP and closing the connection. * Triggers events (`SwEvent.MediaError`) for media acquisition failures. feat: Implement ICETrickleTransaction for sending ICE candidates * Introduces `ICETrickleTransaction` to send ICE candidates to Janus. * Constructs a Janus `trickle` request with candidate information. * Handles success and error responses from Janus on message received. feat: Implement SIPAnswerTransaction for sending SIP answer * Introduces `SIPAnswerTransaction` for sending SIP answer messages. * Constructs a Janus `message` request with answer SDP and other details. * Handles success (`isSIPCallAcceptedEvent`) and error (`isSipError`) responses. * Resolves with call ID on successful SIP answer reception. feat: Implement SIPCallTransaction for initiating SIP calls * Introduces `SIPCallTransaction` for initiating SIP calls via Janus. * Constructs a Janus `message` request with call details, URI, and SDP. * Handles success (`isSipRingingEvent`) and error (`isSipError`) responses. * Resolves with call ID, Telnyx IDs, on successful SIP call initiation. feat: Implement SIPHangupTransaction for terminating SIP calls * Introduces `SIPHangupTransaction` for sending SIP hangup messages. * Constructs a Janus `message` request with the hangup request. * Handles success (`janus === ack`) and error (`janus === error`) responses. * Resolves with `true` on successful SIP hangup.
Configuration menu - View commit details
-
Copy full SHA for aab56da - Browse repository at this point
Copy the full SHA aab56daView commit details -
feat: implement janus-client class for core sip client functionality
* Introduces JanusClient class as the central component for SIP calls. * Manages connection to Janus server, plugin attachment, and SIP registration. * Handles call creation and management through CallAgent. * Provides methods for connecting, making calls, getting calls, and setting remote media element. * Includes event handling for listening to call events. * Implements stubs for enabling/disabling webcam and disconnection (to be completed). BREAKING CHANGE: Introduces a new class for core functionality, potentially affecting code organization and usage.
Configuration menu - View commit details
-
Copy full SHA for dd64f2f - Browse repository at this point
Copy the full SHA dd64f2fView commit details
Commits on Mar 12, 2024
-
Configuration menu - View commit details
-
Copy full SHA for b0d9024 - Browse repository at this point
Copy the full SHA b0d9024View commit details
Commits on Mar 15, 2024
-
Configuration menu - View commit details
-
Copy full SHA for dd042c2 - Browse repository at this point
Copy the full SHA dd042c2View commit details
Commits on Mar 31, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 4b43c16 - Browse repository at this point
Copy the full SHA 4b43c16View commit details
Commits on Apr 1, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 369581a - Browse repository at this point
Copy the full SHA 369581aView commit details -
Configuration menu - View commit details
-
Copy full SHA for ab601f7 - Browse repository at this point
Copy the full SHA ab601f7View commit details
Commits on Apr 2, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 67e1133 - Browse repository at this point
Copy the full SHA 67e1133View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4dbe549 - Browse repository at this point
Copy the full SHA 4dbe549View commit details
Commits on Apr 3, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 312978d - Browse repository at this point
Copy the full SHA 312978dView commit details
Commits on Apr 8, 2024
-
Configuration menu - View commit details
-
Copy full SHA for ce1bffa - Browse repository at this point
Copy the full SHA ce1bffaView commit details