# Analog and ISDN systems

Older phone systems (Panasonic KX-TES / TEM / TA, analog and ISDN-only systems, and IP systems without a SIP licence or card) cannot register a SIP trunk. Voice Logica still connects to them, through a small **SIP gateway** or without touching the PBX at all.

## How Voice Logica connects

| Your PBX has | Put in between | What the PBX sees | Transfers back |
|---|---|---|---|
| **ISDN BRI ports** (S0) | an **ISDN BRI gateway** in NT mode (beroNet, AudioCodes Mediant BRI, Patton SmartNode) | an ISDN line from Voice Logica, with several channels and the dialled number | to any extension, with the number; **Warm** transfer comes back when nobody answers |
| **Analog trunk (CO) ports** | an **FXS gateway** (Grandstream HT812 / HT814) | an ordinary analog line | the call arrives on the CO line; the PBX sends it where that line is set to ring |
| **Analog extension ports** | an **FXO gateway** (Grandstream HT813, GXW4104 / 4108) | an analog phone | hook-flash transfer: blind, no way back if nobody answers |
| Nothing free, or you do not want to change it | nothing: **forward the number** | no change | to direct numbers or mobiles, with **Warm** transfer |

In all three gateway cases the gateway **registers to Voice Logica** exactly like a PBX trunk ([way 1](https://docs.voicelogica.ai/phone-systems/#the-four-ways-voice-logica-connects)): create the connection with **Telephony - Trunks - Connect your PBX**, pick **Analog or ISDN gateway**, and enter the server, username and password on the gateway.

The best result comes from the ISDN gateway on an ISDN PBX: the PBX keeps working with its ISDN lines, and Voice Logica becomes one more ISDN line with several channels. With analog gateways each port carries one call.

## ISDN BRI gateway

The gateway connects to a free BRI port of the PBX. On that port the gateway is the network (**NT**) side and the clock master; the PBX treats it as an ISDN line.

**beroNet**

1. **Hardware**: the BRI port facing the PBX: **Type** = NT, **Clock mode** = InternalCrystal.
2. **PSTN → ISDN**: create a port group for that port.
3. **SIP → SIP**: **SIP Registrar**, **SIP Outbound Proxy** and **SIP Domain** = the server, **User** = the username, **Secret** = the password, **Register** = yes, UDP.
4. **Dialplan**: one rule ISDN → SIP (calls from the PBX to Voice Logica) and one SIP → ISDN (transfers back to the PBX with the extension number).

**AudioCodes Mediant 500 / 800 BRI:** **Setup → Signaling & Media → Gateway → Trunks & Groups → Trunks**: **Protocol Type** BRI EURO ISDN, **ISDN Termination Side** = Network side, **BRI Layer2 Mode** = Point To Point (match the PBX). Registration under **SIP Definitions → Proxy & Registration**, **Enable Registration** on; the status is under **Monitor → VoIP Status → Registration Status**.

**On the PBX:** route the calls the agent should answer (an MSN/DDI, an IVR option, after-hours calls) out on the trunk group of that BRI port, and let incoming calls on that port reach the extensions by number (DDI), so transfers back ring the right person.

## Analog gateways

**FXO gateway on an extension port (HT813, GXW410x).** The PBX rings the analog extension; the gateway answers and sends the call to Voice Logica.

- **Unconditional Call Forward to VoIP** = any number, for example `100`: every call on the Voice Logica trunk goes to the agent you picked. Without it callers hear a second dial tone (GXW410x: per channel, for example `ch1-4:100`).
- **Number of Rings** sets how long the gateway waits before answering.
- **Caller ID Scheme** (ETSI-FSK for Greece) passes the caller's number to the agent, if the PBX sends caller ID on that extension.
- **AC Termination**: country Greece. Tune **Current Disconnect** or **PSTN Disconnect Tone Detection** so the gateway hangs up when the caller does.
- **Transfers:** with **Send Hook Flash to PSTN** on, the agent can flash and dial an extension. It is a blind transfer: the agent cannot see whether the extension answered. Prefer taking a message, or transfer to direct numbers instead.

**FXS gateway on a trunk (CO) port (HT812, HT814).** The PBX sees one more analog line. Calls the PBX sends out on that line reach the agent; transfers come back as a call on that line, which the PBX rings where the line is set to ring (an operator, a group or DISA). An analog line carries no dialled number, so it cannot reach a specific extension directly. Use **Loop Current Disconnect** or **Polarity Reversal** so the PBX sees the hang-up.

On every gateway: codecs G.711 A-law / u-law only, DTMF RFC 2833.

## No gateway: forward the number

Your carrier forwards the office number to a Voice Logica number, all calls or only unanswered and busy ones. Nothing changes on the PBX, the number stays yours, and no portability is needed. The agent transfers to the people's direct numbers or mobiles with **Warm** transfer, so it comes back and takes a message when nobody answers. Forward only the main number, not the direct numbers the agent transfers to. See [Forward your number](https://docs.voicelogica.ai/telephony/forward-your-number/).

## Questions

**Gateway or forwarding?**
Forwarding goes live today and needs no hardware. A gateway keeps the PBX in charge: staff transfer calls to the agent, the agent transfers back to extensions, and the PBX's own numbers and rules stay as they are. For an ISDN PBX with a free BRI port, the ISDN gateway gives the best result.

**Which gateway should we buy?**
Any gateway that registers to a SIP provider with a username and password works. Tell us the PBX model and its free ports before you buy; we check the setup with you or your maintainer.
