> ## Documentation Index
> Fetch the complete documentation index at: https://app.miyon.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# NFON SIP Trunk

> Connect NFON using IP authentication: set up inbound calls, outbound calls, and warm transfers.

Connect your NFON SIP trunk to Miyon AI so your voice agent can answer calls on your existing phone numbers and make outbound calls. The connection described here uses **IP authentication without SIP registration and without a password**.

First, set up the destination and phone numbers in the NFON portal. Then allow NFON as a source in Miyon AI and configure the outbound connection.

## Requirements and connection details

You need access to **Template**, **PBX Endpunkt**, and **Nummernrouting** in the NFON portal, plus the SIP feature enabled under **Phone numbers → SIP** in Miyon AI. Have your NFON phone numbers and the public signaling IP addresses or networks provided by NFON for your connection ready.

| Setting | Value | Where to enter it |
| - | - | - |
| Our SIP gateway IP address | `35.198.71.76` | NFON → PBX Endpunkt |
| Protocol and port | `UDP`, `5060` | NFON → PBX Endpunkt |
| Allowed NFON sources | `109.68.96.0/21` per the NFON manual; check your connection details | Miyon AI → Inbound → Allowed Source IPs / CIDRs |
| Outbound SIP destination | `siptrunk.cloud-cfg.com` | Miyon AI → Outbound → Termination URL |
| Phone number format | Full number in E.164, including `+` and country code | NFON template and Custom phone numbers |

The gateway IP is stored in NFON as the destination for inbound calls and for IP authentication of outbound calls. Enter the **NFON source addresses** on our side instead. Do not confuse these two sides of the connection.

## 1. Create a template in NFON

Open **NFON SIP Trunk → Template → PBX Endpunkt Template** and click **+**.

| Field | Setting |
| - | - |
| Name | A unique name of your choice for this connection |
| Nummernformat | **International E164** |
| Authentifizierung | **IP Adresse** |
| Clip-Typ | **From ID Clip** |
| Inbound Ruri Format | **E164** |

Save with **Erstellen**. Make sure you select **IP Adresse** for authentication. The **Registrieren** option is not part of this setup.

