opensips-js 0.1.32 → 0.1.34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -74,6 +74,10 @@ declare class AudioModule {
74
74
  private vadSessionsState;
75
75
  private vadIntervals;
76
76
  private vadMrsIntervals;
77
+ private ringbackTimers;
78
+ private ringbackAudioContexts;
79
+ private ringbackSessionProgressReceived;
80
+ private hangupBeepContext;
77
81
  private VUMeter;
78
82
  private MicVAD;
79
83
  managedAudioContext: ManagedAudioContext;
@@ -208,6 +212,33 @@ declare class AudioModule {
208
212
  muteCaller(callId: string): void;
209
213
  unmuteCaller(callId: string): void;
210
214
  terminateCall(callId: string): void;
215
+ /**
216
+ * Handle SIP response for ringback tone logic
217
+ * Called from onTransportData when 100/180/183 responses are received
218
+ * Can be called with either session ID or call_id from SIP message
219
+ * @param identifier - The call/session ID or SIP call_id
220
+ * @param statusCode - SIP status code (100, 180, or 183)
221
+ */
222
+ handleSipResponseForRingback(identifier: string, statusCode: number): void;
223
+ /**
224
+ * Start playing a local ringback tone (beep sound) for a session
225
+ * Standard ringback tone pattern: 440Hz + 480Hz, 1 second on, 3 seconds off
226
+ */
227
+ private startLocalRingbackTone;
228
+ /**
229
+ * Stop playing the local ringback tone for a session
230
+ */
231
+ private stopLocalRingbackTone;
232
+ /**
233
+ * Clean up ringback tone resources for a session
234
+ * Called when call ends, fails, or is confirmed
235
+ */
236
+ private cleanupRingbackTone;
237
+ /**
238
+ * Play a hangup beep sound when a call is terminated
239
+ * Standard hangup beep: single tone, short duration (~200ms)
240
+ */
241
+ private playHangupBeep;
211
242
  transferCall(callId: string, target: string): Error;
212
243
  mergeCall(roomId: number): void;
213
244
  mergeCallByIds(firstCallId: string, secondCallId: string): void;