Yeastar P-Series API

🇹🇭 ภาษาไทย

ภาพรวม

Yeastar P-Series มี REST API (Application Programming Interface) สำหรับ integrate กับ third-party applications เช่น Call Center, Hotel PMS, CRM และระบบอื่นๆ ใน enterprise

ข้อจำกัด: API รองรับเฉพาะรุ่น P550, P560, P570 เท่านั้น (ไม่รองรับ P520)
Firmware ขั้นต่ำ: 37.7.0.16 ขึ้นไป


ความต้องการก่อนใช้งาน

  1. เปิดใช้งาน API บน PBX: Integrations > API > เปิด Toggle API
  2. (ไม่บังคับ) เปิด IP Restriction — กำหนด IP ที่อนุญาตเข้าถึง API
  3. ตั้งค่า Extension/Trunk Status Monitor ตามต้องการ
  4. บันทึก Client ID และ Client Secret จาก PBX web portal

รูปแบบการสื่อสาร

API รองรับ 2 รูปแบบ:

รูปแบบคำอธิบาย
API Request/ResponseApplication ส่ง HTTP request → PBX ตอบ response ทันที
Event SubscriptionApplication subscribe event → PBX push notification แบบ real-time

Protocol: HTTP (port 80) หรือ HTTPS (port 8088, แนะนำ)
Methods: GET และ POST
ทุก request ต้องใส่ header: User-Agent: OpenAPI


Authentication Flow

1. POST /openapi/v1.0/get_token
   → ส่ง username (Client ID) + password (Client Secret)
   → รับ access_token (หมดอายุ 30 นาที) + refresh_token (หมดอายุ 24 ชั่วโมง)

2. ใช้ access_token ใน URL ทุก request:
   GET /openapi/v1.0/{endpoint}?access_token={token}

3. ก่อน token หมดอายุ → POST /openapi/v1.0/refresh_token

4. เสร็จแล้ว → GET /openapi/v1.0/del_token

ข้อจำกัด: แต่ละ application มี valid token พร้อมกันได้สูงสุด 8 tokens

ตัวอย่าง — ขอ Access Token

POST /openapi/v1.0/get_token
Host: 192.168.5.150:8088
Content-Type: application/json
User-Agent: OpenAPI
{
    "username": "UEnH9Dmv6uBJEXsYcag1trNfQThYXXXX",
    "password": "ZLcXl63S9EtMnYoHUnjbVo6sA8CbXXXX"
}
{
    "errcode": 0,
    "errmsg": "SUCCESS",
    "access_token_expire_time": 1800,
    "access_token": "EXZMpZAO86mbrKm6rFtgeb3rfcpC9uqS",
    "refresh_token_expire_time": 86400,
    "refresh_token": "SCduGecwbG9jIusiS8FxFUVn3kf0Q9R8"
}

รูปแบบ URL

{base_url}/{api_path}/{endpoint}?access_token={access_token}
ส่วนรายละเอียด
base_urlhttps://{pbx_ip}:8088 หรือ http://{pbx_ip}:80 หรือ FQDN
api_pathopenapi/v1.0 (Call Report ใหม่: openapi/v2.0)
endpointชื่อ endpoint เช่น extension/list
access_tokenToken ที่ได้จาก get_token

สรุป Endpoints ทั้งหมด

Authentication

MethodEndpointคำอธิบาย
POSTget_tokenขอ access token
POSTrefresh_tokenต่ออายุ token
GETdel_tokenยกเลิก token

System

MethodEndpointคำอธิบาย
GETsystem/informationข้อมูล PBX (model, firmware, uptime)
GETsystem/capacityความจุ (จำนวน extension, concurrent calls, AI transcription)
GETsystem/get_menuoptionsดึง option values สำหรับสร้าง/แก้ไข features
POSTsystem/sendemailส่ง email

system/information — Response fields (data object):

