Back to page

Dynamic Outbound Gateway Pools

Raw Markdown & AI/RAG Chunks
Raw Markdown Source 2453 chars
# Dynamic Outbound Gateway Pools

To route external telecommunications traffic optimally, **Asterisk 2** groups physical gateway hardware assets into logical mapping collections called **Gateway Pools**. This database module maps out available cellular hardware arrays to balance session assignments cleanly.

---

## Gateway Load-Balancing Schema

The diagram below outlines how logical pools sort outbound traffic assignments dynamically across raw physical IP addresses:

```mermaid
graph LR
    %% Logical Pool
    subgraph LogicalPool["Logical Outbound Mapping"]
        EntityPool["GatewayPool Entity<br/>(PK: PoolId, Name: 'Indian Mobile Trunks')"]
    end

    %% Target Elements
    subgraph TargetMembers["Assigned Physical Gateways"]
        MemberA["GatewayMember Entity<br/>(IP: 192.168.10.50, Weight: 100)"]
        MemberB["GatewayMember Entity<br/>(IP: 192.168.10.51, Weight: 50)"]
    end

    %% Downstream Logic
    subgraph ExecutionTarget["PBX Outbound Core"]
        KamailioDisp["Kamailio Dispatcher Target<br/>(ds_select_dst Engine)"]
    end

    %% Vectors
    EntityPool ==>|"Includes Mapping"| MemberA
    EntityPool ==>|"Includes Mapping"| MemberB
    MemberA ==>|"Primary Selection"| KamailioDisp
    MemberB -->|"Secondary / Failover"| KamailioDisp

    %% Custom Curated Colors
    classDef poolToken fill:#0f172a,stroke:#38bdf8,stroke-width:2px,color:#fff,rx:6px,ry:6px;
    classDef memToken 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 LogicalPool,EntityPool poolToken;
    class TargetMembers,MemberA,MemberB memToken;
    class ExecutionTarget,KamailioDisp targetToken;
```

---

## Model Attribute Blueprint

### 1. `GatewayPool` Entity
- **`PoolId`** (`int`): Primary automatic auto-increment integer ID.
- **`PoolName`** (`string`): Logical descriptor mapped to specific dialing groups.
- **`Members`**: Collection mapping physical gateway IP references.

### 2. `GatewayMember` Entity
- **`MemberId`** (`int`): Primary automatic auto-increment integer ID.
- **`PoolId`** (`int`): Foreign key connecting the hardware node to its parent logical pool.
- **`IpAddress`** (`string`): Network address string mapping directly to physical Dinstar rack interfaces.
- **`Weight`** (`int`): Numerical value determining priority dispatch selection frequency during round-robin distributions.
AI Chunks (RAG) 3 chunks
Chunk #1 Dynamic Outbound Gateway Pools
# Dynamic Outbound Gateway Pools

To route external telecommunications traffic optimally, **Asterisk 2** groups physical gateway hardware assets into logical mapping collections called **Gateway Pools**. This database module maps out available cellular hardware arrays to balance session assignments cleanly.

---
Chunk #2 Gateway Load-Balancing Schema
## Gateway Load-Balancing Schema

The diagram below outlines how logical pools sort outbound traffic assignments dynamically across raw physical IP addresses:

```mermaid
graph LR
    %% Logical Pool
    subgraph LogicalPool["Logical Outbound Mapping"]
        EntityPool["GatewayPool Entity<br/>(PK: PoolId, Name: 'Indian Mobile Trunks')"]
    end

    %% Target Elements
    subgraph TargetMembers["Assigned Physical Gateways"]
        MemberA["GatewayMember Entity<br/>(IP: 192.168.10.50, Weight: 100)"]
        MemberB["GatewayMember Entity<br/>(IP: 192.168.10.51, Weight: 50)"]
    end

    %% Downstream Logic
    subgraph ExecutionTarget["PBX Outbound Core"]
        KamailioDisp["Kamailio Dispatcher Target<br/>(ds_select_dst Engine)"]
    end

    %% Vectors
    EntityPool ==>|"Includes Mapping"| MemberA
    EntityPool ==>|"Includes Mapping"| MemberB
    MemberA ==>|"Primary Selection"| KamailioDisp
    MemberB -->|"Secondary / Failover"| KamailioDisp

    %% Custom Curated Colors
    classDef poolToken fill:#0f172a,stroke:#38bdf8,stroke-width:2px,color:#fff,rx:6px,ry:6px;
    classDef memToken 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 LogicalPool,EntityPool poolToken;
    class TargetMembers,MemberA,MemberB memToken;
    class ExecutionTarget,KamailioDisp targetToken;
```

---
Chunk #3 Model Attribute Blueprint
## Model Attribute Blueprint

### 1. `GatewayPool` Entity
- **`PoolId`** (`int`): Primary automatic auto-increment integer ID.
- **`PoolName`** (`string`): Logical descriptor mapped to specific dialing groups.
- **`Members`**: Collection mapping physical gateway IP references.

### 2. `GatewayMember` Entity
- **`MemberId`** (`int`): Primary automatic auto-increment integer ID.
- **`PoolId`** (`int`): Foreign key connecting the hardware node to its parent logical pool.
- **`IpAddress`** (`string`): Network address string mapping directly to physical Dinstar rack interfaces.
- **`Weight`** (`int`): Numerical value determining priority dispatch selection frequency during round-robin distributions.