Trunks, remote servers, and outbound Lines

frederic

Guru
Joined
May 18, 2008
Messages
58
Reaction score
4
Trunks and Queues and Oubound lines, oh my!

First, if I may, a brief history.

We have a trixbox CE (Asterisk 1.6.0.26-FONCORE-r78) in our main office, which eventually will become PIAF.

This server currently has 7 analog lines feeding an OpenVox A800P, and one analog extension feeding a fax machine. Ring groups, 4-digit extensions, IVR's, everything works reasonably well.

Due to expansion, we moved our help desk folks to a new office, and built a PIAF server (Asterisk1.8.8.0), and assigned them extensions 5001-5999 (only 24 are used at this point, but that's the range assigned for that office).

We created an IAX2 trunk between the two servers, edited the necessary outbound routes, and now one can dial any extension directly from either server. No problems.

We then "slammed" our help desk phone number from our analog line carrier to an IAX2 trunk provider, and feed that directly to the PIAF server. This too works great.

So at this point, our main number terminates across 7 analog lines to our Trixbox, and our help desk number terminates via IAX2 to the PIAF server, and calls can be forwarded back and forth between the two just fine by humans or by IVRs.

---

The first question is in regards to outbound calling across trunked asterisk servers:

What we haven't been able to figure out is how to allow the PIAF server for our service folks, grab and outside line on the Trixbox.

The reason why we want to do this is because our IAX2 "help desk line" has unlimited inbound, but charges by the minute for outbound. Our analog lines on the Trixbox, are unlimited use in both directions, and rarely has all seven lines been in use at the same time, so using these lines is desirable.

The second question is unrelated to the first: Is there a PIAF-specific tutorial or howto about how to set up call queues properly and how they work? I've read quite a few web pages on this and I'm still confused how they work, how help desk operators sign in and out of them, and what happens when all operators go home for the day. I'm happy to read, but I'd like to make sure I'm reading the "correct" stuff :)

Thank you in advance for advice, suggestions and comments.
 
As Igaetz says, changing the context=from-trunk to context=from-internal on your Trixbox will change the rules applied to the trunk. So instead of treating it like an incoming call and using inbound rules on the trunk. It will treat the incoming trunk calls as an internal call and use outbound rules on it which point to your outbound trunks.
 
Yes, I used "from-internal", like so:

Peer Details:
context=from-internal
host=
qualify=yes
secret=
type=friend
username=

User Details:
context=from-internal
host=
secret=
type=user

The above is defined on both servers, and they point to each other, and of course there are usernames/passwords as well, all of which I sanitized.

I think I have the trunk part correct, as it's in use right now. Dialing say, 5003 extension on either server from any phone on either server, rings extension 5003 that's connected to the PIAF server.

I'm just not sure how to set the outbound route on the PIAF server to crossover that same trunk to the analog lines on the trixbox server.

I think that's my question anyway :)
 
On the outbound route that you have set up for calling from box to box, add a "match line" that has 8|NXXNXXXXXX. That will send all calls that are prefixed with an 8 then dialed with an area code to the other box and will go out whatever pattern it matches on the other box.
 
Gotcha. So pattern matching on one box can send a call to the other box, to match patterns there and be processed.

Now I understand how it works, thank you.

I was thinking of things as destinations - ring group, extension, ivr, and thought anything routed from one box to another had to land on a destination.

Thank you!
 
Well, it works now!

At the main office, to dial an outside line one has to press 9 and the number, so there are dialplan rules defining that.

Setting up the same 9 and the number to route it from the satellite office to the main office via the IAX trunk worked, however the 9 was dropped and thus only the number passed to the main server, and that didn't match any dialplan rules so it failed.

With PIAF dial patterns, there's "prepend" and "prefix" fields that Trixbox didn't have, so I wasn't familiar with them.

A little reading and viola! I simply had to add a "9" in the prepend field and it worked.

Now I can dial a "9" and the number from either server, and the outbound call goes out the analog lines on the primary server regardless of origin.

Thanks for all your help!
 

Members online

Forum statistics

Threads
26,688
Messages
174,412
Members
20,257
Latest member
Dempan
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Back
Top