PIAF and Mitel SX200 connection

KLGIT

New Member
Joined
Jan 13, 2009
Messages
69
Reaction score
0
I'm hoping there's someone out there who has some Mitel experience and can give me some pointers. Or if I'm really lucky someone has done something similar to what I need to do.

Here's the deal. I have been tasked with getting a VoIP gateway connected to our Mitel SX200 so we can route LD calls over our VoIP provider.

I should point out that right now, just replacing the Mitel system with <fill in the blank> is not an option. However I have chosen Asterisk to allow future growth to a fully IP based system.

Right now our Mitel system has a 6 port LS/GS card that is setup to route calls prefixed with an '8' to those ports.

Keep in mind this is an older SX200 not the newer IP model. We have no digital service here from the telco. The phones are all Mitel digital and all our lines are analogue.

What I was hoping to do was setup our PIAF server with an Astribank connected to the 6 ports on the LS/GS card in the Mitel.

I've been testing this using a Digium TDM400P that has one each FXO/FXS module. So far however I've had no luck getting them to talk.

Honestly, I'm not even sure if I need to connect the lines from the LS/GS port card to the FXO or the FXS port on the TDM400P. I think it should be an FXS port, but I'm not positive since I'm not sure if there's any standard for labelling these things. After all, a label could denote that a port is acting as an FXS (and therefore should plug into an FXO) or a label could mean that an FXS device should be plugged into it which means it's acting as an FXO. Arggh!

Are there any Mitel pros out there that can explain some of this?

I'm really hoping someone has already done this or something similar.

Thanks for any input anyone can provide.
 

jroper

Guru
Joined
Oct 20, 2007
Messages
3,832
Reaction score
71
Hi

Cannot help you with Mitel specifically, but if you have Analogue lines then this should not be too difficult depending on how many lines you have.

Effectively, the PiaF server with the cards in it sits between the Telephone lines from your Telecom supplier, and the Mitel plugs into your FXS cards.

So say you had 2 lines of analogue, in your Mitel, you would use two FXO (RED) modules and two FXS(Green) modules.

You plug the outside lines into PiaF, and the Mitel into the FXS (Green) ports.

Configure up a couple of standard ZAP extensions, which are the Mitel lines, and set up your outbound routes to divert calls where ever you need to send them.

Incoming come in via inbound routes, and you send them to the 2 Mitel Extensions.


If you are doing this with PRI, or BRI, then the same principles apply, e.g. you configure some ports to make on as if they were telephone lines.

Joe
 

KLGIT

New Member
Joined
Jan 13, 2009
Messages
69
Reaction score
0
That will be great for our next step in replacing the Mitel. Right now though we only need to route outgoing Long Distance calls to PIAF.
PIAF doesn't have to do much in the way of dial rules because the Mitel is catching the calls via the 8 dialing prefix and sending them to the ports on that specific LS/GS card. I just have to pickup those calls with the PIAF box and route them over VoIP.

This is where I'm stuck. As to how to set that up, and how to make sure the Mitel is setup properly.

Any thoughts?
 

jroper

Guru
Joined
Oct 20, 2007
Messages
3,832
Reaction score
71
OK, the solution outlined will not replace the Mitel, just automatically route with failover.

Again not knowing anything about the board or what it does, I cannot help you too much.

But, the rule is simple enough:-

If you normally plug phones into that board, then you need to connect your FXO (RED) ports into the board, and create trunks in FreePBX

If you normally plug PSTN lines into that board, then you would need to attach the FXS (Green) modules to it, and create extensions in FreePBX


Do not plug in and ring until you are sure, because if you get it wrong and you fire 80 volts of ringing voltage into an FXS module, you will fry it and let all the magic smoke out of it.

Joe

PS - I've drawn it on a piece of paper and I think I'm right, but if I've got it arse about face, someone please shout.
 

kenn10

Well-Known Member
Joined
Dec 16, 2007
Messages
3,789
Reaction score
2,202
PS - I've drawn it on a piece of paper and I think I'm right, but if I've got it arse about face, someone please shout.

As usual, Joe is dead on with his analysis.

I'll elaborate the solution a little more for you. If I understand correctly, the Mitel is expecting a trunk to come on with dial tone when the user on the Mitel dials "8" for a toll call. I'd take Asterisk extensions (Zap extensions created in Asterisk) from the Astribank and connect them to the trunk ports for "Dial-8" on the Mitel. That way when the Mitel users dials "8", they'll get a dial tone from the Asterisk. Your Mitel needs to have those "Dial-8" trunks set for Loop Start for this to work correctly.

It sounds like you want to use VOIP for your toll calls and you can easily set up routes in the Asterisk to do that. If you want to have some sort of failover should VOIP go down, you'd need to put a couple of analog trunks into your Asterisk (on the FXO ports of your TDM400 card), create a Zap trunk group, and add a second trunk group into your toll route on the Asterisk.

Its pretty straight forward.