![Creating a PBX endpoint template with IP authentication and E164](https://mintcdn.com/miyon/w5Ec-WNvJnft0p4N/images/sip/nfon/create-template-miyon.jpg?fit=max\&auto=format\&n=w5Ec-WNvJnft0p4N\&q=85\&s=ebae1526243dc713c8a2108cf752d9bf)

**Inbound Ruri Format** determines how NFON sends the called number in the SIP destination. With **E164**, Miyon AI can match that number to the corresponding custom phone number and assigned voice agent. **From ID Clip** determines how NFON evaluates the displayed caller number.

## 2. Add a PBX endpoint to the trunk

Open **PBX Endpunkt**, select your existing main SIP trunk or its trunkset, and click **+**. The name **SIP Trunk STARFACE** in the screenshots is an example; select the trunk your phone numbers belong to.

Enter the following in the **PBX Endpunkt erstellen** dialog:

| Field | Setting |
| - | - |
| Name | A unique name for the endpoint |
| PBX Endpunkt Template | The template you just created |
| Protokoll | **UDP** |
| IP-Adresse | `35.198.71.76` |
| Port | `5060` |

![Creating a PBX endpoint with the gateway IP, UDP, and port 5060](https://mintcdn.com/miyon/w5Ec-WNvJnft0p4N/images/sip/nfon/create-trunk-miyon.jpg?fit=max\&auto=format\&n=w5Ec-WNvJnft0p4N\&q=85\&s=c7195862df7f6401497a142f38fc517c)

Save the endpoint. Then check in the overview that **Aktiv** is enabled and the endpoint is marked **Primär**. If necessary, adjust **Priorität** using the arrows.

![The endpoint is enabled and marked as primary](https://mintcdn.com/miyon/w5Ec-WNvJnft0p4N/images/sip/nfon/sip-trunk-enabled-miyon.jpg?fit=max\&auto=format\&n=w5Ec-WNvJnft0p4N\&q=85\&s=6bbb933c1a18198711c7463ea4845353)

> [!NOTE]
>
> Endpoint priority applies to the trunkset. If the trunk is already in use, check which other phone numbers and phone systems are routed through it before changing the primary endpoint.

## 3. Route phone numbers in NFON

Open **Nummernrouting** and click **+**.

1. Give the routing a name.
2. Under **Verfügbare Trunksets/Dienste**, select the same main trunk to which you added the new PBX endpoint.
3. Select the appropriate **Nummernblock**.
4. Select the phone number or numbers your voice agent should handle.
5. Save the routing.

![Selecting the trunkset, number block, and required phone number](https://mintcdn.com/miyon/w5Ec-WNvJnft0p4N/images/sip/nfon/create-routing-miyon.jpg?fit=max\&auto=format\&n=w5Ec-WNvJnft0p4N\&q=85\&s=7187ab66b8c0844c585b3d7d12fd07a4)

The new assignment then appears in the routing overview. The names and phone numbers in the screenshots are examples; use your own values.

![Saved phone number routing in the overview](https://mintcdn.com/miyon/w5Ec-WNvJnft0p4N/images/sip/nfon/routing-miyon.jpg?fit=max\&auto=format\&n=w5Ec-WNvJnft0p4N\&q=85\&s=123280fd234662a828d715272d6dd40b)

## 4. Set up inbound calls in the platform

In Miyon AI, open **Phone numbers → SIP → Set up SIP connection → Inbound**.

1. Enable **Receive calls via IP**.
2. Under **Allowed Source IPs / CIDRs**, enter the NFON signaling network `109.68.96.0/21`, unless NFON specifies different source addresses for your connection. You can separate multiple IP addresses or CIDRs with commas.
3. Save the connection and make sure Inbound is active.

![Inbound SIP connection with allowed source addresses and IP mode](https://mintcdn.com/miyon/w5Ec-WNvJnft0p4N/images/sip/nfon/aipro-sip-ip.jpg?fit=max\&auto=format\&n=w5Ec-WNvJnft0p4N\&q=85\&s=9954239b33d446e5ab183e3ca26b3552)

> [!WARNING]
>
> **`192.168.0.1` in the screenshot is only an example.** Replace it with the real public source addresses specified for your NFON connection. Do not enter your local network address or our gateway IP `35.198.71.76` here. The allowed sources list is required in IP mode.

The [NFON SIP Trunk Flexx manual, page 5](https://a.storyblok.com/f/301347/x/32897fbd25/manual_sip_trunk_flexx_v3-1_de_202407.pdf#page=5), lists `109.68.96.0/21` as its signaling network. Use this network if it matches the current connection details from NFON; different details provided by NFON for your connection take precedence.

The IP setting applies to **Inbound and Outbound of the same SIP connection**. For this NFON setup, you do not need to enter your personal inbound SIP address in the NFON portal: NFON sends directly to the gateway IP. Miyon AI uses the allowed source and the full called number to route the call.

### Assign the number to the voice agent

Under **Custom phone numbers → Add phone number**, add each number routed by NFON and assign it to the required voice agent. Use the **exact full E.164 number** sent by NFON, for example `+4921112345678`.

An additional or missing final digit means a different phone number. A number block in NFON does not replace assigning the individual phone numbers in Miyon AI. See [Custom SIP Connection](/docs/en/sip-trunk#adding-a-custom-phone-number) for details.

## 5. Set up outbound calls

Open **Set up SIP connection → Outbound**.

1. Enter `siptrunk.cloud-cfg.com` as the **Termination URL (domain or IP)**.
2. Keep **IP authentication (no password)** enabled. In this mode, you do not need a SIP username or SIP password in the platform.
3. If needed, open **Advanced** to set the **User-Agent (optional)**. Read the next section before making your first test call.
4. Save the connection and make sure Outbound is active.

![Outbound SIP connection with IP authentication and an optional User-Agent](https://mintcdn.com/miyon/w5Ec-WNvJnft0p4N/images/sip/nfon/user-agent-sip-outbound.jpg?fit=max\&auto=format\&n=w5Ec-WNvJnft0p4N\&q=85\&s=6388d00089cd6411c8563527e67db001)

The `sip.provider.example` placeholder in the screenshot is not an NFON address. Enter **`siptrunk.cloud-cfg.com`** there. The termination URL is a single outbound SIP destination; a list of source IP addresses belongs exclusively in the Inbound setting.

For outbound calls, use a phone number from your NFON trunk assigned to the calling voice agent under **Custom phone numbers**. Then start a test under [Outbound Calls](/docs/en/outbound-calls).

### Set the User-Agent before the first call

NFON remembers the **User-Agent** of a PBX endpoint. If no value is stored yet, NFON learns it from the next outbound SIP call setup (`INVITE`). For subsequent calls, NFON compares the **first five characters**. A different value can therefore prevent a call even when the IP address is correct. This behavior is described on [page 37 of the NFON manual](https://a.storyblok.com/f/301347/x/32897fbd25/manual_sip_trunk_flexx_v3-1_de_202407.pdf#page=37).

For a new connection, you can leave the optional field empty to use the default or set a fixed value before the first call. Keep that value unchanged afterwards. No particular brand name is required.

To change the User-Agent of an endpoint that has already been used:

1. Save your chosen value under **Outbound → Advanced → User-Agent (optional)**.
2. Open the corresponding **PBX Endpunkt** in the NFON portal.
3. Click **Reset des User Agents**.
4. Then start an outbound test call from Miyon AI. NFON learns the newly sent value from that call.

The reset and learning process are described on [page 38 of the NFON manual](https://a.storyblok.com/f/301347/x/32897fbd25/manual_sip_trunk_flexx_v3-1_de_202407.pdf#page=38). The User-Agent is not a password.

## 6. Set up and test warm transfer

For NFON, use **warm transfer** when the voice agent needs to hand a caller over to a colleague. A working **outbound connection** is required.

While the inbound conversation stays connected, Miyon AI starts an **additional outbound call** through your NFON trunk to the transfer destination. Once the handover is accepted and confirmed, the participants are connected. The trunk needs at least two concurrent call channels for the inbound call and the additional outbound call. Other ongoing calls require additional capacity.

Set up the handover using the [Warm Transfer](/docs/en/warm-transfer) guide. Test a normal outbound call first, then test the transfer, including acceptance and audio in both directions.

> [!NOTE]
>
> **SIP REFER:** The NFON SIP Trunk Flexx manual does not describe how to configure **in-dialog REFER**, which transfers a call within an existing SIP dialog. Use **warm transfer** for call handovers. The outbound connection must be set up because the handover starts an additional outbound call.

## Check the connection

| Symptom | Check first |
| - | - |
| Another phone system or an announcement answers the call | Check NFON number routing, the selected trunkset, and whether the PBX endpoint is active and primary. |
| The voice agent receives no inbound call | Check the gateway IP, UDP port 5060, the real allowed NFON sources, and the exact E.164 number with its agent assignment. |
| Outbound is rejected, for example with `403 Forbidden` | Check the termination URL, IP authentication, allowed gateway IP, and caller number. If the User-Agent changed, also check NFON's stored value or reset it. A `403` alone does not establish a specific cause. |
| Inbound works, but warm transfer does not | Test a normal outbound call first; then check the transfer destination, available call channels, and warm transfer settings. |

If you need support, note the test time and time zone, caller and destination numbers, and the affected direction. These details help identify the calls in the SIP logs on both sides.


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