Improve the PCM playback worklet with robust resampling and buffer management. Refactor the voice-stream service for better session teardown and error handling. Fix authentication issues by enabling credentials in HttpService and using relative URLs. Add Jalali date support and an AI model configuration tab in settings. Enhance diagnostics for voice transport and the audio engine.
75 lines
2.8 KiB
TypeScript
75 lines
2.8 KiB
TypeScript
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
|
import { CommonModule } from '@angular/common';
|
|
|
|
interface ConnectionField {
|
|
label: string;
|
|
value: string;
|
|
hint: string;
|
|
masked?: boolean;
|
|
}
|
|
|
|
interface CenterFeature {
|
|
id: string;
|
|
icon: string;
|
|
title: string;
|
|
description: string;
|
|
}
|
|
|
|
/**
|
|
* Symbolic demonstration page for the call-center integration. No backend
|
|
* connection exists yet: every value shown is illustrative and the controls
|
|
* are disabled placeholders.
|
|
*/
|
|
@Component({
|
|
selector: 'app-call-center',
|
|
standalone: true,
|
|
imports: [CommonModule],
|
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
templateUrl: './call-center.page.html',
|
|
styleUrls: ['./call-center.page.css', '../../shared/styles/demo-page.css'],
|
|
})
|
|
export class CallCenterPage {
|
|
readonly connectionFields: ConnectionField[] = [
|
|
{
|
|
label: 'آدرس سرویس کال سنتر',
|
|
value: 'https://callcenter.raymandcti.com/api/v1',
|
|
hint: 'مقدار نمونه — آدرس واقعی پس از راهاندازی ثبت میشود.',
|
|
},
|
|
{
|
|
label: 'کلید API',
|
|
value: '••••••••••••••••••••',
|
|
hint: 'کلید بهصورت رمزنگاریشده نگهداری میشود.',
|
|
masked: true,
|
|
},
|
|
{
|
|
label: 'صف پیشفرض',
|
|
value: 'پشتیبانی',
|
|
hint: 'تماسهای ارجاعشده به این صف وصل میشوند.',
|
|
},
|
|
];
|
|
|
|
readonly features: CenterFeature[] = [
|
|
{
|
|
id: 'live',
|
|
icon: 'M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z',
|
|
title: 'تماسهای در جریان',
|
|
description:
|
|
'فهرست تماسهای فعال و وضعیت لحظهای هر کارشناس بهصورت بلادرنگ نمایش داده میشود.',
|
|
},
|
|
{
|
|
id: 'transfer',
|
|
icon: 'M8 3 4 7l4 4M4 7h16M16 21l4-4-4-4M20 17H4',
|
|
title: 'انتقال از هوش مصنوعی به کارشناس',
|
|
description:
|
|
'تماسهایی که هوش مصنوعی نتوانسته پاسخ دهد، به همراه سابقه گفتگو به کارشناس ارجاع میشود.',
|
|
},
|
|
{
|
|
id: 'sync',
|
|
icon: 'M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8M21 3v5h-5M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16M8 16H3v5',
|
|
title: 'همگامسازی وضعیت کارشناسان',
|
|
description:
|
|
'حاضر بودن، مرخصی و خارجشدن کارشناسان بین برنامه و سامانه کال سنتر همگام میشود.',
|
|
},
|
|
];
|
|
}
|