Proje: Okul Platform · Hub: Okul Platform — Architecture
Sonitel Entegrasyonu
packages/Sonitel/ — Custom HTTP client paketi
app/Integrations/Call/Sonitel/Services/SonitelService.php — İş mantığı
SonitelService İşlevleri
Ajan Girişi
$service->login(username, password)
// Döner: ['agentId' => int, 'token' => string]Çağrı Yönlendirme (Forward)
POST /api/admin/call/b2b/forward → Gelen aramayı ilgili kişiye yönlendir
Çağrıyı Kapat (Hangup)
POST /api/admin/call/b2b/hangup → Aramayı sonlandır
Gelen Arama İşleme
Webhook: POST /webhooks/sonitel/inbound-call
→ WebhookAuthMiddleware:sonitel ile korumalı
Inbound Call Akışı
- Veli inbound numarayı arar
- Sonitel webhook API’ye bildirim gönderir
SonitelServiceçağrısı:SchoolInboundCallLogServiceile log oluşturur- Lead oluşturur:
LeadEntryMethodType::CALL,LeadStatusType::CREATED_VIA_INBOUND,LeadRefType::AUTO_CREATED_INBOUND - CIO B2B event gönderir (
B2BEventService)
- Çağrı ajanına veya okul temsilcisine yönlendirilir
İlgili Modeller
SchoolInboundCallLog— Arama kayıtlarıInboundNumberPool— Numara havuzuSchoolContact::inbound_number— Okula atanan inbound numara
Config’den Ajan Bilgileri
Config::SONITEL_CALL_AGENT_INFO_TYPE_KEY = 'sonitel_call_agent_info'
Config::CALL_AGENTS_KEY = 'call_agents'Bağımlılıklar
Sonitel\Client(packages/Sonitel/Client.php)LeadService, SchoolService, UserService, SchoolInboundCallLogServiceB2BEventService— CIO’ya arama lead bildir
Related
- api-inbound-number-system — Numara sağlayıcıları ve havuz
- api-lead-flow — Gelen arama lead akışı
- api-migration-webhooks — Sonitel webhook endpoint’i