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

# Connect Asterisk / FreePBX to Famulor

> Set up routing, authenticate calls and test the connection from Asterisk / FreePBX to a Famulor assistant.

Use this guide to route calls from Asterisk / FreePBX to your assistant. Confirm the connection method for your account before changing the number’s routing.

## Prepare the Famulor destination

1. Open **Settings → Phone numbers → Add a number → Add SIP integration**. Select the SIP region and copy the displayed SIP URI.
2. For a static SIP connection, agree the exact called number, transport and inbound authentication with your provider or PBX administrator. Enter that number as the DID in Famulor. Use the provider’s complete SIP-signaling source list, or SIP credentials if the provider supports Digest toward this destination.
3. Enter the provider or PBX termination hostname and its outbound authentication if you will place calls through this connection. Save the integration and assign the number to your assistant.

### What to enter in Famulor

The screenshots use the English app labels.

![Incoming calls in Famulor](https://mintcdn.com/ouraicall/1SYDI0Rp2OzxQz66/images/guide-ui/sip-inbound-2026-11-17.webp?fit=max\&auto=format\&n=1SYDI0Rp2OzxQz66\&q=85\&s=3ccc75bb7a279b3fed67f99237270ff5)

Incoming calls in Famulor

* **Your phone number (DID)** · Enter the exact number delivered by Asterisk / FreePBX, with its country code and leading + for an E.164 DID.
* **Inbound authentication / Allowed source IPs** · Choose **Provider source IPs** and enter the complete SIP signaling list for Asterisk / FreePBX and the selected route.
* If the provider sends Digest authentication to Famulor, select **SIP username/password** and use the same inbound credentials configured on the provider side.

![Example in the English app](https://mintcdn.com/ouraicall/4u43DrIxuKKqCPTo/images/guide-ui/sip-asterisk-out-example.webp?fit=max\&auto=format\&n=4u43DrIxuKKqCPTo\&q=85\&s=1fda0b3b07b589aaea09db06c101b1de)

Example in the English app

Use your own number, provider settings and SIP login. The password field is blank in the example.

* **Termination address** · Use the provider hostname from the setup above (Asterisk / FreePBX). Enter only the hostname, without a SIP prefix or port.
* **Outbound authentication / SIP username / SIP password** · Select **Username / password** when using Digest. Enter the SIP login and password from **platform-auth**.

If both directions use Digest with different logins, choose **Separate inbound and outbound credentials** under **Credentials**. The form then shows a separate pair for each direction.

## Configure Asterisk / FreePBX

Configure a static, non-registering trunk in both directions — Asterisk never sends the platform a SIP REGISTER, and the platform never expects one.

### FreePBX (GUI)

1. In **Connectivity → Trunks → Add Trunk → Add SIP (chan\_pjsip) Trunk**, give the trunk a name.
2. Under **pjsip Settings → General**, set **SIP Server** to the Famulor hostname for your region, **SIP Server Port** to 5060, **Transport** to your TCP transport, **Registration** to **None**, and **Authentication** to **Outbound**. Enter the SIP username and secret you configured as Famulor inbound credentials.
3. Under **Advanced**, use the same hostname as **From Domain**. Set **From User** to the exact DID stored in Famulor. Enable ulaw and alaw, then **Submit → Apply Config**.
4. In **Connectivity → Outbound Routes**, add a route for the exact Famulor DID and select this trunk in **Trunk Sequence**. In the incoming DID’s destination or queue overflow, dial that DID through this route. Check the SIP request still contains the leading `+` when the Famulor DID uses it.

### Raw config (pjsip.conf)

The sample uses the Europe (EU) hostname. Use the Famulor hostname for the region selected in your SIP integration. [Inbound SIP addresses by region](https://docs.famulor.io/telephony/sip-trunks.md#inbound-sip-addresses).

The sample uses one SIP login for both directions. Enter it as the inbound credentials and the outbound credentials in Famulor. Asterisk’s `outbound_auth` answers Famulor’s challenge; `auth` challenges calls coming back from Famulor. If you use different logins, create separate auth sections.

```text theme={null}
[platform]
type=endpoint
context=from-platform
disallow=all
allow=ulaw
allow=alaw
aors=platform-aor
auth=platform-auth
outbound_auth=platform-auth
from_domain=5wxj7da18ea.eu.sip.livekit.cloud
from_user=<did-in-e164>
direct_media=no
rewrite_contact=yes

[platform-aor]
type=aor
contact=sip:5wxj7da18ea.eu.sip.livekit.cloud;transport=tcp

[platform-auth]
type=auth
auth_type=userpass
username=<username>
password=<password>

[platform-identify]
type=identify
endpoint=platform
match=<famulor-outbound-source-cidr>
```

Select the TCP transport configured in your Asterisk installation for this endpoint.

Drops at around 30 seconds often point to a missing SIP ACK. Check Contact and the public SIP and RTP addresses in the Asterisk trace. For one-way audio, verify NAT and RTP routing. For 488, compare the codec lists. For 401 or 407, check the credentials on the leg that received the challenge.

Use one `match=` line for each [Famulor outbound source range](https://docs.famulor.io/telephony/sip-trunks.md#outbound-source-addresses) you authorize. Map the `from-platform` context to the extension or outbound route you intend to expose.

In `extensions.conf`, route only the DID you configured in Famulor to this endpoint. This example uses `+12025550123`; replace it with your DID and connect this context to the intended incoming route or queue.

```text theme={null}
[to-famulor]
exten => +12025550123,1,Dial(PJSIP/${EXTEN}@platform,60)
 same => n,Hangup()
```

![Famulor SIP integration showing Europe and the inbound SIP address](https://mintcdn.com/ouraicall/1SYDI0Rp2OzxQz66/images/guide-ui/sip-region-2026-11-17.webp?fit=max\&auto=format\&n=1SYDI0Rp2OzxQz66\&q=85\&s=8f35c05be47202a269bf598eb620bc3b)

The SIP integration form provides the region-specific inbound destination.

## Test the complete route

Call your existing number from an external phone. Confirm an inbound entry in **History**, the assigned assistant, the original caller number and two-way audio. Test the schedule, queue overflow or IVR branch that sends calls to the assistant. If you enable outbound calls, place a separate test using the selected outbound number. Test a transfer to the intended human destination before using it in normal routing.

## If the test fails

If no call appears in History, check the number assignment, destination hostname, exact DID and inbound authentication. For a connected call with missing audio, compare the media and codec settings. For an outbound rejection, check the termination credentials, allowed sources, caller ID and destination permissions. Use the call time and call ID when contacting support.

[Shared SIP settings](https://docs.famulor.io/telephony/sip-trunks.md).

[Asterisk PJSIP and NAT](https://docs.asterisk.org/Configuration/Channel-Drivers/SIP/Configuring-res_pjsip/Configuring-res_pjsip-to-work-through-NAT/).


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