Is Asterisk capable of

I am new to Asterisk, only just recently have I heard about this awesome piece of open source goodness, so I don’t know all the ins and outs yet. My question is:

Is it possible to set up an Asterisk Box that will take an incoming call from an analog copper line play a custom greeting then forward that call back out through the same copper line (or a second copper line if thats not possible) to my cell phone?

If so, what is required to accomplish this?

Thanks in advanced!

~Andrew

This is perfectly possible with Asterisk. Infact I direct some incoming calls to my mobile using a GSM gateway rather than a PSTN line. To accomplish what you are after though you would need:

. 2 x PSTN lines (one for the incoming and one for the outgoing call)
. 1 x Digium TDM400P board with 2 x FXO interfaces (one for each PSTN line)

If you are not used to setting up Asterisk it might be better to go for Trixbox which will get you up and running quickly (unless you want to learn the basics of setting up dial plans from scratch).

Basically with Trixbox you could:

  1. Setup a Zaptel trunk for the two phone lines (called Zap/G0 or something similar).
  2. Setup an inbound rule to route calls coming in on a particular DID to route to your mobile.
  3. Setup an outbound route to force calls to mobiles (starting 07) out through the same Zap/G0 trunk.

In this way calls can come in and go out on either of the Zaptel lines (PSTN lines).

Thank you!

I have to admit I don’t fully understand everything you just told me, but I did get the answer to my question out of all that.

I take it a PSTN line = the copper analog phone line in my house.
The TDM400P = the interface between the phone lines and the Linux Box.
The FXO = are the RJ11 jacks? Not familiar with the Asterisk lingo yet.
as far as Trixbox… I thought that was a breakfast cereal for kids, not rabbits… that’s where you lost me.

Maybe, you can point me in the direction I need to go in order to do what I need. I guess it’s also worth mentioning that eventually I want to be able to fork an incoming pstn call to a physical handset on that line AND to my cell phone. Also, hold music sounds like something I would like to implement as well. Hopefully all this can be done on the same setup. Thanks for any help in advance!

~Andrew

Welcome!

PSTN = public switched telephone network, aka the normal phone system. PSTN line is your analog line

TDM400P is a Digium product. It is a 4-port modular card for connecting * to analog phones. It takes up to 4 modules, each module enables a port as FXO (red module, connects to phone line and lets * dial out) or FXS (green module, connects to analog phone(s) and they become an extension). A good way to remember FXO vs FXS is that FXS Serves the phone with power and dialtone. And yes these are RJ11 jacks, the difference is wether phone service goes TO them or comes FROM them.

LOL Trixbox isn’t edible, although i am sure some have tried…
Trixbox = Formerly known as Asterisk@Home, it’s a standalone Asterisk-based linux distribution. When installed on a machine it turns the machine into a full-featured *-based PBX very quickly. Also installs Asterisk Management Portal (AMP) now known (as I recall) as FreePBX, so you manage the thing via a web interface rather than command line and config files.

Now-

First, yes you can do all of these in the same box. As a general rule, Asterisk can take any call on any type of channel, do anything to it, and then spit it out again on any other type of channel. MusicOnHold is a part of Asterisk, just set it up and feed it some MP3s. You’d generally want to install asterisk-addons and set the MOH mode to be ‘files’.

Second, each analog line can only have ONE phone call. If you have some kind of call transfer service from your telco you might be able to make * use it with a bit of creative scripting but otherwise you need a second line, one to call in one to call out. Each line will require one FXO port.

Third- look into VoIP phone service. NOT VONAGE or packet8- these services are ‘locked’ so you must use the provider’s ATA (analog telephony adapter, the little adapter gadget they ship you). You need a provider that supports BYOD (bring your own device), a BYOD provider will (if you ask) just give you the SIP information. This can then be plugged into * and * will connect directly to the provider over the Internet. This is a preferable way to connect because you don’t need to buy hardware and also each VoIP account usually includes two channels, so you could do the call in call out thing. But it wouldn’t be needed, as most VoIP providers have a feature called simul-ring, so when you call the VoIP number it also sends the call to your cell phone for example. Whoever answers first (* or your cell) gets the call.

So the two ways of doing it-
VoIP provider with simulring- caller calls voip provider, voip provider calls * and cell. Whoever answers first gets it, but if the cell gets it * is not involved.
VoIP provider or two landlines with *- caller calls and hits *, which then calls your internal extensions and also out to your cell. whoever answers first gets it but the call goes through * either way.

As for if you want * or trixbox, that depends. If you just want to make it work fast, Trixbox or the newly released AsteriskNOW are your answer. If you want to learn about * you should NOT install those, as the ‘candy coated GUI’ prevents you from ever learning how the config files work (IMHO). Don’t get me wrong asterisk has a steep learning curve but once you get it you can do some amazing stuff.

