diff --git a/packages/client/src/Call.ts b/packages/client/src/Call.ts index 089fdfafc4..e1d7ea0ca7 100644 --- a/packages/client/src/Call.ts +++ b/packages/client/src/Call.ts @@ -64,6 +64,8 @@ import type { RejectCallResponse, RequestPermissionRequest, RequestPermissionResponse, + RingCallRequest, + RingCallResponse, SendCallEventRequest, SendCallEventResponse, SendReactionRequest, @@ -731,12 +733,14 @@ export class Call { * @param params.ring if set to true, a `call.ring` event will be sent to the call members. * @param params.notify if set to true, a `call.notification` event will be sent to the call members. * @param params.members_limit the total number of members to return as part of the response. + * @param params.video if set to true, in a ringing scenario, mobile SDKs will show "incoming video call", audio only otherwise. */ get = async (params?: { ring?: boolean; notify?: boolean; members_limit?: number; - }) => { + video?: boolean; + }): Promise => { await this.setup(); const response = await this.streamClient.get( this.streamClientBasePath, @@ -813,11 +817,14 @@ export class Call { }; /** - * A shortcut for {@link Call.get} with `ring` parameter set to `true`. - * Will send a `call.ring` event to the call members. + * Sends a ring notification to the provided users who are not already in the call. + * All users should be members of the call. */ - ring = async (): Promise => { - return await this.get({ ring: true }); + ring = async (data: RingCallRequest = {}): Promise => { + return this.streamClient.post( + `${this.streamClientBasePath}/ring`, + data, + ); }; /** diff --git a/packages/client/src/StreamVideoClient.ts b/packages/client/src/StreamVideoClient.ts index 164deaee85..6dae9b01d9 100644 --- a/packages/client/src/StreamVideoClient.ts +++ b/packages/client/src/StreamVideoClient.ts @@ -199,11 +199,6 @@ export class StreamVideoClient { * @param e the event. */ private initCallFromEvent = async (e: CallCreatedEvent | CallRingEvent) => { - if (this.state.connectedUser?.id === e.call.created_by.id) { - this.logger.debug(`Ignoring ${e.type} event sent by the current user`); - return; - } - try { const concurrencyTag = getCallInitConcurrencyTag(e.call_cid); await withoutConcurrency(concurrencyTag, async () => { diff --git a/packages/client/src/__tests__/StreamVideoClient.api.test.ts b/packages/client/src/__tests__/StreamVideoClient.api.test.ts index 5ff52c3752..c204f20190 100644 --- a/packages/client/src/__tests__/StreamVideoClient.api.test.ts +++ b/packages/client/src/__tests__/StreamVideoClient.api.test.ts @@ -10,34 +10,20 @@ const secret = process.env.STREAM_SECRET!; const serverClient = new StreamClient(apiKey, secret); -const tokenProvider = (userId: string) => { - return async () => { - return new Promise((resolve) => { - setTimeout(() => { - const token = serverClient.createToken( - userId, - undefined, - Math.round(Date.now() / 1000 - 10), - ); - resolve(token); - }, 100); - }); - }; -}; - describe('StreamVideoClient - coordinator API', () => { let client: StreamVideoClient; - const user = { - id: 'sara', - }; beforeAll(() => { + const user = { id: 'sara' }; client = new StreamVideoClient(apiKey, { // tests run in node, so we have to fake being in browser env browser: true, timeout: 15000, }); - client.connectUser(user, tokenProvider(user.id)); + client.connectUser( + user, + serverClient.generateUserToken({ user_id: user.id }), + ); }); it('query calls', { retry: 3, timeout: 20000 }, async () => { diff --git a/packages/client/src/__tests__/StreamVideoClient.ringing.test.ts b/packages/client/src/__tests__/StreamVideoClient.ringing.test.ts index f68e1692b0..1900c58fb1 100644 --- a/packages/client/src/__tests__/StreamVideoClient.ringing.test.ts +++ b/packages/client/src/__tests__/StreamVideoClient.ringing.test.ts @@ -120,6 +120,56 @@ describe('StreamVideoClient Ringing', () => { }); }); + describe('ringing individual members', () => { + it('should ring individual members', async () => { + const oliverCall = oliverClient.call('default', crypto.randomUUID()); + await oliverCall.create({ + ring: false, // don't ring all members by default + data: { + members: [ + { user_id: 'oliver' }, + { user_id: 'sacha' }, + { user_id: 'marcelo' }, + ], + }, + }); + + // no one should get a ring event yet + const oliverRing = expectEvent(oliverClient, 'call.ring', 500); + const sachaRing = expectEvent(sachaClient, 'call.ring', 500); + const marceloRing = expectEvent(marceloClient, 'call.ring', 500); + await expect( + Promise.all([oliverRing, sachaRing, marceloRing]), + ).rejects.toThrow(); + + // oliver is calling sacha. only sacha should get a ring event + const sachaIndividualRing = expectEvent(sachaClient, 'call.ring'); + const marceloIndividualRing = expectEvent(marceloClient, 'call.ring'); + await oliverCall.ring({ members_ids: ['sacha'] }); + await expect(sachaIndividualRing).resolves.toHaveProperty( + 'call.cid', + oliverCall.cid, + ); + await expect(marceloIndividualRing).rejects.toThrow(); + + const sachaCall = await expectCall(sachaClient, oliverCall.cid); + expect(sachaCall).toBeDefined(); + + // sacha is calling marcelo. only marcelo should get a ring event + const oliverIndividualRing = expectEvent(oliverClient, 'call.ring'); + const marceloIndividualRing2 = expectEvent(marceloClient, 'call.ring'); + await sachaCall.ring({ members_ids: ['marcelo'] }); + await expect(marceloIndividualRing2).resolves.toHaveProperty( + 'call.cid', + sachaCall.cid, + ); + await expect(oliverIndividualRing).rejects.toThrow(); + + const marceloCall = await expectCall(marceloClient, sachaCall.cid); + expect(marceloCall).toBeDefined(); + }); + }); + describe('ringing concurrently', async () => { it('dispatches `call.ring` before `call.created`', async () => { oliverClient.streamClient.dispatchEvent( diff --git a/packages/client/src/gen/coordinator/index.ts b/packages/client/src/gen/coordinator/index.ts index ca5874381d..37a8f0ef52 100644 --- a/packages/client/src/gen/coordinator/index.ts +++ b/packages/client/src/gen/coordinator/index.ts @@ -1207,7 +1207,7 @@ export interface CallMissedEvent { user: UserResponse; } /** - * + * This event is sent when a moderation blur action is applied to a user's video stream * @export * @interface CallModerationBlurEvent */ @@ -1225,26 +1225,26 @@ export interface CallModerationBlurEvent { */ created_at: string; /** - * + * Custom data associated with the moderation action * @type {{ [key: string]: any; }} * @memberof CallModerationBlurEvent */ custom: { [key: string]: any }; /** - * + * The type of event: "call.moderation_blur" in this case * @type {string} * @memberof CallModerationBlurEvent */ type: string; /** - * + * The user ID whose video stream is being blurred * @type {string} * @memberof CallModerationBlurEvent */ user_id: string; } /** - * + * This event is sent when a moderation warning is issued to a user * @export * @interface CallModerationWarningEvent */ @@ -1262,25 +1262,25 @@ export interface CallModerationWarningEvent { */ created_at: string; /** - * + * Custom data associated with the moderation action * @type {{ [key: string]: any; }} * @memberof CallModerationWarningEvent */ custom: { [key: string]: any }; /** - * + * The warning message * @type {string} * @memberof CallModerationWarningEvent */ message: string; /** - * + * The type of event: "call.moderation_warning" in this case * @type {string} * @memberof CallModerationWarningEvent */ type: string; /** - * + * The user ID who is receiving the warning * @type {string} * @memberof CallModerationWarningEvent */ @@ -2221,6 +2221,12 @@ export interface CallSessionResponse { * @memberof CallSessionResponse */ anonymous_participant_count: number; + /** + * + * @type {string} + * @memberof CallSessionResponse + */ + created_at: string; /** * * @type {string} @@ -2532,6 +2538,55 @@ export interface CallStateResponseFields { */ own_capabilities: Array; } +/** + * + * @export + * @interface CallStatsLocation + */ +export interface CallStatsLocation { + /** + * + * @type {number} + * @memberof CallStatsLocation + */ + accuracy_radius_meters?: number; + /** + * + * @type {string} + * @memberof CallStatsLocation + */ + city?: string; + /** + * + * @type {string} + * @memberof CallStatsLocation + */ + continent?: string; + /** + * + * @type {string} + * @memberof CallStatsLocation + */ + country?: string; + /** + * + * @type {number} + * @memberof CallStatsLocation + */ + latitude?: number; + /** + * + * @type {number} + * @memberof CallStatsLocation + */ + longitude?: number; + /** + * + * @type {string} + * @memberof CallStatsLocation + */ + subdivision?: string; +} /** * * @export @@ -2587,6 +2642,18 @@ export interface CallStatsParticipantCounts { * @memberof CallStatsParticipantCounts */ participants: number; + /** + * + * @type {number} + * @memberof CallStatsParticipantCounts + */ + peak_concurrent_sessions: number; + /** + * + * @type {number} + * @memberof CallStatsParticipantCounts + */ + peak_concurrent_users: number; /** * * @type {number} @@ -2606,12 +2673,42 @@ export interface CallStatsParticipantCounts { * @interface CallStatsParticipantSession */ export interface CallStatsParticipantSession { + /** + * + * @type {string} + * @memberof CallStatsParticipantSession + */ + browser?: string; + /** + * + * @type {string} + * @memberof CallStatsParticipantSession + */ + browser_version?: string; /** * * @type {number} * @memberof CallStatsParticipantSession */ cq_score?: number; + /** + * + * @type {string} + * @memberof CallStatsParticipantSession + */ + current_ip?: string; + /** + * + * @type {string} + * @memberof CallStatsParticipantSession + */ + current_sfu?: string; + /** + * + * @type {number} + * @memberof CallStatsParticipantSession + */ + distance_to_sfu_kilometers?: number; /** * * @type {string} @@ -2624,6 +2721,18 @@ export interface CallStatsParticipantSession { * @memberof CallStatsParticipantSession */ is_live: boolean; + /** + * + * @type {CallStatsLocation} + * @memberof CallStatsParticipantSession + */ + location?: CallStatsLocation; + /** + * + * @type {string} + * @memberof CallStatsParticipantSession + */ + os?: string; /** * * @type {PublishedTrackFlags} @@ -2636,6 +2745,18 @@ export interface CallStatsParticipantSession { * @memberof CallStatsParticipantSession */ publisher_type?: string; + /** + * + * @type {string} + * @memberof CallStatsParticipantSession + */ + sdk?: string; + /** + * + * @type {string} + * @memberof CallStatsParticipantSession + */ + sdk_version?: string; /** * * @type {string} @@ -2654,6 +2775,12 @@ export interface CallStatsParticipantSession { * @memberof CallStatsParticipantSession */ user_session_id: string; + /** + * + * @type {string} + * @memberof CallStatsParticipantSession + */ + webrtc_version?: string; } /** * This event is sent when the insights report is ready @@ -3915,7 +4042,6 @@ export const FrameRecordingSettingsRequestQualityEnum = { _720P: '720p', _1080P: '1080p', _1440P: '1440p', - _2160P: '2160p', } as const; export type FrameRecordingSettingsRequestQualityEnum = (typeof FrameRecordingSettingsRequestQualityEnum)[keyof typeof FrameRecordingSettingsRequestQualityEnum]; @@ -5161,6 +5287,31 @@ export interface MessageStatsResponse { */ count_over_time?: Array; } +/** + * + * @export + * @interface MetricDescriptor + */ +export interface MetricDescriptor { + /** + * + * @type {string} + * @memberof MetricDescriptor + */ + description?: string; + /** + * + * @type {string} + * @memberof MetricDescriptor + */ + label: string; + /** + * + * @type {string} + * @memberof MetricDescriptor + */ + unit?: string; +} /** * * @export @@ -5600,6 +5751,18 @@ export interface ParticipantSeriesPublisherStats { * @memberof ParticipantSeriesPublisherStats */ global?: { [key: string]: Array> }; + /** + * + * @type {{ [key: string]: MetricDescriptor; }} + * @memberof ParticipantSeriesPublisherStats + */ + global_meta?: { [key: string]: MetricDescriptor }; + /** + * + * @type {Array} + * @memberof ParticipantSeriesPublisherStats + */ + global_metrics_order?: Array; /** * * @type {{ [key: string]: Array; }} @@ -5625,6 +5788,18 @@ export interface ParticipantSeriesSubscriberStats { * @memberof ParticipantSeriesSubscriberStats */ global?: { [key: string]: Array> }; + /** + * + * @type {{ [key: string]: MetricDescriptor; }} + * @memberof ParticipantSeriesSubscriberStats + */ + global_meta?: { [key: string]: MetricDescriptor }; + /** + * + * @type {Array} + * @memberof ParticipantSeriesSubscriberStats + */ + global_metrics_order?: Array; /** * * @type {{ [key: string]: Array; }} @@ -5724,6 +5899,18 @@ export interface ParticipantSeriesTrackMetrics { * @memberof ParticipantSeriesTrackMetrics */ metrics?: { [key: string]: Array> }; + /** + * + * @type {{ [key: string]: MetricDescriptor; }} + * @memberof ParticipantSeriesTrackMetrics + */ + metrics_meta?: { [key: string]: MetricDescriptor }; + /** + * + * @type {Array} + * @memberof ParticipantSeriesTrackMetrics + */ + metrics_order?: Array; /** * * @type {string} @@ -5761,6 +5948,18 @@ export interface ParticipantSeriesUserStats { * @memberof ParticipantSeriesUserStats */ metrics?: { [key: string]: Array> }; + /** + * + * @type {{ [key: string]: MetricDescriptor; }} + * @memberof ParticipantSeriesUserStats + */ + metrics_meta?: { [key: string]: MetricDescriptor }; + /** + * + * @type {Array} + * @memberof ParticipantSeriesUserStats + */ + metrics_order?: Array; /** * * @type {{ [key: string]: Array; }} @@ -6497,13 +6696,11 @@ export const RTMPBroadcastRequestQualityEnum = { _720P: '720p', _1080P: '1080p', _1440P: '1440p', - _2160P: '2160p', PORTRAIT_360X640: 'portrait-360x640', PORTRAIT_480X854: 'portrait-480x854', PORTRAIT_720X1280: 'portrait-720x1280', PORTRAIT_1080X1920: 'portrait-1080x1920', PORTRAIT_1440X2560: 'portrait-1440x2560', - PORTRAIT_2160X3840: 'portrait-2160x3840', } as const; export type RTMPBroadcastRequestQualityEnum = (typeof RTMPBroadcastRequestQualityEnum)[keyof typeof RTMPBroadcastRequestQualityEnum]; @@ -6550,13 +6747,11 @@ export const RTMPSettingsRequestQualityEnum = { _720P: '720p', _1080P: '1080p', _1440P: '1440p', - _2160P: '2160p', PORTRAIT_360X640: 'portrait-360x640', PORTRAIT_480X854: 'portrait-480x854', PORTRAIT_720X1280: 'portrait-720x1280', PORTRAIT_1080X1920: 'portrait-1080x1920', PORTRAIT_1440X2560: 'portrait-1440x2560', - PORTRAIT_2160X3840: 'portrait-2160x3840', } as const; export type RTMPSettingsRequestQualityEnum = (typeof RTMPSettingsRequestQualityEnum)[keyof typeof RTMPSettingsRequestQualityEnum]; @@ -6657,13 +6852,11 @@ export const RecordSettingsRequestQualityEnum = { _720P: '720p', _1080P: '1080p', _1440P: '1440p', - _2160P: '2160p', PORTRAIT_360X640: 'portrait-360x640', PORTRAIT_480X854: 'portrait-480x854', PORTRAIT_720X1280: 'portrait-720x1280', PORTRAIT_1080X1920: 'portrait-1080x1920', PORTRAIT_1440X2560: 'portrait-1440x2560', - PORTRAIT_2160X3840: 'portrait-2160x3840', } as const; export type RecordSettingsRequestQualityEnum = (typeof RecordSettingsRequestQualityEnum)[keyof typeof RecordSettingsRequestQualityEnum]; @@ -6807,6 +7000,68 @@ export interface RequestPermissionResponse { */ duration: string; } +/** + * Request to resolve SIP inbound routing using challenge authentication + * @export + * @interface ResolveSipInboundRequest + */ +export interface ResolveSipInboundRequest { + /** + * + * @type {SIPChallenge} + * @memberof ResolveSipInboundRequest + */ + challenge: SIPChallenge; + /** + * SIP caller number + * @type {string} + * @memberof ResolveSipInboundRequest + */ + sip_caller_number: string; + /** + * Optional SIP headers as key-value pairs + * @type {{ [key: string]: string; }} + * @memberof ResolveSipInboundRequest + */ + sip_headers?: { [key: string]: string }; + /** + * SIP trunk number to resolve + * @type {string} + * @memberof ResolveSipInboundRequest + */ + sip_trunk_number: string; +} +/** + * Response containing resolved SIP inbound routing information + * @export + * @interface ResolveSipInboundResponse + */ +export interface ResolveSipInboundResponse { + /** + * + * @type {SipInboundCredentials} + * @memberof ResolveSipInboundResponse + */ + credentials: SipInboundCredentials; + /** + * + * @type {string} + * @memberof ResolveSipInboundResponse + */ + duration: string; + /** + * + * @type {SIPInboundRoutingRuleResponse} + * @memberof ResolveSipInboundResponse + */ + sip_routing_rule?: SIPInboundRoutingRuleResponse; + /** + * + * @type {SIPTrunkResponse} + * @memberof ResolveSipInboundResponse + */ + sip_trunk?: SIPTrunkResponse; +} /** * Basic response information * @export @@ -6820,6 +7075,44 @@ export interface Response { */ duration: string; } +/** + * + * @export + * @interface RingCallRequest + */ +export interface RingCallRequest { + /** + * Members that should receive the ring. If no ids are provided, all call members who are not already in the call will receive ring notifications. + * @type {Array} + * @memberof RingCallRequest + */ + members_ids?: Array; + /** + * Indicate if call should be video + * @type {boolean} + * @memberof RingCallRequest + */ + video?: boolean; +} +/** + * + * @export + * @interface RingCallResponse + */ +export interface RingCallResponse { + /** + * + * @type {string} + * @memberof RingCallResponse + */ + duration: string; + /** + * List of members ringing notification was sent to + * @type {Array} + * @memberof RingCallResponse + */ + members_ids: Array; +} /** * * @export @@ -6921,6 +7214,362 @@ export interface SFUResponse { */ ws_endpoint: string; } +/** + * SIP call configuration response + * @export + * @interface SIPCallConfigsResponse + */ +export interface SIPCallConfigsResponse { + /** + * Custom data associated with the call + * @type {{ [key: string]: any; }} + * @memberof SIPCallConfigsResponse + */ + custom_data: { [key: string]: any }; +} +/** + * SIP caller configuration response + * @export + * @interface SIPCallerConfigsResponse + */ +export interface SIPCallerConfigsResponse { + /** + * Custom data associated with the caller + * @type {{ [key: string]: any; }} + * @memberof SIPCallerConfigsResponse + */ + custom_data: { [key: string]: any }; + /** + * Unique identifier for the caller + * @type {string} + * @memberof SIPCallerConfigsResponse + */ + id: string; +} +/** + * + * @export + * @interface SIPChallenge + */ +export interface SIPChallenge { + /** + * + * @type {string} + * @memberof SIPChallenge + */ + a1?: string; + /** + * + * @type {string} + * @memberof SIPChallenge + */ + algorithm?: string; + /** + * + * @type {string} + * @memberof SIPChallenge + */ + charset?: string; + /** + * + * @type {string} + * @memberof SIPChallenge + */ + cnonce?: string; + /** + * + * @type {Array} + * @memberof SIPChallenge + */ + domain?: Array; + /** + * + * @type {string} + * @memberof SIPChallenge + */ + method?: string; + /** + * + * @type {string} + * @memberof SIPChallenge + */ + nc?: string; + /** + * + * @type {string} + * @memberof SIPChallenge + */ + nonce?: string; + /** + * + * @type {string} + * @memberof SIPChallenge + */ + opaque?: string; + /** + * + * @type {Array} + * @memberof SIPChallenge + */ + qop?: Array; + /** + * + * @type {string} + * @memberof SIPChallenge + */ + realm?: string; + /** + * + * @type {string} + * @memberof SIPChallenge + */ + response?: string; + /** + * + * @type {boolean} + * @memberof SIPChallenge + */ + stale?: boolean; + /** + * + * @type {string} + * @memberof SIPChallenge + */ + uri?: string; + /** + * + * @type {boolean} + * @memberof SIPChallenge + */ + userhash?: boolean; + /** + * + * @type {string} + * @memberof SIPChallenge + */ + username?: string; +} +/** + * Direct routing rule call configuration response + * @export + * @interface SIPDirectRoutingRuleCallConfigsResponse + */ +export interface SIPDirectRoutingRuleCallConfigsResponse { + /** + * ID of the call + * @type {string} + * @memberof SIPDirectRoutingRuleCallConfigsResponse + */ + call_id: string; + /** + * Type of the call + * @type {string} + * @memberof SIPDirectRoutingRuleCallConfigsResponse + */ + call_type: string; +} +/** + * PIN routing rule call configuration response + * @export + * @interface SIPInboundRoutingRulePinConfigsResponse + */ +export interface SIPInboundRoutingRulePinConfigsResponse { + /** + * Optional webhook URL for custom PIN handling + * @type {string} + * @memberof SIPInboundRoutingRulePinConfigsResponse + */ + custom_webhook_url?: string; + /** + * Prompt message for failed PIN attempts + * @type {string} + * @memberof SIPInboundRoutingRulePinConfigsResponse + */ + pin_failed_attempt_prompt?: string; + /** + * Prompt message for hangup after PIN input + * @type {string} + * @memberof SIPInboundRoutingRulePinConfigsResponse + */ + pin_hangup_prompt?: string; + /** + * Prompt message for PIN input + * @type {string} + * @memberof SIPInboundRoutingRulePinConfigsResponse + */ + pin_prompt?: string; + /** + * Prompt message for successful PIN input + * @type {string} + * @memberof SIPInboundRoutingRulePinConfigsResponse + */ + pin_success_prompt?: string; +} +/** + * SIP Inbound Routing Rule response + * @export + * @interface SIPInboundRoutingRuleResponse + */ +export interface SIPInboundRoutingRuleResponse { + /** + * + * @type {SIPCallConfigsResponse} + * @memberof SIPInboundRoutingRuleResponse + */ + call_configs?: SIPCallConfigsResponse; + /** + * List of called numbers + * @type {Array} + * @memberof SIPInboundRoutingRuleResponse + */ + called_numbers: Array; + /** + * + * @type {SIPCallerConfigsResponse} + * @memberof SIPInboundRoutingRuleResponse + */ + caller_configs?: SIPCallerConfigsResponse; + /** + * List of caller numbers + * @type {Array} + * @memberof SIPInboundRoutingRuleResponse + */ + caller_numbers?: Array; + /** + * + * @type {SIPDirectRoutingRuleCallConfigsResponse} + * @memberof SIPInboundRoutingRuleResponse + */ + direct_routing_configs?: SIPDirectRoutingRuleCallConfigsResponse; + /** + * + * @type {string} + * @memberof SIPInboundRoutingRuleResponse + */ + duration: string; + /** + * Unique identifier of the SIP Inbound Routing Rule + * @type {string} + * @memberof SIPInboundRoutingRuleResponse + */ + id: string; + /** + * Name of the SIP Inbound Routing Rule + * @type {string} + * @memberof SIPInboundRoutingRuleResponse + */ + name: string; + /** + * + * @type {SIPPinProtectionConfigsResponse} + * @memberof SIPInboundRoutingRuleResponse + */ + pin_protection_configs?: SIPPinProtectionConfigsResponse; + /** + * + * @type {SIPInboundRoutingRulePinConfigsResponse} + * @memberof SIPInboundRoutingRuleResponse + */ + pin_routing_configs?: SIPInboundRoutingRulePinConfigsResponse; + /** + * List of SIP trunk IDs + * @type {Array} + * @memberof SIPInboundRoutingRuleResponse + */ + trunk_ids: Array; + /** + * + * @type {object} + * @memberof SIPInboundRoutingRuleResponse + */ + updated_at: object; +} +/** + * PIN protection configuration response + * @export + * @interface SIPPinProtectionConfigsResponse + */ +export interface SIPPinProtectionConfigsResponse { + /** + * Default PIN to use if there is no PIN set on the call object + * @type {string} + * @memberof SIPPinProtectionConfigsResponse + */ + default_pin?: string; + /** + * Whether PIN protection is enabled + * @type {boolean} + * @memberof SIPPinProtectionConfigsResponse + */ + enabled: boolean; + /** + * Maximum number of PIN attempts allowed + * @type {number} + * @memberof SIPPinProtectionConfigsResponse + */ + max_attempts?: number; + /** + * Number of digits required for the PIN + * @type {number} + * @memberof SIPPinProtectionConfigsResponse + */ + required_pin_digits?: number; +} +/** + * SIP trunk information + * @export + * @interface SIPTrunkResponse + */ +export interface SIPTrunkResponse { + /** + * + * @type {object} + * @memberof SIPTrunkResponse + */ + created_at: object; + /** + * Unique identifier for the SIP trunk + * @type {string} + * @memberof SIPTrunkResponse + */ + id: string; + /** + * Name of the SIP trunk + * @type {string} + * @memberof SIPTrunkResponse + */ + name: string; + /** + * Phone numbers associated with this SIP trunk + * @type {Array} + * @memberof SIPTrunkResponse + */ + numbers: Array; + /** + * Password for SIP trunk authentication + * @type {string} + * @memberof SIPTrunkResponse + */ + password: string; + /** + * + * @type {object} + * @memberof SIPTrunkResponse + */ + updated_at: object; + /** + * The URI for the SIP trunk + * @type {string} + * @memberof SIPTrunkResponse + */ + uri: string; + /** + * Username for SIP trunk authentication + * @type {string} + * @memberof SIPTrunkResponse + */ + username: string; +} /** * * @export @@ -7080,6 +7729,49 @@ export interface SessionSettingsResponse { */ inactivity_timeout_seconds: number; } +/** + * Credentials for SIP inbound call authentication + * @export + * @interface SipInboundCredentials + */ +export interface SipInboundCredentials { + /** + * Custom data associated with the call + * @type {{ [key: string]: any; }} + * @memberof SipInboundCredentials + */ + call_custom_data: { [key: string]: any }; + /** + * ID of the call + * @type {string} + * @memberof SipInboundCredentials + */ + call_id: string; + /** + * Type of the call + * @type {string} + * @memberof SipInboundCredentials + */ + call_type: string; + /** + * Authentication token for the call + * @type {string} + * @memberof SipInboundCredentials + */ + token: string; + /** + * Custom data associated with the user + * @type {{ [key: string]: any; }} + * @memberof SipInboundCredentials + */ + user_custom_data: { [key: string]: any }; + /** + * User ID for the call + * @type {string} + * @memberof SipInboundCredentials + */ + user_id: string; +} /** * * @export