1) Install PIAF on a server and get your TDM card recognized.
2) Install the Astribank and make sure it is alive and well with dial tone coming from its FXS ports.
3) Create extensions in FreePBX for the Astribank ports you plan to use.
4) Create your VOIP trunk group
5) Create your Zap analog trunk group for the failover lines (from your telephone company).
6) Create outbound routes to send the toll calls over the VOIP trunk group first and then the analog trunk group if the VOIP is down.
7) Connect the Astribank extensions to your Mitel toll trunk ports.
8) Make a test call from the Mitel while watching the Asterisk CLI to monitor what is happening.
9) Either enjoy having VOIP-enabled your Mitel or make program corrections to the PIAF system as required.

Good luck!
 

drvcrash

Member
Joined
Nov 20, 2007
Messages
108
Reaction score
0
KLGIT Im getting ready to do something similar. Except I want to keep the old mitel for part of the hotel and use piaf for the rest of the building. Keep us updated on your progress.
 

KLGIT

New Member
Joined
Jan 13, 2009
Messages
69
Reaction score
0
I've been thinking about this...maybe I'm going about it the wrong way.

Instead of forcing myself to use the setup that's here, what's the best and or easiest way to set this up?

So, here's my NEW question.

What's the best way, (hardware and configuration wise) to make our Mitel SX200 talk to Asterisk given the following?

- We don't want to replace the Mitel (yet) and we want to keep the existing system and phones.

- We don't want to disrupt users or make drastic changes in procedure to make calls.

- For now, we only want to have long distance calls go out through Asterisk and VoIP when users dial 8 then number on their Mitel phones.

What I'm now wondering is if there isn't a better way to make the Mitel Talk to the Asterisk (PIAF) system?

Like for example via PRI or T1/E1 cards? Or is anyone aware of an IP card?

What configuration would you use to do this?

Thanks
 

jroper

Guru
Joined
Oct 20, 2007
Messages
3,832
Reaction score
71
Effectively, the PiaF server with the cards in it sits between the Telephone lines from your Telecom supplier, and the Mitel plugs into your FXS cards.

Hi

This was my first recomendation. this will be completely invisible and seemles to the user - they don't do anything different, you just set up routing plans with failover to PSTN as required.

I also think it is the simplest approach.

Replace the words FXO/FXS with T1.

Joe
 

KLGIT

New Member
Joined
Jan 13, 2009
Messages
69
Reaction score
0
Communication breakdown. ;')

OK, so I see why there was confusion here.

What I want is to only have Asterisk grab the LD calls. Not ALL PSTN calls. So, the Mitel will normally route all calls to the PSTN, unless you press 8 first, then the calls will route to the 6 line pool connected to the Astribank(or whatever).

What I still want to know is if there's a better way to make the link from the Mitel to Asterisk than the LS/GS Astribank combo.

See Picture:

9u2hd3.png
 

wolfeman

New Member
Joined
Jan 16, 2008
Messages
25
Reaction score
0
This is what I did

In the Mitel I created a Class of Service so that if 8 was the prefix it was routed through the t1 card in the mitel that is connected to the Asterisk Server.

-Scott
 

jroper

Guru
Joined
Oct 20, 2007
Messages
3,832
Reaction score
71
Last edited by a moderator:

KLGIT

New Member
Joined
Jan 13, 2009
Messages
69
Reaction score
0
I think I've decided...

Well, I'm thinking I'll be brave and go with the PIAF box sitting in the middle between the Mitel and the PSTN.

However, I'll have jacks put in for each line so I can bypass the PIAF directly to the Mitel if necessary with regular old phone cords.

That said, I want to ask for input on the programming of that setup.

What I want to do is this.

For each PSTN line, 1..n I want to...
  • Pass all incoming calls directly to the Mitel.
  • filter all outgoing calls and
    • Send all local (eg 7 digit) number straight through to the PSTN.
    • Send long distance calls through VoIP provider A with Provider B and PSTN as failover in that order.
    • Send toll free calls through PSTN.
  • Keep PSTN order. ie calls to FXO 1 go to FXS 1 so that telco rollover programming etc. remain constant.
Any input or URLs with help or examples to help me get this right the first time would be appreciated.

Thanks.
 

jroper

Guru
Joined
Oct 20, 2007
Messages
3,832
Reaction score
71
Hi

It may be easier to consider the Mitel simply as an extension on the PBX.

So assuming your cards are in group 0 (g0) create a custom extension that says something like zap/g0, then point your inbound route to that extension.

Outbound, calls turn up at that same extension, then it should be a case of setting your outbound routes to go out in the order you desire, to the destination you want.

Joe
 

foneman

Guru
Joined
Oct 24, 2007
Messages
297
Reaction score
1
Old School

You can always go old school telecom and put rj31 style biscuits to allow for quick change in case of errors. Unplugged, the biscuits route the pstn to the PIAF and then out FXS to the mitel. If failure occurs, unplug mitel from FXS and into RJ31 that breaks the connection and send dialtone to the mitel. No programming, muss or fuss. I did this with 14 Dominoes locations that use an old style IVR in front of a key system. That way, if the IVR fails (Which they do frequently which is another issue...) anyone can unplug and plug getting back to business in seconds. Just a thought.
 