FieldTypeคำอธิบาย
device_nameStringชื่อ device
model_nameStringรุ่น PBX
snStringSerial number
hardware_versionStringHardware version
firmware_versionStringFirmware version
system_timeStringเวลาระบบ
up_timeIntegerUptime (วินาที)
system_date_formatStringรูปแบบวันที่
system_time_formatStringรูปแบบเวลา
timestampIntegerUnix timestamp (วินาที)

system/capacity — Response fields (data object):

FieldTypeคำอธิบาย
extension_capacityIntegerจำนวน extension สูงสุด
extension_usedIntegerจำนวน extension ที่ใช้อยู่
cc_capacityIntegerConcurrent calls สูงสุด
cc_usedIntegerConcurrent calls ที่ใช้อยู่
ai_transcription_onetime_capacityIntegerAI transcription quota รวม (วินาที)
ai_transcription_onetime_usedIntegerAI transcription ที่ใช้แล้ว (วินาที)

Extension (จัดการผู้ใช้ภายใน)

MethodEndpointคำอธิบาย
GETextension/listรายการ extension ทั้งหมด
GETextension/searchค้นหา extension
GETextension/getดึงข้อมูล extension เดียว
GETextension/queryดึงข้อมูลหลาย extension พร้อมกัน
GETextension/getpasswordดึง registration password + voicemail PIN
POSTextension/createเพิ่ม SIP extension
POSTextension/send_welcome_emailส่ง Linkus welcome email
POSTextension/updateแก้ไข extension
GETextension/deleteลบ extension

extension/create — Key request parameters:

ParameterRequiredคำอธิบาย
typeYesประเภท extension — ต้องเป็น "SIP"
numberYesหมายเลข extension (ตัวเลขเท่านั้น สูงสุด 8 หลัก)
user_passwordYesรหัสผ่านผู้ใช้ (ต้องมีตัวเลข + ตัวพิมพ์ใหญ่ + ตัวพิมพ์เล็ก)
reg_nameYesRegistration name (สูงสุด 63 ตัวอักษร)
reg_passwordYesRegistration password
concurrent_registrationsYesจำนวน IP phone ที่ลงทะเบียนพร้อมกันได้ (1–5)
presence_statusYesPresence status เริ่มต้น
first_nameNoชื่อ
last_nameNoนามสกุล
email_addrNoอีเมล
mobile_numberNoเบอร์มือถือ
role_idNoID ของ user role (ดูจาก system/get_menuoptions)
organization_listNo*องค์กรที่ extension สังกัด — required ถ้าเปิด Organization Management

Organization

MethodEndpointคำอธิบาย
GET/POST`organization/listsearch

Trunk (SIP Trunk)

MethodEndpointคำอธิบาย
GET/POST`trunk/listsearch

Contacts & Phonebook

MethodEndpointคำอธิบาย
GET/POST`company_contact/listsearch
GET/POST`phonebook/listsearch

company_contact/create — Key request parameters:

ParameterRequiredคำอธิบาย
first_nameYesชื่อ
number_listYesArray ของหมายเลขโทรศัพท์; แต่ละ entry มี num_type (business_number, mobile_number, home_number ฯลฯ) และ number
last_nameNoนามสกุล
companyNoชื่อบริษัท
emailNoอีเมล
phonebook_id_listNoArray ของ phonebook ID ที่ต้องการเพิ่ม contact นี้เข้าไป
organizationNoแผนก
job_titleNoตำแหน่งงาน

phonebook/create — Key request parameters:

ParameterRequiredคำอธิบาย
nameYesชื่อ phonebook
member_selectNoวิธีเลือกสมาชิก: sel_all (เลือก company contacts ทั้งหมด) หรือ sel_specific (เลือกเฉพาะ)
add_contacts_id_listNoArray ของ company contact ID ที่จะเพิ่มเข้า phonebook (ใช้เมื่อ member_select=sel_specific)

Auto Provisioning (จัดการ IP Phone)

