Need some help setting up 4 FXO's and 1 VoIP trunk

leemoreau

Joined
Jul 17, 2010
Messages
13
Likes
0
Points
0
#1
Hey everyone,

I'm setting up Elastix but need a bit of assistance. Right now I have it set up with just 1 VoIP provider while I want for my 4 port FXO card to arrive. What I'm looking to do is have 4 analog lines connected to the FXO ports, which are used for all incoming and outgoing calls, but I'd like to have my VoIP provider as line 5, in the super rare circumstance that all 4 analog lines are in use.

From my understanding, this would be an outgoing route. Am I correct first to assume that in trunk sequence, I would put the analog ZAP trunks there first and then the VoIP trunk at the bottom so that it uses the analog ones first? That's what it seems like it would be.

My question though (providing that is the correct way to do it), is how do I set it up with dial patterns? For example, right now with VoIP it's "9|XXXXXXXXXXX" (because we currently dial 9 to get out so I want the new system do to the same. There's 11 X's because even for local calls, my VoIP provider requires I dial 1 before it. So calling 416-123-1234 I have to dial 1-416-123-1234. The problem that I foresee is that with analog lines, for local calls dialing 1 first will play the message "This is a local call you do not need to dial 1 before" etc etc. It should really be up to the user if they dial 1 before or not.

So how would I set that up, so that it always uses my 4 analog FXO lines, requiring 9 first then dialing whatever the user physically dials, but then on the 5th call if it has to go over VoIP, have it append a 1 before local numbers? Or am I completely off the mark here? Thanks everyone!
 

dicko

Joined
Oct 24, 2008
Messages
4,099
Likes
0
Points
0
#2
Welcome leemoreau :

I suggest you download and read a couple of times "Elastix Without Tears" , any still unanswered questions will probably be answered at http://voip-info.org.

But basically don't confuse the outbound route "dial patterns" with the trunk "dial rules" and understand how dahdi lines ( e.g. ZAP/1, ZAP/2 etc. ) are grouped together into trunks ( e.g. G0/ or g0/ etc. )
 

leemoreau

Joined
Jul 17, 2010
Messages
13
Likes
0
Points
0
#3
Thanks. I have that book on my iPad been reading it a LOT! I just didn't see anything about using FXO and VoIP together. Maybe that's my issue that I'm getting dial patterns and trunk dial rules mixed up.

I think that's the issue. Dial patterns are what it captures from the users phones correct? Such as 9| would mean if a user dials 9 first on their phone it ignores it when passing it to the trunk. Then the trunk Dial Rules are the actual rules it uses when it sends the pattern to that physical trunk? Meaning the dial rules on the trunk is where I would set it up so that the VoIP trunk adds 1 to all calls except local ones and so on?
 

dicko

Joined
Oct 24, 2008
Messages
4,099
Likes
0
Points
0
#4
The "hover over" help in FreePBX is another source of documentation, it will answer your questions precisely.

A trunk rule like

1416|NXXNXXX
416|NXXNXXX

for example for analog lines in Toronto without "permissive" LD dialing.

and the corollary
1416+NXXNXXX
1+NXXNXXXXXX

for the voip trunks
 

leemoreau

Joined
Jul 17, 2010
Messages
13
Likes
0
Points
0
#5
That worked! Thanks so much, makes total sense now. I don't have the FXO card yet to test the analog lines but it's working for the VoIP lines now which is great. To answer the first part of my question, is that correct? Meaning on the outbound routes, would I just put trunk sequence with the analog line trunk first then the VoIP trunk at the bottom to have it only use the VoIP trunk if all 4 analog lines are in use?
 

dicko

Joined
Oct 24, 2008
Messages
4,099
Likes
0
Points
0
#6
yep

the trunk sequency would be

ZAP/G0
SIP/vsp

G0 is a "reverse hunt" and will reduce "glare" if you have "terminal hunting" on your 4 lines, you will have to add it to the trunks to use it. Or just plug the lines in backwards and use ZAP/g0
 

leemoreau

Joined
Jul 17, 2010
Messages
13
Likes
0
Points
0
#7
Thank you so much, I really appreciate all your help!
 

dicko

