How seiggy/arke works
Project type and purpose
• Arke is a .NET 5.0–based IVR framework for Asterisk ARI.
• It provides:
• A core SIP/IVR engine (Arke.SipEngine)
• A DSL for defining call flows (Arke.DSL)
• A runtime host service (Arke.ServiceHost)
• A management REST API (Arke.ManagementApi)
• A plugin system of steps (Arke.Steps)
• Dependency-injection helpers (Arke.DependencyInjection)
File structure (key top-level projects)
• Arke.SipEngine: the core call logic, bridging, event handling, FSM, and Asterisk ARI client.
• Arke.DSL: JSON-based call-flow definitions and processors.
• Arke.DependencyInjection: abstractions and container extensions.
• Arke.IVR: glue between SIP engine and DSL (call-flow service).
• Arke.ServiceHost: console/WebHost entry point, loads DI, DSL, plugins, and connects to Asterisk.
• Arke.ManagementApi: ASP.NET Core Web API exposing REST endpoints for flows, steps, sounds, monitoring.
• Arke.Steps: prebuilt step-plugin library implementing common IVR steps.
• Arke.Tests: unit/integration tests.
• AsteriskDockerDemo & sample: deployment examples and sample call flows.
README for additional insights
• Uses AsterNET.ARI client library to connect to Asterisk.
• Plugins auto-loaded at runtime from a directory.
• Highly modular: each step implements IStepProcessor/ISettings.
• Uses SimpleInjector for DI, Serilog for logging, Consul for service discovery (in SipEngine).
Main components and relationships
A. External Systems
1. Asterisk Server (ARI interface)
2. Consul (optional service registry)
3. External storage (if any – e.g., file system, database for call-flow JSON, recordings)
B. Runtime Hosts
1. Arke.ServiceHost
• Loads Arke.DependencyInjection container
• Loads JSON call-flow definitions via Arke.DSL
• Discovers and loads Arke.Steps plugins
• Instantiates ArkeCallFlowService (from Arke.IVR)
• Hosts AsterNET.ARI client (from Arke.SipEngine.Api)
2. Arke.ManagementApi (separate ASP.NET Core process)
• Exposes REST controllers for flows, sounds, steps, monitoring
• Reads/writes call-flow JSON files or backing store
C. Libraries (internal)
1. Arke.SipEngine
• API layer for ARI calls, events, DTMF, prompts, recordings
• FSM for call state machine
• Bridging implementations (Mix, Hold, Proxy, DTMF)
2. Arke.DSL
• JSON parser + DSLProcessor → sequence of IStepProcessor calls
3. Arke.IVR
• Coordinates SipEngine events with DSL execution via ICallFlowService
D. Plugin System
• Directory of .NET assemblies namespace “Arke.*”
• Each plugin assembly contains one or more IStepProcessor + ISettings
• Loaded dynamically by ServiceHost at startup
Architectural patterns & design principles
• Modular library services (SipEngine, DSL, DI)
• Micro-services style (ServiceHost / ManagementApi)
• Plugin architecture for extensibility
• FSM for robust call state transitions
• Asynchronous Task-based processing for high concurrency