MethodEndpointคำอธิบาย
GETphone/search, phone/getค้นหาและดูข้อมูล IP phone
GETauto_provisioning/compatibilityดู config options สำหรับ provisioning
POST`phone/batchcreatebatchupdate

phone/batchcreate — Key request parameters:

ParameterRequiredคำอธิบาย
vendorYesผู้ผลิต IP phone (ดู options จาก auto_provisioning/compatibility)
modelYesรุ่น IP phone
phone_listYesArray ของ {mac, ext_id} — MAC address + extension ID ที่ต้องการผูก
template_nameYesชื่อ provisioning template
provisioning_methodYesวิธี provisioning: pnp, dhcp, rps, หรือ rps_fqdn

phone/get — Response fields (data object):

FieldTypeคำอธิบาย
macStringMAC address ของ IP phone
vendorStringผู้ผลิต
modelStringรุ่น
template_nameStringชื่อ provisioning template ที่ใช้อยู่
provisioning_methodStringวิธี provisioning (pnp, dhcp, rps, rps_fqdn)
provisioning_linkStringลิงก์ provisioning สำหรับ phone
assigned_extensionStringID ของ extension ที่ผูกกับ phone นี้
idIntegerID เฉพาะของ IP phone ในระบบ

Routing

MethodEndpointคำอธิบาย
GET/POST`inbound_route/listsearch
GET/POST`outbound_route/listsearch

inbound_route/create — Key request parameters:

ParameterRequiredคำอธิบาย
nameYesชื่อ inbound route
trunk_listYesArray ของ trunk ID ที่กำหนดให้ route นี้
def_destYesปลายทางเริ่มต้น: extension, ivr, queue, ring_group, ext_vm, end_call, external_num, range_to_ext, pattern_to_ext, call_flow ฯลฯ
def_dest_valueNoID หรือค่าของปลายทาง (required สำหรับ def_dest ส่วนใหญ่)
did_optionNoโหมด DID matching: patterns (default), pattern_to_ext, range_to_ext, pattern_to_ext_list
did_pattern_listNoArray ของ DID patterns (required เมื่อ did_option=patterns)
did_to_ext_start/endNoDID range start/end (required เมื่อ did_option=range_to_ext)
cid_optionNoCID matching: patterns หรือ phonebook

outbound_route/create — Key request parameters:

ParameterRequiredคำอธิบาย
nameYesชื่อ outbound route
pin_protectYesรหัสผ่าน route: disable, single_pin, pin_list
trunk_listNoArray ของ trunk ที่ใช้ออกสาย (แต่ละ entry มี id ของ trunk)
dial_pattern_listNoArray ของ dial patterns; แต่ละ entry มี pattern, strip (ตัดหลักหน้า), prepend (เติมหลักหน้า)
ext_listNoExtension/กลุ่ม/organization ที่อนุญาตใช้ route นี้; แต่ละ entry มี id + type (extension, ext_group, organization)
outbound_cidNoCaller ID เมื่อโทรออกผ่าน route นี้
pinNoSingle PIN code (required เมื่อ pin_protect=single_pin)
pin_listNoID ของ PIN list (required เมื่อ pin_protect=pin_list)

Voicemail

MethodEndpointคำอธิบาย
GET/POST`vm/queryget

IVR / Queue / Conference / Paging

MethodEndpointคำอธิบาย
GET/POST`ivr/listsearch
GET/POST`queue/list+queue/call_status
GET/POST`conference/list+conference/start_interim
GET/POST`paging/listsearch

Recording & CDR

