Back to page

Outbound REST Payload Maps

Raw Markdown & AI/RAG Chunks
Raw Markdown Source 2107 chars
# Outbound REST Payload Maps

To query specific records from disparate third-party systems, **Asterisk 2** implements customizable outbound network schemas. The integration engine compiles template properties into verified JSON string payloads before dispatching socket frames.

---

## Dynamic Request Serialization Pipeline

The flowchart below maps out how logical call properties compile into outgoing HTTP request blocks:

```mermaid
graph LR
    %% Data Source
    subgraph ActiveContext["Live Call Context Store"]
        VarCaller["CallerID String<br/>(Value: '9001')"]
        VarLang["Language string<br/>(Value: 'en')"]
    end

    %% Schema Mapping
    subgraph MappingEngine["JSON Payload Synthesizer"]
        MapSchema["Map Request Body Map<br/>(Binds string keys to raw JSON fields)"]
    end

    %% Socket Outbound
    subgraph TransportBus["Outbound Network Buffer"]
        StreamBody["Compiled Request Payload<br/>({ 'user': '9001', 'locale': 'en' })"]
    end

    %% Flows
    VarCaller --> MapSchema
    VarLang --> MapSchema
    MapSchema ==>|"Serialize JSON Buffer"| StreamBody

    %% Custom Curated Colors
    classDef ctxToken fill:#0f172a,stroke:#38bdf8,stroke-width:2px,color:#fff,rx:6px,ry:6px;
    classDef mapToken fill:#312e81,stroke:#ec4899,stroke-width:2px,color:#fff,rx:6px,ry:6px;
    classDef busToken fill:#1e293b,stroke:#a855f7,stroke-width:2px,color:#fff,rx:6px,ry:6px;

    class ActiveContext,VarCaller,VarLang ctxToken;
    class MappingEngine,MapSchema mapToken;
    class TransportBus,StreamBody busToken;
```

---

## Custom Serialization parameters

### 1. Dynamic Attribute Body Maps
User interfaces configure clear key-value dictionary templates mapping active call keys directly into JSON parameters:
- **Body Key**: `user_phone` -> **Source Scope**: `session.CallerID`
- **Body Key**: `auth_code` -> **Source Scope**: `local.DtmfInput`

### 2. Strict Transport Validation
If compiled bodies reference unknown parameters, mapping handlers intercept serialization threads instantly, flagging runtime exceptions to drop invalid API payloads automatically.
AI Chunks (RAG) 3 chunks
Chunk #1 Outbound REST Payload Maps
# Outbound REST Payload Maps

To query specific records from disparate third-party systems, **Asterisk 2** implements customizable outbound network schemas. The integration engine compiles template properties into verified JSON string payloads before dispatching socket frames.

---
Chunk #2 Dynamic Request Serialization Pipeline
## Dynamic Request Serialization Pipeline

The flowchart below maps out how logical call properties compile into outgoing HTTP request blocks:

```mermaid
graph LR
    %% Data Source
    subgraph ActiveContext["Live Call Context Store"]
        VarCaller["CallerID String<br/>(Value: '9001')"]
        VarLang["Language string<br/>(Value: 'en')"]
    end

    %% Schema Mapping
    subgraph MappingEngine["JSON Payload Synthesizer"]
        MapSchema["Map Request Body Map<br/>(Binds string keys to raw JSON fields)"]
    end

    %% Socket Outbound
    subgraph TransportBus["Outbound Network Buffer"]
        StreamBody["Compiled Request Payload<br/>({ 'user': '9001', 'locale': 'en' })"]
    end

    %% Flows
    VarCaller --> MapSchema
    VarLang --> MapSchema
    MapSchema ==>|"Serialize JSON Buffer"| StreamBody

    %% Custom Curated Colors
    classDef ctxToken fill:#0f172a,stroke:#38bdf8,stroke-width:2px,color:#fff,rx:6px,ry:6px;
    classDef mapToken fill:#312e81,stroke:#ec4899,stroke-width:2px,color:#fff,rx:6px,ry:6px;
    classDef busToken fill:#1e293b,stroke:#a855f7,stroke-width:2px,color:#fff,rx:6px,ry:6px;

    class ActiveContext,VarCaller,VarLang ctxToken;
    class MappingEngine,MapSchema mapToken;
    class TransportBus,StreamBody busToken;
```

---
Chunk #3 Custom Serialization parameters
## Custom Serialization parameters

### 1. Dynamic Attribute Body Maps
User interfaces configure clear key-value dictionary templates mapping active call keys directly into JSON parameters:
- **Body Key**: `user_phone` -> **Source Scope**: `session.CallerID`
- **Body Key**: `auth_code` -> **Source Scope**: `local.DtmfInput`

### 2. Strict Transport Validation
If compiled bodies reference unknown parameters, mapping handlers intercept serialization threads instantly, flagging runtime exceptions to drop invalid API payloads automatically.