Line Rotation & Health Monitoring
Line Rotation & Health Monitoring
To preserve available cellular assets and avoid carrier line usage blocks, Asterisk 2 implements an automated SIM rotation cycle. The application routes traffic across multiple mobile profiles using dynamic load-balancing logic.
Line Management Lifecycle Map
The diagram below maps out how background telemetry workers rotate modem ports automatically based on active channel load metrics:
graph TD
%% Polling Engine
subgraph TelemetryEngine["Background Operational loop"]
CheckLoop["GatewayStatusWorker.cs<br/>(Evaluates Daily Duration Totals)"]
end
%% Conditional Check
subgraph EvaluationLogic["Line Usage Rules"]
RuleDuration["Total Active Seconds > 14400<br/>(Exceeds 4-Hour Daily Cap)"]
end
%% Executed Action
subgraph ExecutionTarget["Hardware Control Bus"]
ActionDisable["Flag Current Port as Idle<br/>(Triggers Hardware SIM Rotation)"]
ActionEnable["Activate Secondary Port Slot<br/>(Injects Fresh Subscriber Line)"]
end
%% Flows
CheckLoop ==>|"Sweep SimProfiles Rows"| RuleDuration
RuleDuration ==>|"Condition Met"| ActionDisable
ActionDisable ==>|"API Execution Directive"| ActionEnable
%% Polished Token Palette
classDef loopToken fill:#0f172a,stroke:#38bdf8,stroke-width:2px,color:#fff,rx:6px,ry:6px;
classDef ruleToken fill:#1e293b,stroke:#a855f7,stroke-width:2px,color:#fff,rx:6px,ry:6px;
classDef targetToken fill:#312e81,stroke:#ec4899,stroke-width:2px,color:#fff,rx:6px,ry:6px;
class TelemetryEngine,CheckLoop loopToken;
class EvaluationLogic,RuleDuration ruleToken;
class ExecutionTarget,ActionDisable,ActionEnable targetToken;
Operational direct rotation thresholds
1. Cumulative Call Duration Caps
To prevent external cellular providers from flagging automated trunk routes, C# worker scripts parse active session rows directly. When a physical SIM records over 4 hours of connected audio inside a single day, the line drops into a mandatory 24-hour resting period.
2. Instant Call Drop Trapping
If an active dialing interface registers three consecutive unanswered call disconnections within 300 seconds, the hardware monitoring service flags the line string as failed immediately, shifting incoming routing paths to hot standby modems.