@siphon-project/control 0.11.0 → 0.12.0
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.cjs +4 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +17 -2
- package/dist/index.d.ts +17 -2
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1815,6 +1815,12 @@ interface Dialing {
|
|
|
1815
1815
|
type RecordDirection = "ingress" | "egress" | "both";
|
|
1816
1816
|
/** The channel layout of the recorded file. */
|
|
1817
1817
|
type RecordChannels = "mono" | "stereo";
|
|
1818
|
+
/**
|
|
1819
|
+
* The file a recording is written as: `"wav"` (the server's default) or
|
|
1820
|
+
* `"ogg_opus"` (RFC 7845), about a seventh of the size. An engine that cannot
|
|
1821
|
+
* write Ogg Opus refuses the verb.
|
|
1822
|
+
*/
|
|
1823
|
+
type RecordFormat = "wav" | "ogg_opus";
|
|
1818
1824
|
/** Optional shaping for {@link Call.recordStart}. */
|
|
1819
1825
|
interface RecordOptions {
|
|
1820
1826
|
/** Which side to record (`"ingress"` server-side when unset). */
|
|
@@ -1827,6 +1833,14 @@ interface RecordOptions {
|
|
|
1827
1833
|
silenceMs?: number;
|
|
1828
1834
|
/** Where the engine writes the file. */
|
|
1829
1835
|
path?: string;
|
|
1836
|
+
/** The file format (`"wav"` server-side when unset). */
|
|
1837
|
+
format?: RecordFormat;
|
|
1838
|
+
/**
|
|
1839
|
+
* Opus target bitrate in bits per second, `"ogg_opus"` only. The server
|
|
1840
|
+
* refuses it with `"wav"` and outside 6000 to 510000 (RFC 6716 §2.1.1);
|
|
1841
|
+
* unset is its per-channel default.
|
|
1842
|
+
*/
|
|
1843
|
+
bitrateBps?: number;
|
|
1830
1844
|
}
|
|
1831
1845
|
/** What the server answers an accepted `record_start` with. */
|
|
1832
1846
|
interface Recording {
|
|
@@ -2353,7 +2367,8 @@ declare class Call {
|
|
|
2353
2367
|
*/
|
|
2354
2368
|
streamStop(options?: StreamStopOptions): Promise<void>;
|
|
2355
2369
|
/**
|
|
2356
|
-
* Record this call's decoded audio to a wav
|
|
2370
|
+
* Record this call's decoded audio to a file: wav by default, or Ogg Opus
|
|
2371
|
+
* with `format: "ogg_opus"`.
|
|
2357
2372
|
*
|
|
2358
2373
|
* The reply names the `recordingId` a later {@link Call.recordStop}
|
|
2359
2374
|
* addresses. It is **not** the file: `RecordingFinished` fires when the file
|
|
@@ -2545,4 +2560,4 @@ declare class SipServer {
|
|
|
2545
2560
|
close(): Promise<void>;
|
|
2546
2561
|
}
|
|
2547
2562
|
|
|
2548
|
-
export { type AcceptReferOptions, type AnchoredAnswerOptions, type AppEvent, type AppEventHandler, type BridgeFailedPayload, type BridgeOptions, type BridgeRole, type BridgeStage, Call, type CallEvent, type CallHandler, CallStream, type ChannelBridgedPayload, type ChannelDtmfPayload, type ChannelSnapshot, type ChannelUnbridgedPayload, type ClientConfig, type ClientEvent, type CommandTransport, type ConnectionEventSink, ControlClient, ControlError, type ControlErrorCode, type ControlErrorKind, ControlServer, DESCRIBE, type DialAnsweredPayload, type DialBranchCause, type DialBranchOutcome, type DialBranchPayload, type DialFailedPayload, type DialOffer, type DialOptions, type DialTarget, type Dialing, type DialogDirection, type DialogIdentity, type DialogState, type DialogStateChangedPayload, type DtmfOptions, type EventFrame, type EventSink, EventStream, type FrameType, GET_VAR, HELLO, type HelloArgs, type HelloResult, MODULE_SIP, MODULE_SMPP, MODULE_SS7, type MediaFlags, type MediaLegSummary, type MediaStartedPayload, type MediaSummaryPayload, OUTBOUND_REGISTRATIONS, type OriginateMedia, type OriginateOptions, type OriginateRing, type OriginatedGroup, type OutboundRegistration, type OutboundRegistrationsReply, PROTOCOL_VERSION, type PeerHangupPolicy, type PlayFinishedPayload, type PlayOptions, type PlaySource, type PlayStartedPayload, REGISTRATIONS, RESYNC, type RecordChannels, type RecordDirection, type RecordOptions, type Recording, type ReferReplaces, type RegistrantChangedPayload, type RegistrationChangedPayload, type RegistrationContact, type RegistrationsReply, type ReplyError, type ReplyFrame, type ReplyStatus, type ResponseOptions, type ResyncResult, type RingOptions, type RouteOptions, type RouteTarget, type RouteTargetObject, SET_VAR, SUBPROTOCOL, type ServerConfig, type SessionRefresher, type SessionTimer, SipClient, type SipEventKind, SipServer, SipVerb, type SipVerbToken, type StreamMode, type StreamOptions, type StreamStopOptions, type TransferOutcomePayload, type TransferReplaces, type TransferRequestedPayload, type TransferStage, type TransferTimedOutPayload, type WsBridgeEndedPayload, type WsBridgeStartedPayload, type WsTeeEndedPayload, type WsTeeStartedPayload, dialArgs, encodeCommand, isBridgeFinal, isDialFinal, isTransferFinal, originateAorArgs, originateArgs, parseInboundFrame, recordStartArgs, recordStopArgs, sipEventKind, transferOutcome };
|
|
2563
|
+
export { type AcceptReferOptions, type AnchoredAnswerOptions, type AppEvent, type AppEventHandler, type BridgeFailedPayload, type BridgeOptions, type BridgeRole, type BridgeStage, Call, type CallEvent, type CallHandler, CallStream, type ChannelBridgedPayload, type ChannelDtmfPayload, type ChannelSnapshot, type ChannelUnbridgedPayload, type ClientConfig, type ClientEvent, type CommandTransport, type ConnectionEventSink, ControlClient, ControlError, type ControlErrorCode, type ControlErrorKind, ControlServer, DESCRIBE, type DialAnsweredPayload, type DialBranchCause, type DialBranchOutcome, type DialBranchPayload, type DialFailedPayload, type DialOffer, type DialOptions, type DialTarget, type Dialing, type DialogDirection, type DialogIdentity, type DialogState, type DialogStateChangedPayload, type DtmfOptions, type EventFrame, type EventSink, EventStream, type FrameType, GET_VAR, HELLO, type HelloArgs, type HelloResult, MODULE_SIP, MODULE_SMPP, MODULE_SS7, type MediaFlags, type MediaLegSummary, type MediaStartedPayload, type MediaSummaryPayload, OUTBOUND_REGISTRATIONS, type OriginateMedia, type OriginateOptions, type OriginateRing, type OriginatedGroup, type OutboundRegistration, type OutboundRegistrationsReply, PROTOCOL_VERSION, type PeerHangupPolicy, type PlayFinishedPayload, type PlayOptions, type PlaySource, type PlayStartedPayload, REGISTRATIONS, RESYNC, type RecordChannels, type RecordDirection, type RecordFormat, type RecordOptions, type Recording, type ReferReplaces, type RegistrantChangedPayload, type RegistrationChangedPayload, type RegistrationContact, type RegistrationsReply, type ReplyError, type ReplyFrame, type ReplyStatus, type ResponseOptions, type ResyncResult, type RingOptions, type RouteOptions, type RouteTarget, type RouteTargetObject, SET_VAR, SUBPROTOCOL, type ServerConfig, type SessionRefresher, type SessionTimer, SipClient, type SipEventKind, SipServer, SipVerb, type SipVerbToken, type StreamMode, type StreamOptions, type StreamStopOptions, type TransferOutcomePayload, type TransferReplaces, type TransferRequestedPayload, type TransferStage, type TransferTimedOutPayload, type WsBridgeEndedPayload, type WsBridgeStartedPayload, type WsTeeEndedPayload, type WsTeeStartedPayload, dialArgs, encodeCommand, isBridgeFinal, isDialFinal, isTransferFinal, originateAorArgs, originateArgs, parseInboundFrame, recordStartArgs, recordStopArgs, sipEventKind, transferOutcome };
|
package/dist/index.d.ts
CHANGED
|
@@ -1815,6 +1815,12 @@ interface Dialing {
|
|
|
1815
1815
|
type RecordDirection = "ingress" | "egress" | "both";
|
|
1816
1816
|
/** The channel layout of the recorded file. */
|
|
1817
1817
|
type RecordChannels = "mono" | "stereo";
|
|
1818
|
+
/**
|
|
1819
|
+
* The file a recording is written as: `"wav"` (the server's default) or
|
|
1820
|
+
* `"ogg_opus"` (RFC 7845), about a seventh of the size. An engine that cannot
|
|
1821
|
+
* write Ogg Opus refuses the verb.
|
|
1822
|
+
*/
|
|
1823
|
+
type RecordFormat = "wav" | "ogg_opus";
|
|
1818
1824
|
/** Optional shaping for {@link Call.recordStart}. */
|
|
1819
1825
|
interface RecordOptions {
|
|
1820
1826
|
/** Which side to record (`"ingress"` server-side when unset). */
|
|
@@ -1827,6 +1833,14 @@ interface RecordOptions {
|
|
|
1827
1833
|
silenceMs?: number;
|
|
1828
1834
|
/** Where the engine writes the file. */
|
|
1829
1835
|
path?: string;
|
|
1836
|
+
/** The file format (`"wav"` server-side when unset). */
|
|
1837
|
+
format?: RecordFormat;
|
|
1838
|
+
/**
|
|
1839
|
+
* Opus target bitrate in bits per second, `"ogg_opus"` only. The server
|
|
1840
|
+
* refuses it with `"wav"` and outside 6000 to 510000 (RFC 6716 §2.1.1);
|
|
1841
|
+
* unset is its per-channel default.
|
|
1842
|
+
*/
|
|
1843
|
+
bitrateBps?: number;
|
|
1830
1844
|
}
|
|
1831
1845
|
/** What the server answers an accepted `record_start` with. */
|
|
1832
1846
|
interface Recording {
|
|
@@ -2353,7 +2367,8 @@ declare class Call {
|
|
|
2353
2367
|
*/
|
|
2354
2368
|
streamStop(options?: StreamStopOptions): Promise<void>;
|
|
2355
2369
|
/**
|
|
2356
|
-
* Record this call's decoded audio to a wav
|
|
2370
|
+
* Record this call's decoded audio to a file: wav by default, or Ogg Opus
|
|
2371
|
+
* with `format: "ogg_opus"`.
|
|
2357
2372
|
*
|
|
2358
2373
|
* The reply names the `recordingId` a later {@link Call.recordStop}
|
|
2359
2374
|
* addresses. It is **not** the file: `RecordingFinished` fires when the file
|
|
@@ -2545,4 +2560,4 @@ declare class SipServer {
|
|
|
2545
2560
|
close(): Promise<void>;
|
|
2546
2561
|
}
|
|
2547
2562
|
|
|
2548
|
-
export { type AcceptReferOptions, type AnchoredAnswerOptions, type AppEvent, type AppEventHandler, type BridgeFailedPayload, type BridgeOptions, type BridgeRole, type BridgeStage, Call, type CallEvent, type CallHandler, CallStream, type ChannelBridgedPayload, type ChannelDtmfPayload, type ChannelSnapshot, type ChannelUnbridgedPayload, type ClientConfig, type ClientEvent, type CommandTransport, type ConnectionEventSink, ControlClient, ControlError, type ControlErrorCode, type ControlErrorKind, ControlServer, DESCRIBE, type DialAnsweredPayload, type DialBranchCause, type DialBranchOutcome, type DialBranchPayload, type DialFailedPayload, type DialOffer, type DialOptions, type DialTarget, type Dialing, type DialogDirection, type DialogIdentity, type DialogState, type DialogStateChangedPayload, type DtmfOptions, type EventFrame, type EventSink, EventStream, type FrameType, GET_VAR, HELLO, type HelloArgs, type HelloResult, MODULE_SIP, MODULE_SMPP, MODULE_SS7, type MediaFlags, type MediaLegSummary, type MediaStartedPayload, type MediaSummaryPayload, OUTBOUND_REGISTRATIONS, type OriginateMedia, type OriginateOptions, type OriginateRing, type OriginatedGroup, type OutboundRegistration, type OutboundRegistrationsReply, PROTOCOL_VERSION, type PeerHangupPolicy, type PlayFinishedPayload, type PlayOptions, type PlaySource, type PlayStartedPayload, REGISTRATIONS, RESYNC, type RecordChannels, type RecordDirection, type RecordOptions, type Recording, type ReferReplaces, type RegistrantChangedPayload, type RegistrationChangedPayload, type RegistrationContact, type RegistrationsReply, type ReplyError, type ReplyFrame, type ReplyStatus, type ResponseOptions, type ResyncResult, type RingOptions, type RouteOptions, type RouteTarget, type RouteTargetObject, SET_VAR, SUBPROTOCOL, type ServerConfig, type SessionRefresher, type SessionTimer, SipClient, type SipEventKind, SipServer, SipVerb, type SipVerbToken, type StreamMode, type StreamOptions, type StreamStopOptions, type TransferOutcomePayload, type TransferReplaces, type TransferRequestedPayload, type TransferStage, type TransferTimedOutPayload, type WsBridgeEndedPayload, type WsBridgeStartedPayload, type WsTeeEndedPayload, type WsTeeStartedPayload, dialArgs, encodeCommand, isBridgeFinal, isDialFinal, isTransferFinal, originateAorArgs, originateArgs, parseInboundFrame, recordStartArgs, recordStopArgs, sipEventKind, transferOutcome };
|
|
2563
|
+
export { type AcceptReferOptions, type AnchoredAnswerOptions, type AppEvent, type AppEventHandler, type BridgeFailedPayload, type BridgeOptions, type BridgeRole, type BridgeStage, Call, type CallEvent, type CallHandler, CallStream, type ChannelBridgedPayload, type ChannelDtmfPayload, type ChannelSnapshot, type ChannelUnbridgedPayload, type ClientConfig, type ClientEvent, type CommandTransport, type ConnectionEventSink, ControlClient, ControlError, type ControlErrorCode, type ControlErrorKind, ControlServer, DESCRIBE, type DialAnsweredPayload, type DialBranchCause, type DialBranchOutcome, type DialBranchPayload, type DialFailedPayload, type DialOffer, type DialOptions, type DialTarget, type Dialing, type DialogDirection, type DialogIdentity, type DialogState, type DialogStateChangedPayload, type DtmfOptions, type EventFrame, type EventSink, EventStream, type FrameType, GET_VAR, HELLO, type HelloArgs, type HelloResult, MODULE_SIP, MODULE_SMPP, MODULE_SS7, type MediaFlags, type MediaLegSummary, type MediaStartedPayload, type MediaSummaryPayload, OUTBOUND_REGISTRATIONS, type OriginateMedia, type OriginateOptions, type OriginateRing, type OriginatedGroup, type OutboundRegistration, type OutboundRegistrationsReply, PROTOCOL_VERSION, type PeerHangupPolicy, type PlayFinishedPayload, type PlayOptions, type PlaySource, type PlayStartedPayload, REGISTRATIONS, RESYNC, type RecordChannels, type RecordDirection, type RecordFormat, type RecordOptions, type Recording, type ReferReplaces, type RegistrantChangedPayload, type RegistrationChangedPayload, type RegistrationContact, type RegistrationsReply, type ReplyError, type ReplyFrame, type ReplyStatus, type ResponseOptions, type ResyncResult, type RingOptions, type RouteOptions, type RouteTarget, type RouteTargetObject, SET_VAR, SUBPROTOCOL, type ServerConfig, type SessionRefresher, type SessionTimer, SipClient, type SipEventKind, SipServer, SipVerb, type SipVerbToken, type StreamMode, type StreamOptions, type StreamStopOptions, type TransferOutcomePayload, type TransferReplaces, type TransferRequestedPayload, type TransferStage, type TransferTimedOutPayload, type WsBridgeEndedPayload, type WsBridgeStartedPayload, type WsTeeEndedPayload, type WsTeeStartedPayload, dialArgs, encodeCommand, isBridgeFinal, isDialFinal, isTransferFinal, originateAorArgs, originateArgs, parseInboundFrame, recordStartArgs, recordStopArgs, sipEventKind, transferOutcome };
|
package/dist/index.js
CHANGED
|
@@ -946,6 +946,8 @@ function recordStartArgs(options) {
|
|
|
946
946
|
if (options.maxDurationMs !== void 0) args.max_duration_ms = options.maxDurationMs;
|
|
947
947
|
if (options.silenceMs !== void 0) args.silence_ms = options.silenceMs;
|
|
948
948
|
if (options.path !== void 0) args.path = options.path;
|
|
949
|
+
if (options.format !== void 0) args.format = options.format;
|
|
950
|
+
if (options.bitrateBps !== void 0) args.bitrate_bps = options.bitrateBps;
|
|
949
951
|
return args;
|
|
950
952
|
}
|
|
951
953
|
function recordStopArgs(recordingId) {
|
|
@@ -1614,7 +1616,8 @@ var Call = class {
|
|
|
1614
1616
|
await this.sip(SipVerb.StreamStop, { mode: options?.mode ?? "tee" });
|
|
1615
1617
|
}
|
|
1616
1618
|
/**
|
|
1617
|
-
* Record this call's decoded audio to a wav
|
|
1619
|
+
* Record this call's decoded audio to a file: wav by default, or Ogg Opus
|
|
1620
|
+
* with `format: "ogg_opus"`.
|
|
1618
1621
|
*
|
|
1619
1622
|
* The reply names the `recordingId` a later {@link Call.recordStop}
|
|
1620
1623
|
* addresses. It is **not** the file: `RecordingFinished` fires when the file
|