Yeastar P-Series Microsoft SQL Integration

🇹🇭 ภาษาไทย

Microsoft SQL Integration ของ Yeastar P-Series ช่วย sync ข้อมูล CDR (Call Detail Records) จาก PBX ไปยัง Microsoft SQL Server database อัตโนมัติ เหมาะสำหรับองค์กรที่ต้องการ custom analytics, reporting, หรือเชื่อมต่อกับ BI tools เช่น Power BI

ข้อกำหนด: Enterprise Plan (EP) หรือ Ultimate Plan (UP)


ฟีเจอร์หลัก

ฟีเจอร์คำอธิบาย
CDR Syncส่ง Call Detail Records จาก PBX ไปยัง SQL Server
Scheduled Syncsync ตามตารางเวลาที่กำหนด
Real-time Pushpush CDR ทันทีเมื่อสายสิ้นสุด
Field Mappingกำหนด mapping ระหว่าง CDR fields และ SQL table columns
Filtered Syncกรองข้อมูลที่จะ sync ตาม criteria

Sync Modes

Modeคำอธิบายเหมาะกับ
Scheduled Syncsync ตามกำหนด (เช่น ทุกชั่วโมง, ทุกวัน)Reporting ที่ไม่ต้องการ real-time
Real-time Pushpush ทันทีเมื่อ CDR สร้างขึ้นLive dashboards, alerting systems

การตั้งค่า

1. เตรียม SQL Server

-- สร้าง database และ table สำหรับรับ CDR
CREATE TABLE cdr_records (
    call_id         VARCHAR(50),
    caller          VARCHAR(50),
    callee          VARCHAR(50),
    call_type       VARCHAR(20),
    call_status     VARCHAR(20),
    start_time      DATETIME,
    answer_time     DATETIME,
    end_time        DATETIME,
    duration        INT,
    talk_duration   INT,
    trunk           VARCHAR(50),
    recording_file  VARCHAR(255)
);

2. ตั้งค่าบน PBX

PBX Web Portal → Settings > CRM Integration > Microsoft SQL
Parameterคำอธิบาย
SQL ServerIP หรือ hostname ของ SQL Server
PortDefault: 1433
Databaseชื่อ database
UsernameSQL user (ต้องมีสิทธิ์ INSERT)
PasswordSQL user password
Table Nameชื่อ table ที่รับ CDR
Sync ModeScheduled หรือ Real-time
Sync Intervalถ้าเป็น Scheduled: กำหนดความถี่

CDR Fields ที่รองรับ

CDR Fieldคำอธิบายตัวอย่างค่า
call_idID เฉพาะของสาย2024011512345
callerหมายเลขผู้โทร1001, 0812345678
calleeหมายเลขปลายทาง1002, 0898765432
call_typeประเภทสายInbound, Outbound, Internal
call_statusผลสายAnswered, No Answer, Busy, Failed
start_timeเวลาเริ่มต้นสาย2024-01-15 09:30:00
answer_timeเวลาที่รับสาย2024-01-15 09:30:05
end_timeเวลาวางสาย2024-01-15 09:35:00
durationระยะเวลาตั้งแต่โทร (วินาที)300
talk_durationระยะเวลาสนทนาจริง (วินาที)295
trunkTrunk ที่ใช้SIP_Trunk_1
recording_filepath ไฟล์บันทึก/recordings/2024/...wav
dnisหมายเลขที่ถูกโทรเข้า (DID)021234567
extension_groupกลุ่ม extensionSales, Support

Use Cases

กรณีใช้งานวิธีใช้ SQL Integration
Power BI / Tableau dashboardScheduled sync → connect BI tool ไปที่ SQL DB
Real-time call monitoring screenReal-time push → query SQL ด้วย live dashboard
Monthly call reportsScheduled daily sync → run SQL queries
ตรวจสอบ SLAQuery average answer time, missed calls
Billing ตาม callExport CDR → คำนวณค่าใช้จ่ายตามสาย

ความเชื่อมโยง


🇬🇧 English

Microsoft SQL Integration for Yeastar P-Series automatically syncs CDR (Call Detail Records) from the PBX to a Microsoft SQL Server database. It enables custom analytics, reporting pipelines, and BI tool integration (e.g., Power BI, Tableau).

Requirements: Enterprise Plan (EP) or Ultimate Plan (UP)


Sync Modes

ModeDescriptionUse Case
Scheduled SyncSync at a configured interval (hourly, daily, etc.)Periodic reporting
Real-time PushPush CDR record immediately on call completionLive dashboards, alerting

Setup

  1. Prepare SQL Server: create database and table with appropriate columns
  2. Configure connection: Settings > CRM Integration > Microsoft SQL
    • Server host/port (default: 1433), database name, credentials, table name
  3. Select sync mode and interval
  4. Map CDR fields to SQL table columns
  5. Test connection and save

CDR Fields Available

FieldDescription
call_idUnique call identifier
caller / calleeCalling and called numbers
call_typeInbound / Outbound / Internal
call_statusAnswered / No Answer / Busy / Failed
start_time / answer_time / end_timeCall timestamps
durationTotal call duration (seconds)
talk_durationActual talk time (seconds)
trunkSIP/analog trunk used
recording_filePath to call recording file
dnisDialed number (DID/DDI)
extension_groupExtension group name