MethodEndpointคำอธิบาย
GET`recording/listsearch
GET/POST`cdr/listsearch
GET`call_report/listdetail

Settings

MethodEndpointคำอธิบาย
GET/POST`auto_recording/getupdate`
GET/POSTpin_list/...CRUD PIN list
GET/POSTblocked_number/..., allowed_number/...Blocked/Allowed numbers
GET/POST`call_note/getupdate`
GET/POST`web_server/getupdate`
GETstorage/listStorage list
GET/POSTcertificate/...CRUD certificates
GET/POSTbackup/... + `backup/downloadgetstatus`
GET`system_log/listdownload`

Messaging (SMS/WhatsApp/Facebook/LiveChat)

MethodEndpointคำอธิบาย
GET/POSTmessage/channel/..., message/queue/...Message channels + queues
GET/POSTmessage/campaign/..., message/session/..., message/message/...Campaigns, sessions, messages
POSTsms/createส่ง SMS ผ่าน GSM/3G/4G trunk

API Feature Settings

MethodEndpointคำอธิบาย
GET/POSTextension_status_monitor/...ตั้งค่า extension status monitoring
GET/POSTtrunk_status_monitor/...ตั้งค่า trunk status monitoring
GET/POST`webhook/queryupdate

Hotel

MethodEndpointคำอธิบาย
GET/POST`wakeupcall/listget
POSThotel/checkoutเช็คเอาท์แขก hotel

Call Control (สำคัญมาก)

MethodEndpointคำอธิบาย
GETcall/queryดูสถานะสายที่กำลัง active
POSTcall/dialโทรออก (หลายประเภท)
POSTcall/accept_inboundรับสายเข้าในโหมด inbound control
POSTcall/refuse_inboundปฏิเสธสายเข้า
POSTcall/listenMonitoring สาย (ดักฟัง)
POSTcall/holdพักสาย
POSTcall/unholdรับสายคืน
POSTcall/muteปิดเสียง
POSTcall/unmuteเปิดเสียง
POSTcall/parkPark สาย
GETcall/park_statusดูสายที่ park อยู่
POSTcall/directly_forward_to_voicemailโอนสายไป voicemail
POSTcall/transferโอนสาย (blind/attended)
POSTcall/add_memberเพิ่มคนในสาย
POSTcall/play_promptเล่น audio prompt
POSTcall/hangupวางสาย
POST`call/record_startrecord_pause

uaCSTA Call Control