Lastly think about your internal phones and how they will work. Things like musiconhold, or transferring between extensions only work if Asterisk HAS extensions to transfer between. Thus you will need at least one FXS port to connect your house phones to. If you put the * box near where the phone line comes into your place (or run extensions from that), plug the line into an FXO port and the extensions into an FXS port. Preferably plug each extension into its own FXS port, so they can be individually addressed. If you only have one port then people can ‘pick up on’ each other, whereas if you have each exten on its own port, then the 2nd person to pick up can dial out on line2 for example.

However i recommend IP phones for your internal extensions. They will be a bit more expensive usually but they are better IMHO because you get buttons like TRANSFER, CONFERENCE, HOLD etc instead of having to use hookflashes and star codes. For low end IP phones check out the Grandstream BT200 (not the BT1xx as they lack auto-hangup and intercom). For higher end, use SNOM or AAstra.

Hope that all helps!

Wow! Thanks for all the help! You went above and beyond to help me understand. I totally get it now.

I think I will probably go the psdn method. You see, I have a super easy phone number (***-321-1234)that I purchased some years back for my small DJ business, that I have been fowarding (which cost $) to a virtual receptionist service (angel.com which costs even more $) which then forwards the calls to my cell phone (which cost more $). I figure that if I setup my business phone number to an actual phone line and get an additional basic service line (10 bucks a month) from my telco and setup Trixbox or AsteriskNOW I can save myself buttloads of money each month and get some cool features (like MOH and forking calls) that I didn’t have before. Since it would always be a local call from my house to my cell phone it should only cost me about 20 bucks a month! I’m paying like a 100+ right now.

Let’s say I wanted to save even some more money and instead of getting an additional psdn line to forward the calls to my cell phone I just used my existing house phone line. Is there a way to make it so that if someone calls in while lets say my wife is on the house line, it will keep my customer on hold with music until she hangs up the house phone? If so that would be totally awesome!

Anyway, thanks a ton guys for all the help. What a great community * has!

If you have the bandwidth for VoIP you should consider it as a primary option.

Say you do, you can probably port your phone # to the VoIP provider. It becomes your phone number. Remember, VoIP service has two channels minimum (this is needed so 3way call works but its a nice bonus).

Thus, call comes into voip provider, processed by asterisk, and sent back out again on channel2 to the cell phone

also, having two channels if you are on the phone and someone calls your house, the call will go through and the 2nd channel will be set up. You can then have two convos going at once, or put one on hold and * will play them music on hold.

Also most voip providers let you have a ‘virtual number’, a second (or third or fourth) phone number which rings into your voip account. With some tweaking Asterisk can detect the ‘distinctive ring’ of the second VoIP number and treat them separately.

Well, I have thought about VoIP, but I’m not sure it would be cost effective and as stable, maybe I’m wrong.

With PSDN I’m looking at the cost of two standard phone lines (one for incoming calls and the second to forward the call to a local cell phone number) that’s about 20 bucks a month… give or take a few bucks. Plus I don’t have to worry about my internet going down and not being able to recieve any calls, which could suck because it’s my business and only source of income.

however…

VoIP does sound kinda cool and all. My DSL connection isn’t anything stellar. I get about 1100-1300 kbs down stream and 300-400 kbs upstream. Is that enough? You say I could probably use my local number that I already have? I wouldn’t want to change my number because it’s already in print ads in phone books, business cards, internet ads, etc. If I could somehow keep that same number and get VoIP for or around the same price (20-30 bucks) I might consider that option… granted my connection could handle it. What do you think?

VoIP is as stable as your provider and your Internet connection are. If you have a crappy provider and you use DSL running on lines that were installed in 1937, you won’t get very good quality. If you have good broadband and a reliable provider, it can be as good as a POTS line.

Your connection can handle VoIP, but you need to install some kind of QoS (quality of service) control on it. Many routers have this as a feature- give * top priority and you will be fine.

Most providers can port numbers, but not all providers can port all numbers. Try the ones I suggested above adn see if they can port you. I agree that changing your # is a crappy option.

I’d suggest a good way to get started would be to setup * with one or two cheap IP phones and make that work first. then get a FXO card and start replacing your phones with IP phones. Once you are getting really comfortable with it, then consider switching to VoIP…

I would not depend soley on VOIP for my business. It is a good addition to your pbx for flexibility and cost savings, but I still have a couple pstn lines.
It all depends how much you would cry if your voip provider goes bankrupt, you lose service to your business, and can’t port your phone number back.