For AI assistants: this page as plain markdown is at https://docs.voicelogica.ai/raw/phone-systems/freepbx-asterisk.md, and https://docs.voicelogica.ai/llms.txt lists the docs by topic, one file each, small enough to read whole. Read those rather than this HTML page.
FreePBX, Asterisk, Issabel
Ce contenu n’est pas encore disponible dans votre langue.
How Voice Logica connects
Section titled “How Voice Logica connects”The PBX registers a SIP trunk to Voice Logica (way 1). Voice Logica creates the trunk and gives you a server, a username and a password; the PBX sends a REGISTER out, so no port forwarding is needed.
- Calls routed to this trunk are answered by the AI agent.
- The agent transfers callers back over the same trunk; they land in the trunk’s context (
from-pstn) and the inbound route rings the extension.
1. Create the connection in Voice Logica
Section titled “1. Create the connection in Voice Logica”Telephony - Trunks - Connect your PBX, pick FreePBX / Asterisk and the agent. Keep the dialog open until it says Connected.
2. Add the trunk
Section titled “2. Add the trunk”- Connectivity → Trunks → Add SIP (chan_pjsip) Trunk. Trunk Name
voicelogica. - pjsip Settings → General: Username and Auth username = the username, Secret = the password, Authentication = Outbound, Registration = Send, SIP Server = the server, SIP Server Port = 5060, Transport = 0.0.0.0-udp, Context =
from-pstn. - pjsip Settings → Advanced: From Domain = the server, DTMF Mode = RFC 4733, Qualify Frequency 60.
- Codecs: alaw first, then ulaw.
- Submit and Apply Config.
-
PBX → PBX Configuration → Trunks → Add SIP Trunk.
-
PEER Details:
host=<server>username=<username>fromuser=<username>secret=<password>fromdomain=<server>type=peerinsecure=port,invitedtmfmode=rfc2833disallow=allallow=alaw&ulawqualify=yescontext=from-pstn -
Register String:
<username>:<password>@<server>/<username> -
Submit and apply.
[voicelogica]type=registrationoutbound_auth=voicelogica-authserver_uri=sip:<server>:5060client_uri=sip:<username>@<server>contact_user=<username>
[voicelogica-auth]type=authauth_type=userpassusername=<username>password=<password>
[voicelogica]type=aorcontact=sip:<server>:5060
[voicelogica]type=endpointcontext=from-voicelogicadisallow=allallow=alaw,ulawdtmf_mode=rfc4733outbound_auth=voicelogica-authaors=voicelogicafrom_domain=<server>
[voicelogica]type=identifyendpoint=voicelogicamatch=<server>3. Send calls to the agent
Section titled “3. Send calls to the agent”- A short code: Connectivity → Outbound Routes, a dial pattern (for example
9|.or a dedicated code) using the Voice Logica trunk. - A number, an IVR option, a ring group or queue failover, after-hours calls: send it to a Misc Destination that dials over this trunk.
4. Let the agent transfer back to extensions
Section titled “4. Let the agent transfer back to extensions”Connectivity → Inbound Routes for calls from this trunk, with the extension as destination (or a route whose DID matches the extension numbers). Then, in Voice Logica, add the extensions as transfer destinations: an External destination with the extension number (for example 201), or a User with that extension. Use Warm transfer.
5. Check it works
Section titled “5. Check it works”- The dialog says Connected. On the PBX,
asterisk -rx "pjsip show registrations"shows Registered. - Dial the route from an extension: the call appears in Calls.
- Ask the agent for a colleague: the extension rings.
Good to know
Section titled “Good to know”- Behind NAT: set External Address and Local Networks in Settings → Asterisk SIP Settings (Issabel: PBX → Tools → Asterisk SIP Settings).
- Turn off SIP ALG on the office router.
Frequently asked questions
Section titled “Frequently asked questions”How do I connect my FreePBX to Voice Logica?
In Voice Logica, open Telephony - Trunks - Connect your PBX and pick FreePBX / Asterisk and the agent to get a server, a username and a password. In FreePBX 16 or 17, go to Connectivity → Trunks → Add SIP (chan_pjsip) Trunk, enter the username, password and server (port 5060) with Registration = Send and Context = from-pstn, then Submit and Apply Config. The Voice Logica dialog says Connected when the trunk registers.
Does Voice Logica work with Issabel, Elastix or plain Asterisk, not only FreePBX?
Yes. Voice Logica connects to FreePBX 16/17, Sangoma PBXact, Issabel, Elastix and plain Asterisk, in every case with a SIP or PJSIP trunk that registers to Voice Logica. On Issabel and Elastix you add a SIP trunk with PEER details and a register string; on plain Asterisk you add the registration, auth, aor, endpoint and identify sections to pjsip.conf.
Do I need port forwarding on my FreePBX or Asterisk for Voice Logica?
No. The PBX sends its REGISTER out to Voice Logica, so no port forwarding is needed. If the PBX is behind NAT, set External Address and Local Networks in Settings → Asterisk SIP Settings (Issabel: PBX → Tools → Asterisk SIP Settings). Turn off SIP ALG on the office router.
How do I send FreePBX calls, like an IVR option or after-hours calls, to the AI agent?
For a short code, add an outbound route in Connectivity → Outbound Routes with a dial pattern that uses the Voice Logica trunk. For a number, an IVR option, a ring group or queue failover, or after-hours calls, send it to a Misc Destination that dials over the Voice Logica trunk.
Can the AI agent transfer callers back to FreePBX extensions?
Yes. Calls from the agent arrive in the trunk’s context (from-pstn), and an inbound route in Connectivity → Inbound Routes rings the extension. In Voice Logica, add the extensions as transfer destinations (an External destination with the extension number, for example 201, or a User with that extension) and use Warm transfer.
How do I check that my Asterisk trunk to Voice Logica is registered?
Run asterisk -rx "pjsip show registrations" on the PBX: the Voice Logica trunk shows Registered, and the Connect your PBX dialog in Voice Logica says Connected. Then dial the route from an extension: the call appears in Calls.