KLGIT

New Member
Joined
Jan 13, 2009
Messages
69
Reaction score
0
Great idea

This sounds like what I had in mind.
Though I didn't know about RJ31 jacks. I was going to use pairs of RJ11 jacks with 'patch cables' between the astribank and the Mitel and telco.
Could the RJ31 be wired to do what I want to do?

That is to automatically insert or remove the astribank between the PSTN and the Mitel when plugged into it?

I'm just not sure how this would work since the incoming and outgoing calls would have to pass on the same PSTN lines. (for local calls).

Also, what is the difference between RJ31 and RJ38 as far as this conversation goes?

Sorry for all the questions. I've been an IT 'pro' for years, but jumping into telco stuff has made me feel like a newbie for the first time in years. It's strange.
 

KLGIT

New Member
Joined
Jan 13, 2009
Messages
69
Reaction score
0
RJ31X looks like a great idea.

My only concern is if the RJ31X jacks are reliable. Guess I'll find out.

I've been Googling and reading like mad since the last post. It looks like using RJ31X jacks to intercept our outside lines and insert our * box is the ideal solution for us. Then if there's ever a problem with the * box, or some other need for downtime, we can just unplug and no one will no the difference.

Awesome.

I just need to get the wiring mapped out on paper so I can visualize it, and find a source for the Elk jacks here in Canada (anyone?).

Thanks again for all the help.

Now I just need to figure out the programming for certain on the PIAF box and I'll be good to go.
 

KLGIT

New Member
Joined
Jan 13, 2009
Messages
69
Reaction score
0
Programming examples?

Can anyone point me to some dialplan programming examples that might get me started?

I basically plan to, for now, pass all incoming calls on the PSTN lines straight through to the lines on the PBX.
Basically I want to treat the PSTN and PBX lines as a pool.

I then need to do the same on outgoing lines, except that I need to filter for long distance and pass those out our VoIP provider. Then pass the non long distance calls out the PSTN lines, again treated as a pool. I've decided I don't need to map them 1-1 line for line as it doesn't really matter.

Any tips or similar examples appreciated.

Thanks
 

Bart

Active Member
Joined
Nov 14, 2007
Messages
447
Reaction score
25
We do this now except towards a Dialogic Card. It's easy to do but hard to explain. But basically you put the inbound and outbound ports in to its own context in zaptel-channels (and assign a group number) and setup a context in extension-custom to bridge these calls to outbound context.

Bart
 

KLGIT

New Member
Joined
Jan 13, 2009
Messages
69
Reaction score
0
Progress and new scary thoughts

I've made some progress on this, thought I should update. Plus a new potential problem occurred to me which I want to ask about.

First, progress report.

I have the test box up and running fully. Using the single channel (1 FXO / 1FXS) TDM400P. I got it hooked up with a handset posing as my PBX, and it's connected to a spare POTS line for the PSTN.
I've created dialing rules that take all local calls and pass them out to the PSTN. Long distance gets routed through our primary VoIP provider with a secondary provider for backup and finally rolling over to the Zap port and out PSTN if all else fails.
I also created an IAX2 extension on my laptop using Zoiper so that I can have more than one inside line.
I made a ring group that includes the POTS handset on the TDM400P and the Softphone. All incoming calls are routed to that ring group using the 'firstnotonphone' Ring Strategy. I hope that this will replicate the behaviour of the normal incoming hunt group. It seems to work fine on the test setup.
Is there a better/preferred way to do this?

Finally, it occurred to me that I have no idea how DID's work and what will happen with this setup.
Do DID line's normally come in on different PSTN lines?
How does the PSTN tell your PBX what DID it is supposed to be?
For example, if you have a block of 50 DID extensions (eg 555-9001 -> 555-9051) and only 10 real PSTN lines, how does the telco tell your PBX where to route the call?
There must be some kind of signaling right?
Will my setup work as is?
Will Asterisk pass through this signaling?

Any info or URL's that explain this would be greatly appreciated.

Thanks.
 

jroper

Guru
Joined
Oct 20, 2007
Messages
3,832
Reaction score
71
Hi

How does the PSTN tell your PBX what DID it is supposed to be?
For example, if you have a block of 50 DID extensions (eg 555-9001 -> 555-9051) and only 10 real PSTN lines, how does the telco tell your PBX where to route the call?
There must be some kind of signaling right?

On digital lines the DID is passed within the signalling. Just make sure you don't mess with it on the way through the asterisk box. It should do this pretty much seamlessly. We do very similar with A2Billing, not also the CID you get delivered on a follow me call, usually the CID of the caller if your carrier allows CID manipulation.

On Analogue lines, you set the DID using Zap Channel DID in FreePBX.

Yours

Joe
 

Members online

No members online now.

Forum statistics

Threads
25,825
Messages
167,849
Members
19,250
Latest member
mark-curtis
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.
Top