New Distro with Epygi Quadro 6L Gateway

I am trying to get together a system with a FreePBX 1.813.210.58-1 and an Epygi Quadro 6L (6 Line FXO Gateway).
I can get the calls to come in and route to the right destination but i am unable to make outbound calls.

When trying to make outbound calls i get the all circuits are busy message.
According to Epygi tech support they are not seeing any SIP INVITE when they look at the logs on the device.

Trunk Setup in FreePBX is as below:

Trunk Name: FXO1

Outgoing Settings:
Trunk Name : (CallerID Number of incoming line)
Peer Details:


Incoming Settings:
User Context: 99 (the username on the quadro made for this trunk)
User Details:
secret=<password assigned for user 99 on quadro>

Register string is blank.

These settings were given to me from Epygi as they apparently worked on an older Elastix install.

As i said, inbound is fine, just cannot get outbound calls through.

Hopefully someone can help me soon as i hear these gateways are rock solid once configured.

When all is working will put up a guide on full setup of both Epygi and FreePBX for others out there.

thanks in advance again.

Anyone got any ideas on this one ???

I got this working with help from the Supplier.
If anyone wants the configs or any help setting it up, let me know.
A mate of mine has been using the Epygi boxes for a few years with ISDN but this is the first PSTN install i have seen with them.

Anyway, just letting you all know it does work and is very solid as well from what i have tested.


I suggest maybe giving step by step in this thread so others can reference this in the future if they need to get it setup. Thanks

As soon as i get some time now. Just looking through editing auto provision of T38G handsets.


I have the same problem on the outgoing routes. Could help me please?

Inbound are working well… But for outbound calls I got “All circuit are busy” message.


jadjal, have you set up Outbound Routing in the Epygi??

Will try an post into this thread the guide i made, but i made it in MS Word.

Login to Quadro FXO Gateway
• Username : admin
• Password : 19

This document assumes you have configured the WAN port to a static IP and that Time and Date settings have been configured.

This document is solely to provide information to allow a Quadro 6FXO FXO Gateway to be able to provide PSTN access to FreePBX Distro.

First thing to do is set up the authenticated users.
Next we setup the inbound call routing.
After this we will set up the outbound call routing.
Then we will go into the FreePBX interface and setup our trunks and routing.

User / Trunk Authentication setup

Users -> Extensions Management

• Remove all except 00 Attendant
• Click Add
o Extension Number (Username later on) Example: 100
o Set Username (numeric value) Example: 100
o Set and confirm password (numeric value) Example: 2012
o Enter SIP server IP (FreePBX.Server.IP.Address) Example:
o SIP Port 5060 and leave Registration unticked.
• SIP Advanced Settings
o Authentication Username (same as username above)
o Tick “Send Keep-alive”
o Outbound Proxy Host Address (FreePBX.Server.IP.Address)
• Voice Mailbox Settings
o Disable Voice Mail
• Save
• Repeat for Each Line

Inbound Routing of calls

Telephony -> Call Routing -> Call Routing Table

• Click Add
o Destination Number Pattern: *
o Number of Discarded Symbols: 1
o Prefix: Example: 55512345
o Destination Type: IP-PSTN
o Metric: 10
o Description:
• Click Next
o User Extension Settings: Example: 100
o Tick “Keep Original Caller ID” and “Add Remote Party ID”
o Destination Host: (FreePBX.Server.IP.Address)
o Destination Port: 5060
o Username: Extension Username Example: 100
o Password: Extension Password Example: 2012
o Tick “Use RTP Proxy”
o Failover Reasons: None
o Transport Protocol for SIP messages: UDP
• Click Next
o Source number Pattern: *
o Source Type: FXO
• Click Next
o Source Port ID: Example: FXO 1
• Click Next
• Click Finish
• Repeat for Each Additional Line (choosing correct line number and associated users)

Telephony -> FXO Settings

• Click FXO 1
o Enable FXO
o Allowed Call Type: Both incoming and outgoing
o Route incoming FXO call to: Routing: * <Routing with a value of *>
o PSTN Number: Example: 55512345
o Save
• Repeat for each additional line in use.

Outbound Routing of Calls
(All calls can use any available line)

Telephony -> Call Routing -> Call Routing Table

• Click Add
o Enable Record
o Destination Number Pattern: *
o Destination Type: FXO
o Metric: 10
o Description: FXO
• Click Next
o Port ID: Example: FXO1, FXO2, FXO3, etc
o Failover Reasons: None
• Click Next
o Source Number Pattern: * (any trunk / caller id from PBX dialling out)
o Source Type: SIP
• Click Next
o Source Host: (FreePBX.Server.IP.Address)
• Click Next
• Check all and click Finish

(One Extension in FreePBX has own dedicated line: Example would be a shared office)

In this situation, Office A can use lines 1, 2, and 3 but line 4 is for Office B.
Setup would be the same for above but Port ID in step 2 would ONLY be FXO1, FXO2 & FXO3
For FXO4 we make a new rule as below.

Telephony -> Call Routing -> Call Routing Table

• Click Add
o Destination Number Pattern: *
o Destination Type: FXO
o Metric: 10
o Description: FXO4
• Click Next
o Port ID: FXO 4
o Failover Reasons: None
• Click Next
o Source Pattern Number:
o Source Type: SIP
• Click Next
o Source Host: (FreePBX.Server.IP.Address)
• Click Next
• Check all and click Finish
• Back in call routing
o Move up the route just created above the wildcard source route.
Setup Trunks and Routes in FreePBX

Login to FreePBX Admin GUI


Connectivity -> Trunks

• Add trunk
o Trunk Name: FXO1
o Outbound CallerID:
o Outgoing Settings:
 Trunk Name:
 PEER Details:
• host=<FreePBX.Server.IP.Address>
• qualify=yes
• type=peer
o Incoming Settings:
 USER Context: <Username in Quadro for Line1 : Example: 100>
 USER Details:
• context=from-trunk
• host=<FreePBX.Server.IP.Address>
• qualify=yes
• secret=<password for Quadro line1 user: Example: 2012>
• type=friend
• username=<Username in Quadro : Example: 100>
• Add Trunk
o Same as above for line2 / FXO2 through to last line.

Basically we have made 1 trunk per line.


Inbound Routes

Connectivity -> Inbound Routes

• Create inbound routes as per normal – you can do based on CallerID as well as this is passed through from the Quadro

Outbound Routes

In this example we will say that Office A has access to lines 1-3, Office B has access ONLY to line 4 from extension 1010, and lines 5 & 6 are unused.

Connectivity -> Outbound Routes

• Add Route
o Route Name: Office A
o Dial Patterns: Whatever you set normally
o Trunk Sequence for Matched Routes
 0 – FXO3
 1 – FXO2
 2 – FXO1
• Add Route
o Route Name: Office B
o Dial Patterns: match pattern = . and CallerID = 1010
o Trunk Sequence for Matched Routes:
 FXO4

That’s it