Joined
Oct 24, 2008
Messages
4,099
Likes
0
Points
0
#8
Looking at your other post, I see you have terminal hunting, watch out for that glare problem and remember that when all the ZAP lines are busy, the next call will get a busy or the Telco's Voicemail, maybe put the 1'st (or 4th) line into "group 1" so you roll into voip before inbound calls get busy.

You can have separate outbound routes so for example toll-free local and 911 calls go ZAP, more expensive calls , ( LD and International) should probably be routed to VOIP to save a buck.
 

leemoreau

Joined
Jul 17, 2010
Messages
13
Likes
0
Points
0
#9
Hey there,

I don't think it will be a huge issue because right now I really only have a total of 5 people in my office including myself that use the phone. At any given time, maybe 2 people are on the phone. If it's really busy then maybe 3 would be but we're not on the phone non stop. Right now I have a Hosted PBX I want to get rid of, we have 5 call paths with it. The reason I'm doing 4 lines is because of a few reasons. First is that there's a 6 pair line running into my suite, one pair is using DSL, the other is my fax line, so I'm going to add 4 new lines. That's why I thought if path 5 was VoIP that may help in the rare event that all 4 lines are in use, since at least that way if a 5th person wanted to make a call out they could. As for rules, we only call within North America and we get 2000 mins of LD free per month which is more than we need. If capacity gets to be an issue then I'll just buy another card and add one or two more FXO's to the system. I also am using just 4 since I bought a TDM410 card which has 4, so figured I'll try 4 before buying another card just for 1 more.

I'm just confused by your statement to put the 1st or 4th into group 1 so I can roll into VoIP if inbound gets busy. What do you mean by that? Maybe I'm way off here, but I'm assuming that the VoIP line can't be used as an inbound route, since customers would call my main analog phone line which would hunt to other analog lines and not the VoIP?
 

dicko

Joined
Oct 24, 2008
Messages
4,099
Likes
0
Points
0
#10
somewhere in /etc/asterisk/cahan_dahdi.conf or it's inclusions you will probably find something like
group=0
channel => 1-4

change it to



group=0
channel => 1-3
group=1
channel => 4

then

ZAP/G0 will just use ZAP/3 then ZAP/2 then ZAP/1
ZAP/g0 will just use ZAP/1 then ZAP/2 then ZAP/3

trunk sequence

ZAP/G0
SIP/vsp
ZAP/g1

will only get to line four if the network is down or you forget to pay your VSP bill.

If you get a DID from the VSP, you can have the Telco "forward busy" the hunt-group to that number also.
 

leemoreau

Joined
Jul 17, 2010
Messages
13
Likes
0
Points
0
#11
Hey there. K that made me really confused! I only want to use VoIP if all 4 analog lines are busy, otherwise I want to avoid it as much as possible...

When you wrote:

ZAP/G0 will just use ZAP/3 then ZAP/2 then ZAP/1
ZAP/g0 will just use ZAP/1 then ZAP/2 then ZAP/3

It confuses me, I don't understand the difference, or does capital G mean reverse and small g mean forward?

If that's what it means then I sort of get it, but just confused with the 4th line why it's put on a separate group and why I'd want to use it after VoIP?
 

dicko

Joined
Oct 24, 2008
Messages
4,099
Likes
0
Points
0
#12
Yes about the g and G if you use g then all too often outbound calls will collide with inbound calls, that is called glare and it is "not a good thing"

you might not want to use line 4 so that inbound callers don't get a busy signal when all your trunks are in use, reserve one line for that possibility or as I say arrange for call forward busy on the hunt-group to your voip provider supplied DID.
 

leemoreau

Joined
Jul 17, 2010
Messages
13
Likes
0
Points
0
#13
That makes sense thanks. Last question, can you tell me how I'd do it then if I wanted to use all 4 lines, but if I set up busy call forward so it goes to the VoIP line then? Like how would the settings change based on your example?
 

dicko

Joined
Oct 24, 2008
Messages
4,099
Likes
0
Points
0
#14
:) :)

No, I don't usually spoon-feed, you caught me while I was feeling less grumpy, you need to learn how it works yourself don't you agree?.

I think you have enough to get you going from now on though, when in doubt then RTFM again, (repeat the last step if you still don't understand the FM, it will eventually get through)
 

Members online

No members online now.

Latest posts

Forum statistics

Threads
30,902
Messages
130,887
Members
17,565
Latest member
omarmenichetti
Top