Integrating with POTS line

Hi folks

My Asterisk project died a horrible death some time back, but I reckon it’s about time to resurrect it. Here’s the skinny:

It will run on a dedicated Ubuntu Server.
I already have a SIP trunk set up (in fact I have two), although they’ve been idle for a while now.
I’m OK with setting up the basics of an Asterisk-based SIP service, incoming trunk routed to internal SIP hard phone, etc.

One of the primary things I’d like to do is tie everything together with my BT service, so that I can transfer calls between the two. This will let me answer the incoming call (which will have to route into Ast first) at my desk and then transfer it to whichever teenager it was intended for. Or have a prompted system asking who the caller wants to talk to and route accordingly. Best of all, be able to send an incoming telemarketing call to an endless “please be patient, your call will be answered” loop.

In order to do this, I obviously need to connect my POTS line to the Asterisk server somehow. Will the LinkSys PAP2T or something similar do the job? I’d like a device with two ports ideally, as I’ll then route my spare SIP trunk to the second line, wired straight into my fax machine.

Any advice much appreciated!

Two lines to the telco? For that, you’re after two FXO interfaces.

Two lines to the telco and one directly to a fax machine? For that, you’re after two FXO and one FXS interface.

I can’t speak directly to that Linksys device, sorry, but plenty of people do use such equipment with Asterisk as a SIP device.

Cheers.

Any advice on what FXO adapter should be used or are they all as good as each other?


telephone systems for small business

I’d suggest Digium products. :wink:

Disclosure - I work for Digium. :smile:

[quote=“malcolmd”]Two lines to the telco? For that, you’re after two FXO interfaces.

Two lines to the telco and one directly to a fax machine? For that, you’re after two FXO and one FXS interface.[/quote]
Not quite. I have two SIP accounts, one of which I’ve earmarked as a fax number.

Let’s deal with the fax scenario first: a fax is sent to my number, which is a Sipgate account serviced by my Asterisk box. I want Asterisk to pass the call on to the hardware fax machine. Asterisk won’t need to be clever about it, any call to that number can just be blindly passed on. But of course the fax machine expects to be connected to a POTS line, so I need to put something between it and Asterisk.

Now to the BT service integration: I have a number of SIP handsets, both wired and wireless, and it would be great to be able to use them as an in-home PBX (and to be able to play games with telemarketers :wink: ). But the incoming line is a POTS one, and so needs a gadget between it and Asterisk to make it SIP-able.

I hope that’s clear enough. I’m at your mercy here! Would really like to get this project going, but can’t afford to buy the wrong kit.

Howdy,

Okay. You’ll need an FXS interface to drive the fax machine.

You’ll need an FXO interface to terminate the POTS line coming into your place from BT.

A side note:

Beware that faxing over the Internet can be a tricky business. T.38 mitigates this greatly, so if your provider supports it, that’s a good thing. The trouble though is that Asterisk does not operate as a T.38 gateway - so you can’t receive a T.38 fax from your SIP provider and relay it straight out to the FXS port to an attached fax machine. Instead, you’d have to receive it first into a TIFF file stored on the Asterisk server, and then create a separate call after the fact out to your fax machine. That’s going to give you the most reliability presently.

The alternative is to disable fax detection on Asterisk’s SIP channel driver and relay the fax, if your provider’s sending it inband, out the FXS port to the fax machine. If you’re lucky and you’ve got a low (zero) jitter, low (no) packet loss line with low latency, things will generally work (maybe). Fax is extremely sensitive to all of those things, so in general, inband faxing over the Internet isn’t pleasurable.

(mostly posting this to clarify my own thoughts)

I need two Asterisk<->POTS connections:

  • One to connect to the outside BT-provided line
  • One to plug the fax machine into.

Whether these are the same sort of connection or not, I don’t know. I’ve read up 3cx.com/PBX/FXS-FXO.html and still don’t understand. But it’s been a long week.

Correct.

FXS and FXO are the only two analog interface types, and they’re always connected to each other. FXS always connects to FXO. FXO always connects to FXS. FXS never connects to FXS (you’ll blow up an interface that way). FXO never connects to FXO.

When an analog telephone set rings, something’s providing the voltage to ring it. When you pick up that handset, you hear a bit of something on the line - that’s called battery. What’s providing that ring voltage and battery is an FXS interface at BT’s site, facing you. That makes your telephone set an FXO device.

So, if you want to drive a fax machine inside your office, just like BT would drive a fax machine if you connected it directly to the BT network, you’ll need an FXS interface to drive it. The fax machine is an FXO device.

Likewise, if you want Asterisk to act like a telephone set, connected to the FXS interfaces that BT has, you’ll need an FXO interface.

Does that help?

[quote=“malcolmd”]Howdy,

Okay. You’ll need an FXS interface to drive the fax machine.

You’ll need an FXO interface to terminate the POTS line coming into your place from BT.

A side note:

Beware that faxing over the Internet can be a tricky business. T.38 mitigates this greatly, so if your provider supports it, that’s a good thing. The trouble though is that Asterisk does not operate as a T.38 gateway - so you can’t receive a T.38 fax from your SIP provider and relay it straight out to the FXS port to an attached fax machine. Instead, you’d have to receive it first into a TIFF file stored on the Asterisk server, and then create a separate call after the fact out to your fax machine. That’s going to give you the most reliability presently.

The alternative is to disable fax detection on Asterisk’s SIP channel driver and relay the fax, if your provider’s sending it inband, out the FXS port to the fax machine. If you’re lucky and you’ve got a low (zero) jitter, low (no) packet loss line with low latency, things will generally work (maybe). Fax is extremely sensitive to all of those things, so in general, inband faxing over the Internet isn’t pleasurable.[/quote]
OK, at least I know where I stand now, thanks!

I had previously worked with FFA to receive incoming faxes, and eventually got it working, but it was a bit of a nightmare, so this time around I thought “hang on, I’ve already got fax hardware here, why not use that?”. And now you’ve answered that question :wink: . I guess I’ll wrestle with FFA again!

As far as the FXO requirements go, I’ve just ordered a SPA-3000. Now I guess I should dust off one of my servers and start setting the darn thing up.

[quote=“malcolmd”]So, if you want to drive a fax machine inside your office, just like BT would drive a fax machine if you connected it directly to the BT network, you’ll need an FXS interface to drive it. The fax machine is an FXO device.

Likewise, if you want Asterisk to act like a telephone set, connected to the FXS interfaces that BT has, you’ll need an FXO interface.

Does that help?[/quote]
Yes! Thanks for explaining that in language even a thicko like me can get a handle on.

…and I’ll probably be back in a few days when the hardware arrives to ask “duhhhhh what do I connect where?”

Best of luck :smile:

a quick bit of advice, if I may?

Will shortly start setting up the target server. Recommendations?

I’d prefer one of the LTS releases of Ubuntu but I’m flexible about distro if there’s a good enough reason. Planning on server-only installation on a box that’ll be headless, so no desktop.

Which version/flavour/colour of Asterisk should I go for? Keep in mind that I’ll want to add FFA in short order, and it can be a little fussy.

With respect to long-term support, the 1.8 version of Asterisk will maintain support for the next 4 years. Everything else is nearing the end of its life.

Cheers.

Understood. I’ve gone for 1.8, on a fresh install of 32-bit Ubuntu Server 10, the LTS version. Hopefully FFA will be happy with that?

Yes.

Cheers.