Mediatrix 4400 (ISDN-BRI) configuration

Can anybody help me with configuring Mediatrix 4402 to work with FreePBX.

FreePBX is set up and working. It is under NAT in LOCATION-1.
Multiple extensions are set up and are working from different locations.

Mediatrix 4402 is at another location (LOCATION-2) again under NAT. I need some guidance on how to setup Mediatrix 4402 to work as trunk (incoming and outgoing).
The only thing I was able to do till now was to setup unit registration in Mediatrix and register with username and password setup in FreePBX as extension. Registration succeeds. But I don’t know on where to go from this point.

Thanks in advance.

Are you reffering to your previous post :
So, you are gone for Mediatrix 4000 connected to ISDN TE
Try to explain better what is your goal,
I’ve set them up to be used as Service Provider ISDN Gateway for my system
Do you need them to act as something complex ??


I’ve bought 4402 as 4401 is now available only for minimum order quantity of 100.

As you know already I have on BRI line. First I tried to connect the green cable (refer to my other post picture), the one that comes from provider and is connected to ISDN NT1+2a/b, to Mediatrix and after several reboots and trying to change settings I hadn’t seen any Physical Link: up in Mediatrix.

After that I’ve found out that I must the connect the other line to Mediatrix, the one that comes out from S port from that strange ISDN switch. So the first question is: is there any way to connect the line straight to mediatrix, or will I need the switch (ISDN NT1+2/b) as some converter to be there?

So after connecting the right line I got the physical link up and with some tracing to syslog server I got a configuration working.

I did the following thing:

  1. Changed the SIP->Servers to right IPs.
  2. Added unit registration through ‘default’ gateway.
  3. Added the unit authentication password (disabled realm check). I guess realm is: “asterisk”, do I need to check the realm at all? What’s the purpose? Is there any difference to what apply authentication? It is currently apply to ‘gateway’, but it is also working with unit and username. I guess for my configuration with one registration it will be the same.
  4. Added to routes to Call Router: idsn-Bri1 -> sip-default and vice verse.

In FreePBX added a trunk with following outgoing settings:
Trunk Name: 'mentioned username (unit name) in mediatrix’
Peer Details:


Also incoming and outgoing routes in FreePBX (that is trivial). Also for my case there two incoming routes as I have 2 phone numbers for that bri line (each incoming route with its’ own DID). Still will find out how to configure the 3rd number for fax.

