> ## Documentation Index
> Fetch the complete documentation index at: https://humain.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# FreePBX module

> Add Humain Kiosk AI to any FreePBX installation — no dialplan editing required.

> [!NOTE]
>
> This page is for FreePBX administrators who want to route calls to the Humain AI without
> writing dialplan code. If you are an Asterisk developer who prefers scripted control, see the
> [Asterisk AGI integration](https://humain.mintlify.site/voip/asterisk-agi.md) guide instead.

The **Humain Kiosk** FreePBX module adds a new destination type — **Humain Kiosk AI** — to your
FreePBX routing table. Once installed, you can route any inbound route, IVR option, or ring
group timeout directly to the AI — the same way you would route to a queue or voicemail.

***

## Installation

**1. Install the module**

In your FreePBX admin panel, go to **Admin → Module Admin**. Click **Check Online** to
refresh the module repository, then search for **"Humain Kiosk"**. Click **Download** and
then **Process**.

> [accordion] Screenshot — installing from Module Admin
>
> Screenshot: Admin → Module Admin → Humain Kiosk → Download and Process

Alternatively, download the `.tar.gz` from the
[FreePBX module page](https://www.freepbx.org/add-ons/add-on-modules/humain-kiosk/) and
upload it via **Module Admin → Upload**.

After installation, click **Apply Config** to reload Asterisk.

**2. Enter your credential**

Go to **Admin → Humain Kiosk Settings**. Paste your device credential token into the
**Credential** field and click **Save**.

> [accordion] Screenshot — entering your credential
>
> Screenshot: Admin → Humain Kiosk Settings → Credential field

> [!NOTE]
>
> Issue credentials from the Humain admin panel under **Kiosk → Credentials → Issue new
> credential**. The token is displayed only once — copy it before closing that page.

**3. Configure the AI destination**

Go to **Connectivity → Humain Kiosk Destinations**. Click **Add Destination** and configure:

* **Name** — a label for this destination (e.g., "Main AI Agent")
* **Codec preference** — G.722 recommended; G.711 PCMU/PCMA for legacy carriers
* **Timeout** — maximum call duration in seconds (0 = unlimited)
* **Fallback destination** — where to route the call if the AI is unavailable

> [accordion] Screenshot — adding a Humain Kiosk destination
>
> Screenshot: Connectivity → Humain Kiosk Destinations → Add Destination form

Click **Save**, then **Apply Config**.

**4. Route calls to the AI**

With the destination created, route calls to it from anywhere in FreePBX:

> [tab] Inbound route
>
> Go to **Connectivity → Inbound Routes**. Edit the route for the DID number you want the
> AI to answer. Set **Set Destination** to **Humain Kiosk → \[your destination name]**.
>
> > [accordion] Screenshot — setting destination on an inbound route
> >
> > Screenshot: Inbound Routes → Set Destination → Humain Kiosk → Main AI Agent

> [tab] IVR option
>
> Go to **Applications → IVR** and edit your IVR menu. In the **IVR Entries** table, set
> any digit option's destination to **Humain Kiosk → \[your destination name]**. For
> example, press `1` for the AI assistant.
>
> > [accordion] Screenshot — IVR option pointing to Humain Kiosk
> >
> > Screenshot: Applications → IVR → IVR Entries → digit 1 → Humain Kiosk

> [tab] Ring group timeout
>
> Go to **Applications → Ring Groups**. Set the **Destination if no answer** to
> **Humain Kiosk → \[your destination name]**. When no agent answers, the caller is
> transferred to the AI.
>
> > [accordion] Screenshot — ring group timeout to Humain Kiosk
> >
> > Screenshot: Ring Groups → Destination if no answer → Humain Kiosk

Click **Save**, then **Apply Config**.

**5. Test with sandbox mode**

Before going live, enable **Sandbox mode** in **Admin → Humain Kiosk Settings**. In sandbox
mode, the AI uses stub responses — no LLM credits are consumed.

Dial the DID number or trigger the IVR option. You should hear a predictable sandbox
response. Once satisfied, disable sandbox mode and apply config.

> [accordion] Screenshot — sandbox mode toggle
>
> Screenshot: Admin → Humain Kiosk Settings → Sandbox mode toggle

***

## Advanced settings

> [accordion] Passing caller ID to the AI session
>
> When enabled, the module passes the caller's CLI (Caller Line Identification) and the
> dialled DID to the Humain session as metadata. Your kiosk's action endpoints can use this
> to look up customer records.
>
> Enable **Pass caller metadata** in **Admin → Humain Kiosk Settings → Advanced**. The
> following fields are added to each session:
>
> | Metadata key | Value |
> | - | - |
> | `caller_id` | Caller CLI (ANI) |
> | `did` | Dialled number (DNIS) |
> | `channel` | Asterisk channel name |

> [accordion] Codec configuration
>
> The module negotiates codecs with the Humain SIP gateway in this preference order:
> G.722 → G.711 PCMU → G.711 PCMA.
>
> To force a specific codec, change the **Codec preference** setting on each destination.
> See the [codec guide](https://humain.mintlify.site/voip/codec-guide.md) for quality recommendations.

> [accordion] Fallback on API error
>
> If the Humain API is unreachable when the call arrives, the module routes to the configured
> **Fallback destination** instead of dropping the call. Set the fallback to a queue, voicemail,
> or another extension in **Connectivity → Humain Kiosk Destinations**.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.