MethodEndpointคำอธิบาย
POST`uacsta_call/acceptrefuse

Event Monitoring

WebSocket vs Webhook

WebSocketWebhook
รูปแบบLong-lived connectionHTTP callback (push)
URLwss://{pbx}:{port}/openapi/v1.0/subscribe?access_token=...URL ที่กำหนดใน PBX settings
Subscribeส่ง {"topic_list":[30011,30012]}Auto push ทุก subscribed event
Heartbeatต้องส่งทุก 60 วินาทีไม่ต้องการ
เหมาะกับReal-time dashboard, call centerWebhook integration, CRM

รายการ Events ทั้งหมด

Event IDชื่อคำอธิบาย
30005Organization Status Switch State Changedสถานะ organization feature เปลี่ยน
30006Organization Structure Changedโครงสร้าง organization เปลี่ยน
30007Extension Registration Status Changedสถานะการลงทะเบียน extension เปลี่ยน (SIP/Linkus)
30008Extension Call State Changedสถานะสาย extension เปลี่ยน
30009Extension Presence State ChangedPresence status extension เปลี่ยน
30010Trunk Registration State Changedสถานะ trunk เปลี่ยน
30011Call State Changedสถานะสายโทรศัพท์เปลี่ยน (real-time)
30012Call End Details Notificationสายวาง → ส่ง CDR ใหม่
30013Call Transfer Reportมีการโอนสาย
30014Call Forwarding Reportมีการ forward สาย
30015Call Failure Reportสายล้มเหลว
30016Incoming Call Requestสายเข้าจาก monitored trunk
30017DTMF Digit Reportกดปุ่มระหว่างสาย
30018Prompt Playback Completed Reportเล่น audio prompt เสร็จ
30019Satisfaction Survey Feedbackแขกกด DTMF ประเมินความพึงพอใจ
30020uaCSTA Call Reportสถานะ uaCSTA call เปลี่ยน
30022Extension Information UpdatedExtension ถูกสร้าง/แก้ไข/ลบ
30023Trunk Information UpdatedTrunk ถูกสร้าง/แก้ไข/ลบ
30024No-hosted ConferenceHost ออกจาก conference
30025Agent Automatic PauseAgent ถูก pause อัตโนมัติ (missed calls เกิน limit)
30026Agent Ringing TimeoutAgent พลาดสายเพราะ ringing timeout
30027Call Report Download Resultดาวน์โหลด report แบบ async เสร็จ
30028Call Note Status Updatedสถานะ call note เปลี่ยน
30029Agent Status Changedสถานะ agent เปลี่ยน
30030Bulk Message Sending Failedส่ง bulk message บางส่วนล้มเหลว
30031New Message Notificationได้รับ inbound message ใหม่
30032Message Sending Resultผลลัพธ์การส่ง message
30033Recording Download Completedดาวน์โหลด recording แบบ async เสร็จ
30034System Event Notification (Information)System event ระดับ info
30035System Event Notification (Warning)System event ระดับ warning

Use Cases สำหรับออฟฟิค

ScenarioEndpoint/Event ที่ใช้
CRM popup เมื่อมีสายเข้าEvent 30016 + call/query
Click-to-call จาก CRMcall/dial
Dashboard live call statusEvent 30011 + call/query
Auto provisioning Yealink T31Gphone/batchcreate + phone/batchreprovision
Hotel wake-up callwakeupcall/create + hotel/checkout
Export CDR ไป databasecdr/list + Event 30012
Queue monitoringqueue/agent_status + Event 30029

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

  • Yeastar P-Series — parent system; API ต้องการรุ่น P550/P560/P570
  • Yeastar P-Series Features — Contact Center, Hotel Management ที่ API รองรับ
  • Yeastar P-Series Admin Guide — Extension, Trunk, IVR, Queue ที่ API จัดการได้
  • Yealink T31G — IP phone ที่ใช้ auto provisioning API + uaCSTA event
  • Dahua.Api — pattern เดียวกัน: C# wrapper → REST API → integration

🇬🇧 English

Overview

Yeastar P-Series provides a RESTful API for integration with third-party applications such as call centers, hotel PMS systems, CRM platforms, and other enterprise software.

Supported models: P550, P560, P570 only (P520 is NOT supported)
Minimum firmware: 37.7.0.16


Prerequisites

  1. Enable API on the PBX: Integrations > API > Toggle API On
  2. (Optional) Enable IP Restriction to whitelist permitted IP addresses
  3. Configure Extension/Trunk Status Monitors as needed
  4. Note down the Client ID and Client Secret from the PBX web portal

Communication Methods

ModeDescription
API Request/ResponseApplication sends HTTP request → PBX returns response immediately
Event SubscriptionApplication subscribes to events → PBX pushes real-time notifications

Protocol: HTTP (port 80) or HTTPS (port 8088, recommended)
HTTP Methods: GET and POST only
Required header on every request: User-Agent: OpenAPI


Authentication Flow

1. POST /openapi/v1.0/get_token
   → Send username (Client ID) + password (Client Secret)
   → Receive access_token (expires in 30 min) + refresh_token (expires in 24 h)

2. Include access_token in every subsequent request URL:
   GET /openapi/v1.0/{endpoint}?access_token={token}

3. Before token expires → POST /openapi/v1.0/refresh_token

4. When done → GET /openapi/v1.0/del_token

Limit: Maximum 8 simultaneous valid tokens per application.

Example — Get Access Token

POST /openapi/v1.0/get_token
Host: 192.168.5.150:8088
Content-Type: application/json
User-Agent: OpenAPI
{
    "username": "UEnH9Dmv6uBJEXsYcag1trNfQThYXXXX",
    "password": "ZLcXl63S9EtMnYoHUnjbVo6sA8CbXXXX"
}
{
    "errcode": 0,
    "errmsg": "SUCCESS",
    "access_token_expire_time": 1800,
    "access_token": "EXZMpZAO86mbrKm6rFtgeb3rfcpC9uqS",
    "refresh_token_expire_time": 86400,
    "refresh_token": "SCduGecwbG9jIusiS8FxFUVn3kf0Q9R8"
}

URL Format

{base_url}/{api_path}/{endpoint}?access_token={access_token}
ComponentDetails
base_urlhttps://{pbx_ip}:8088 or http://{pbx_ip}:80 or FQDN
api_pathopenapi/v1.0 (Call Report v2: openapi/v2.0)
endpointSpecific endpoint e.g. extension/list
access_tokenToken obtained from get_token

API Endpoint Reference

Authentication

MethodEndpointDescription
POSTget_tokenGet API access token
POSTrefresh_tokenRefresh API access token
GETdel_tokenRevoke API access token

System

MethodEndpointDescription
GETsystem/informationQuery PBX info (model, firmware, uptime)
GETsystem/capacityQuery capacity (extensions, concurrent calls, AI transcription quota)
GETsystem/get_menuoptionsQuery option values for creating/updating features
POSTsystem/sendemailSend an email

system/information — Response fields (data object):

FieldTypeDescription
device_nameStringDevice name
model_nameStringProduct model
snStringSerial number
hardware_versionStringHardware version
firmware_versionStringFirmware version
system_timeStringSystem time
up_timeIntegerSystem uptime (seconds)
system_date_formatStringDate display format
system_time_formatStringTime display format
timestampIntegerCurrent system timestamp (seconds)

system/capacity — Response fields (data object):

FieldTypeDescription
extension_capacityIntegerMaximum number of extensions
extension_usedIntegerNumber of extensions in use
cc_capacityIntegerMaximum concurrent calls
cc_usedIntegerConcurrent calls in use
ai_transcription_onetime_capacityIntegerTotal one-time AI transcription quota (seconds)
ai_transcription_onetime_usedIntegerUsed AI transcription quota (seconds)

Extension Management

MethodEndpointDescription
GETextension/listList all extensions
GETextension/searchSearch extensions
GETextension/getGet single extension details
GETextension/queryGet multiple extensions at once
GETextension/getpasswordGet registration password + voicemail PIN
POSTextension/createCreate a SIP extension
POSTextension/send_welcome_emailSend Linkus welcome email
POSTextension/updateEdit an extension
GETextension/deleteDelete an extension

extension/create — Key request parameters:

ParameterRequiredDescription
typeYesExtension type — must be "SIP"
numberYesExtension number (digits only, max 8 chars)
user_passwordYesUser password (must contain numbers + uppercase + lowercase)
reg_nameYesRegistration name (max 63 chars)
reg_passwordYesRegistration password
concurrent_registrationsYesIP phone simultaneous registrations (1–5)
presence_statusYesInitial presence status
first_nameNoFirst name
last_nameNoLast name
email_addrNoEmail address
mobile_numberNoMobile number
role_idNoUser role ID (query via system/get_menuoptions)
organization_listNo*Organizations the extension belongs to — required if Organization Management is enabled

Organization

MethodEndpointDescription
GET/POSTorganization/list|search|get|query|create|update|deleteFull CRUD for organizations

Trunk (SIP Trunks)

MethodEndpointDescription
GET/POSTtrunk/list|search|get|query|itsp_list|create|update|deleteCRUD SIP trunks + query ITSP list

Contacts & Phonebook

MethodEndpointDescription
GET/POSTcompany_contact/...CRUD company contacts
GET/POSTphonebook/...CRUD phonebooks

company_contact/create — Key request parameters:

ParameterRequiredDescription
first_nameYesFirst name
number_listYesArray of phone numbers; each entry has num_type (business_number, mobile_number, home_number, etc.) and number
last_nameNoLast name
companyNoCompany name
emailNoEmail address
phonebook_id_listNoArray of phonebook IDs to assign this contact to
organizationNoDepartment
job_titleNoJob title

phonebook/create — Key request parameters:

ParameterRequiredDescription
nameYesPhonebook name
member_selectNoMember selection method: sel_all (all company contacts) or sel_specific (specific contacts)
add_contacts_id_listNoArray of company contact IDs to add (used when member_select=sel_specific)

Auto Provisioning

MethodEndpointDescription
GETphone/search, phone/getSearch/view IP phone details
GETauto_provisioning/compatibilityQuery config options for provisioning
POSTphone/batchcreate|batchupdate|batchreprovision|batchreboot|batchdeleteBulk IP phone management

phone/batchcreate — Key request parameters:

ParameterRequiredDescription
vendorYesPhone vendor (query available options via auto_provisioning/compatibility)
modelYesPhone model
phone_listYesArray of {mac, ext_id} — MAC address + extension ID to assign
template_nameYesProvisioning template name
provisioning_methodYesProvisioning method: pnp, dhcp, rps, or rps_fqdn

phone/get — Response fields (data object):

FieldTypeDescription
macStringMAC address of the IP phone
vendorStringPhone vendor
modelStringPhone model
template_nameStringProvisioning template currently applied
provisioning_methodStringProvisioning method (pnp, dhcp, rps, rps_fqdn)
provisioning_linkStringProvisioning URL for the phone
assigned_extensionStringID of the extension assigned to this phone
idIntegerUnique phone ID in the system

Routing

MethodEndpointDescription
GET/POSTinbound_route/...CRUD inbound routes
GET/POSToutbound_route/...CRUD outbound routes

inbound_route/create — Key request parameters:

ParameterRequiredDescription
nameYesRoute name
trunk_listYesArray of trunk IDs assigned to this route
def_destYesDefault destination: extension, ivr, queue, ring_group, ext_vm, end_call, external_num, range_to_ext, pattern_to_ext, call_flow, etc.
def_dest_valueNoID or value of the destination (required for most def_dest types)
did_optionNoDID matching mode: patterns (default), pattern_to_ext, range_to_ext, pattern_to_ext_list
did_pattern_listNoArray of DID patterns (required when did_option=patterns)
did_to_ext_start/endNoDID range start/end (required when did_option=range_to_ext)
cid_optionNoCID matching: patterns or phonebook

outbound_route/create — Key request parameters:

ParameterRequiredDescription
nameYesRoute name
pin_protectYesRoute PIN protection: disable, single_pin, pin_list
trunk_listNoArray of trunks for outbound calls; each entry requires trunk id
dial_pattern_listNoArray of dial patterns; each entry has pattern, strip (digits to strip from front), prepend (digits to prepend)
ext_listNoExtensions/groups/organizations permitted to use this route; each entry has id + type (extension, ext_group, organization)
outbound_cidNoCaller ID override for calls through this route
pinNoSingle PIN code (required when pin_protect=single_pin)
pin_listNoID of the PIN list (required when pin_protect=pin_list)

Voicemail

MethodEndpointDescription
GET/POSTvm/query|get|download|create|update|delete|delete_extension_vmVoicemail message management

IVR / Queue / Conference / Paging

MethodEndpointDescription
GET/POSTivr/...CRUD IVR menus
GET/POSTqueue/... + agent controlsCRUD queues + agent login/pause/status
GET/POSTconference/... + real-time controlsCRUD conferences + invite/kick/mute members
GET/POSTpaging/...CRUD paging groups

Recording & CDR & Reports

MethodEndpointDescription
GETrecording/list|search|download|playtoextensionRecording file management
GET/POSTcdr/list|search|download|getoption|updateoptionCDR queries + options
GETcall_report/list|detail|downloadCall statistics reports
GETcall_schedule_report/list|downloadScheduled report management

Call Control (Core Integration)

MethodEndpointDescription
GETcall/queryQuery active call details
POSTcall/dialInitiate a call (multiple types)
POSTcall/accept_inboundAccept inbound call (inbound control mode)
POSTcall/refuse_inboundRefuse inbound call
POSTcall/listenMonitor/spy a call
POSTcall/hold / call/unholdHold/resume a call
POSTcall/mute / call/unmuteMute/unmute a call member
POSTcall/park / GET call/park_statusPark a call / query parked calls
POSTcall/directly_forward_to_voicemailForward to voicemail
POSTcall/transferBlind or attended transfer
POSTcall/add_memberInvite member to active call
POSTcall/play_promptPlay audio prompt to a number
POSTcall/hangupHang up a call
POSTcall/record_start|record_pause|record_unpauseControl call recording

uaCSTA Call Control

MethodEndpointDescription
POSTuacsta_call/accept|refuse|hangupControl calls via uaCSTA (IP phones)

Hotel

MethodEndpointDescription
GET/POSTwakeupcall/list|get|query|create|update|deleteWake-up call (alarm) management
POSThotel/checkoutPerform hotel guest checkout

Messaging

MethodEndpointDescription
GET/POSTmessage/channel|queue|campaign|session|message/...Messaging (SMS/WhatsApp/Facebook/LiveChat)
POSTsms/createSend SMS via GSM/3G/4G trunk

Event Monitoring

WebSocket vs Webhook Comparison

WebSocketWebhook
ConnectionPersistent long-lived connectionHTTP callback (no persistent connection)
URLwss://{pbx}:{port}/openapi/v1.0/subscribe?access_token=...User-defined URL in PBX settings
SubscribeSend {"topic_list":[30011,30012]}Auto-push on subscribed events
HeartbeatRequired every 60 secondsNot required
Best forReal-time dashboard, call controlCRM webhook, automation triggers

Complete Events List

Event IDNameTrigger
30005Organization Status Switch State ChangedOrganization feature enabled/disabled
30006Organization Structure ChangedOrganization config modified
30007Extension Registration Status ChangedSIP/Linkus registration state change
30008Extension Call State ChangedExtension call status change
30009Extension Presence State ChangedExtension presence (DND/available/etc.) changes
30010Trunk Registration State ChangedTrunk registration state change
30011Call State ChangedAny call status change (real-time)
30012Call End Details NotificationCall ends — CDR sent
30013Call Transfer ReportCall transferred
30014Call Forwarding ReportCall forwarded
30015Call Failure ReportCall initiation failed
30016Incoming Call RequestInbound call on monitored trunk
30017DTMF Digit ReportKey pressed during a call
30018Prompt Playback Completed ReportAudio prompt finished playing
30019Satisfaction Survey FeedbackCaller completed DTMF satisfaction survey
30020uaCSTA Call ReportuaCSTA-controlled call state change
30022Extension Information UpdatedExtension created/edited/deleted
30023Trunk Information UpdatedTrunk created/edited/deleted
30024No-hosted ConferenceConference host left
30025Agent Automatic PauseAgent auto-paused (max missed calls reached)
30026Agent Ringing TimeoutAgent missed call due to ringing timeout
30027Call Report Download ResultAsync report download URL ready
30028Call Note Status UpdatedCall note availability changed
30029Agent Status ChangedAgent status change
30030Bulk Message Sending FailedMessage campaign partial/total failure
30031New Message NotificationInbound message received via API channel
30032Message Sending ResultOutbound message delivery status changed
30033Recording Download CompletedAsync recording download complete
30034System Event Notification (Information)Info-level system event
30035System Event Notification (Warning)Warning-level system event

Common Use Cases

ScenarioEndpoints / Events
CRM screen pop on inbound callEvent 30016 + call/query
Click-to-call from CRMcall/dial
Live call dashboardEvent 30011 + call/query
Auto-provision Yealink T31G phonesphone/batchcreate + phone/batchreprovision
Hotel wake-up callswakeupcall/create + hotel/checkout
CDR export to databasecdr/list + Event 30012
Queue agent monitoringqueue/agent_status + Event 30029
Call recording on demandcall/record_start + recording/download