Outbound line selection

I just installed my 1st freepbx, use 4FXO, what is the proper config example to select which port to use.
Presently I test it with 2 analog lines but I don’t have control of selecting the lines
I use my MagicJack for international call so I need to be able to select from Grandstream GXP2120

Sorry for delay, below are readings for dahdi show channels

Chan Extension Context Language MOH Interpret Blocked State
pseudo default default In Service
1 from-pstn default In Service
2 from-pstn default In Service
3 from-pstn default In Service
4 from-pstn default In Service
also in Trunks cannot direct the channels it is to set maximum outdound channles


I don’t understand what you mean

The channel field is labeled “zap identifier” and contains the channel code.

As you can see from your asterisk command output you have channels 1-4 available to you. As I instructed replace the g0, the group containing all channels with the channel number IE: to make a trunk that only dials out on channel 2 replace ‘g0’ with ‘2’

If you mouse over any field in FreePBX you will be given instructions on what the field does and how to populate it.

I did it, thanks to you…
I dont know why I was allways entering in zap identifier as g1, g2 etc.
just simply enter numeric…


So far I wanted to associate a trunk to extention.
Is there a way?

Trunk 2 to extention 300, to be more specific.

What do you mean associate a trunk to an extension?

You want a specific extension to use an individual trunk for outbound?

In the future, always use the tool tips to see what the data is supposed to be for the field you are modifying, it would have made this a lot easier on both of us. I checked the tool tip and it clearly explains the g and channel number syntax.

Isnt it “Associate a trunk to an extention” is same as your refering “specific extension to use an individual trunk for outbound”?
as well I dont see any explanation anywhere regarding my problem, it is not clear at all.
I dont understand why you mention again g and channel number. setting trunks is allready fixed.
Now I want to “specific extension to use an individual trunk for outbound” if you prefer.

There is a field called channel in your trunk. You only have two channels working so your odds are 50/50 for getting in right the first time.

If you do a ‘dahdi show channels’ you can see the channel numbers for each port.

The ‘go’ placed in by default is for group 0, all channels by default in first available order.

I use putty.exe

what is the command!
or where or how I use it

Hi Again.
Sorry I couldn’t post my setting as setting always changing, trying to finding it
I believe have tested all available logical config, still not able to use example FXO2 for MJ.
I believe by default Asterix uses 1st the FXO1, if it is used than goes to FXO2 , 3, 4
Card I am using is detected as “Span # 1: WCTDM/4 “Wildcard S400P Prototype Board 5” (MASTER)” it is a 4 FXO’s, presently incoming and outgoing works fine
OK let me wording it differently, Is there any way of setting, example for outgoing calls extension 200 uses only FXO2
If so, what is the configurations and sequences.

‘dahdi show channels is an Asterisk command’ you access it from the Asterisk cli

‘asterisk -r’ from the command prompt

The field I am referring to is in the trunk page in your FreePBX web interface.

You need to show us what you did, what patters did you use in the outbound routes?

Hi .
Test it, still not working, Wondering what I do wrong…
Can you please explain steps starting from scratch?
Neither fined anything in you tube, all basic settings.
Thank you in advance.

Thanks, I have created new zap trunk and named MagicJack
Set all trunks 1 channel, Created 2nd route, renamed also MagicJack
than I don’t know the fallowing steps or how to set the Grandstream gxp2120 phone to select which trunk to call from, need steps to follow, or is there any backup files to import and test?
Many thanks.

You now need to create outbound routes, first route will send everything beginning with 011 to the magic jack and then your default route to the other trunk.

There elegant way to do this is to build two trunks, one with your local lines as members and another with just the magic jack channel.

Using outbound routes you can then set the International pattern (011) to direct out the Magic Jack trunk.