Is everything correct? Is there a better way to do it?
Can’t I connect somehow the line from provider directly to Mediatrix without that ISDN-NT1+2a/b? Will phones connected to 2a/b still work in parallel (as failover for example)? With this config will the 2 channels work in parallel (or do I need second registration for second channel or some other thing?

I will really appreciate your help. Sorry I just can’t test some things on my own as I’m physically in other country and Mediatrix is at another country, so I do the setup part remotely. I will be able also to post some screenshots of configs later as I’m not currently at the office and remote access is open only for specific IP.

I just answer your first question: the ISDN line (BRI in your case) exists because the NT (Network Terminator) exists.

The NT has two sides: the TELCO side (referring to that side as the “provider/operator side”), in which terminates the ISDN Bus called “U Bus” (2 wires), then there is the Equipment side (referring to that side as the “customer side”) in which the ISDN Bus called “S Bus” (4 wires) is created. The basic NT converts U Bus <-> S Bus.

Mediatrix (as others) needs to be connected to “S Bus” and so you can’t eliminate the NT (Network Terminator) because if you trash it you loose the ISDN line. The NT is the provider equipment that terminate the ISDN line to your location.

TELCO Operator <–> [ U Bus NT S Bus ] <–> Customer Equipment (an ISDN Media Gateway, an ISDN PBX, an ISDN Phone, an ISDN PCI Card, whatever…etc.).

Sorry for delay
As Parnassus said, you cannot eliminate ISDN NetworkTerminal interface.
If you understand Italian language or you’re able to translate there is a good guide for mediatrix series :
My trunks matching those settings are configured this way :

host=dynamic type=peer secret=mysecret port=5061 disallow=all allow=alaw nat=no qualify=yes canreinvite=no
This way, all MSN informations are passed from ISDN network to FreePbx so you have to manage the phone numbers using inbound routes Note that also MSN related to the analog ports of NT1 terminal are passed to Mediatrix->FreePBX so you can manage them with inbound routes, You can have the same phone number ringing on the NT1 analog port as well as FreePBX extension, but sometimes it leads to some problem here on italian NT1 network. So we prefer to: - On FreePBX do not configure phone numbers already configured on NT analogue port, or - Configure and use all phone numbers on inbound routes and DISABLE the NT1 analugue ports, or - (best) Configure and use all phone numbers on inbound routes and replace the NT1+analogue interface with a pure digital one with no analogue ports (here we call it NT1base) so all is routed through Mediatrix (but this operation has to be made by your service provider unless you don't know some TLC technician able to do it for you for free).

About the third phone number and the use of analogue ports “in parallel” with freepbx:

Did you remeber I explain you can connect more ISDN device phisically in parallel to the “S” output as a bus ??
Well, you have connected Mediatrix to one of the RJ45 “S” output.
Imagine the two analogue ports inside the NT device, as a separated programmable circuit connected as well to the “S” port.
This circuit is configured telling him what of the phone numbers, assigned by telco provider, have to make the analogue ports ring.
So the same phone number (MSN) can be configured simultaneously on the analogue port as well as on FreePBX inbound routes
This will make both devices to ring when an incoming call for that number will take place.
But as said, sometimes here we have matching problem or priority problem so we prefer to manage a single phone number with a single device.
This is for incoming calls , for outgoing ones there is no problem, you can use both the same time (but max 2 channel/calls concurrently on 1bri)

Well explained.

IMHO, the interoperability between an ISDN (BRI) Line and an IP-PBX (FreePBX Distro) gives its best result - as you just said - if the involved Media Gateway (here a Mediatrix 4402) placed in between, is let to manage the ISDN Line in its entirely and so “forwarding” all the incoming ISDN calls to the IP-PBX.
ISDN PRI hasn’t this requirement because there isn’t anything like “NT1 Plus”/“NT1”. The ISDN PRI Network Terminator gives you the S2 Bus and nothing else.

Regarding the “NT1 Plus”/“NT1” differentiation (don’t know if this nomenclature is valid outside Italy): best of all is to have a pure digital NT (called simply “NT1” or “NT1 Base” here in Italy) that hasn’t any analog ports.

Such type of pure digital connectivity lets you to spend little less (in terms of TELCO monthly costs) - because you don’t have the parallel analog service - and have a line termination fully digital avoiding issues, as reported (no NT programming for managing various MSNs on those analog ports is necessary because there aren’t analog ports at all).

I think that, historically, “NT1 Plus” was introduced in a era during which PBXs were a true novelty and offices/companies needed to manage G3 FAX machine along to with digital telephones (or with their very first digital PBXs). A necessary coexistence of the past times.

In the end, the 3rd proposed scenario is really the best one: in this way (any) Media Gateway is able to manage all incoming (and outgoing) calls processing them to fed then the FreePBX Distro as its incoming calls final destination. No analog phones of FAXes would then seize any B Channel because these B Channels are fully in control of the used Media Gateway.

Once this leg is working as expected all incoming calls that reach (and all the outgoing calls that leave) FreePBX Distro from the Media Gateway should be managed by properly configuring both FreePBX Incoming Routes and FreePBX Trunks to meet the system/customer needs.

If you can’t reconfigure (“NT1 Plus” to “NT1”) your ISDN connectivity type to met the 3rd scenario requirements go, at least, with the 2nd one and still let the FreePBX Distro to manage all incoming calls.

It’s clear that if you let the FreePBX Distro to manage all incoming (and outgoing) calls you then also need to satisfy your internal requirements in terms of analog phones or G3 FAX Machines presence using ATAs devices (but this is quite normal).