تسجيل المكالمات: قم بإحضار التشغيل السريع لتخزين Azure الخاص بك
تساعدك هذه البداية السريعة على بدء استخدام إحضار مساحة تخزين Azure الخاصة بك لتسجيل المكالمات. لبدء استخدام وظيفة إحضار Azure Storage الخاصة بك، تأكد من أنك على دراية بواجهات برمجة تطبيقات تسجيل المكالمات.
المتطلبات المسبقة: إعداد تعيينات دور عناصر التحكم في الوصول المستندة إلى الدور والهوية المدارة (RBAC)
1. تمكين الهوية المدارة المعينة من قبل النظام لخدمات اتصالات Azure
- افتح مورد Azure Communication Services. انتقل إلى Identity على اليسار.
- تمكين الهوية المدارة المعينة من قبل النظام وانقر فوق حفظ.
- بمجرد الانتهاء، يمكنك رؤية معرف الكائن الأساسي للهوية التي تم إنشاؤها حديثا.
- بمجرد إنشاء الهوية بنجاح، انقر فوق تعيينات دور Azure لبدء إضافة تعيينات الأدوار.
2. إضافة تعيين دور
- انقر فوق "إضافة تعيين دور"
- في لوحة "إضافة تعيين دور" ، حدد القيم التالية
- النطاق: التخزين
- الاشتراك: اختر اشتراكك
- المورد: اختر حساب التخزين الخاص بك
- الدور: تحتاج Azure Communication Services إلى "Storage Blob Data Contributor" لتتمكن من الكتابة إلى حساب التخزين الخاص بك.
- انقر فوق "Save".
- بمجرد الانتهاء، سترى تعيين الدور المضاف حديثا في نافذة "تعيين دور Azure".
بدء تسجيل جلسة العمل مع تحديد التخزين الخارجي
استخدم معرف مكالمة الخادم الذي تم استلامه أثناء بدء المكالمة.
استخدام تخزين Azure blob للتخزين الخارجي
StartRecordingOptions recordingOptions = new StartRecordingOptions(new ServerCallLocator("<serverCallId>"))
{
//...
ExternalStorage = new BlobStorage(new Uri("<Insert Container / Blob Uri>"))
};
Response<RecordingStateResult> startRecordingWithResponse = await callAutomationClient.GetCallRecording()
.StartRecordingAsync(options: recordingOptions);
استخدام تخزين Azure blob للتخزين الخارجي
StartRecordingOptions recordingOptions = new StartRecordingOptions(new ServerCallLocator("<serverCallId>"))
.setExternalStorage(new BlobStorage("<Insert Container / Blob Uri>"));
Response<StartCallRecordingResult> response = callAutomationClient.getCallRecording()
.startRecordingWithResponse(recordingOptions, null);
إعلام عند التصدير الناجح
استخدم خطاف ويب Azure Event Grid، أو إجراء آخر تم تشغيله، لإعلام خدماتك عندما تكون الوسائط المسجلة جاهزة ويتم تصديرها إلى موقع التخزين الخارجي.
راجع هذا المثال لمخطط الحدث.
{
"id": "string", // Unique guid for event
"topic": "string", // /subscriptions/{subscription-id}/resourceGroups/{group-name}/providers/Microsoft.Communication/communicationServices/{communication-services-resource-name}
"subject": "string", // /recording/call/{call-id}/serverCallId/{serverCallId}
"data": {
"storageType": "string", // AzureBlob etc.
"recordingId": "string", // unique id for recording
"recordingStorageInfo": {
"recordingChunks": [
{
"documentId": "string", // Document id for the recording chunk
"contentLocation": "string", //Azure Communication Services URL where the content is located
"metadataLocation": "string", // Azure Communication Services URL where the metadata for this chunk is located
"deleteLocation": "string", // Azure Communication Services URL to use to delete all content, including recording and metadata.
"index": "int", // Index providing ordering for this chunk in the entire recording
"endReason": "string", // Reason for chunk ending: "SessionEnded", "ChunkMaximumSizeExceeded”, etc.
}
]
},
"recordingStartTime": "string", // ISO 8601 date time for the start of the recording
"recordingDurationMs": "int", // Duration of recording in milliseconds
"sessionEndReason": "string" // Reason for call ending: "CallEnded", "InitiatorLeft”, etc.
},
"eventType": "string", // "Microsoft.Communication.RecordingFileStatusUpdated"
"dataVersion": "string", // "1.0"
"metadataVersion": "string", // "1"
"eventTime": "string" // ISO 8601 date time for when the event was created
}
بنية المجلد لتسجيل المكالمات
يتم تخزين التسجيلات بالتنسيق التالي كما هو موضح في الرسم التخطيطي.
- /YYYYMMDD/callId/first_8_of_recordingId + '-' + guid/[chunk-id]-acsmetadata.documentId.json
- /YYYYMMDD/callId/first_8_of_recordingId + '-' + guid/[chunk-id]-audiomp3.documentId.mp3
الخطوات التالية
لمزيد من المعلومات، راجع المقالات التالية:
- قم بتنزيل تطبيق نموذج تسجيل مكالمات Java
- تعرف على المزيد حول تسجيل المكالمات
- تعرف على المزيد حول أتمتة المكالمات