I live in France and the ISP I've subscribed to provides a regular phone line along with my Internet connection. Here's a simple schema of my setup:


Since I don't use this phone line I would like to switch the regular phone with a computer (preferably running Linux) where I could receive/handle calls programatically. For example, execute a shell script if I press 2, that kind of thing.

How can I receive phone calls on a Linux server and script stuff depending on the numbers pressed?

  • 1
    Off-hand, I must say this is a cool idea but you'd have to be really careful about how you do it. Be thinking about security from the get-go. – Iszi Jul 20 '12 at 17:23

Asterisk is free and a simple FXO/FXS adapter with 1 port like you need won't cost $400. Try looking for linksys SPA3102 for example and an example config. You don't need to buy expensive multi-ports internal cards.

Why don't you go SIP and need no adaptor, only the internet conection your BOX delivers?

With Sip, you will receive the call for free if you have an online number. You can open a pre-paid account so if you only receive calls, you won't pay anything for the calls and you will use your credits only if you place calls. A lot of providers have this option. As an example, I use callcentric not free for online numbers but a few providers have this option free (I used voxalot for a long time before but it is closed now).

The caller may have to pay for a regular phone call. you can use sip services like sipbroker to be reachable from multiple sip providers for free for the caller if he uses one of the associated sip providers and paying only for a local regular calls on most big cities around the world for free. There are many sip providers that can supply you with a phone number almost where you want (most for a fee) so the callers pay only for local calls (similar to skype online numbers).

  • That looks good but it's too expensive, thanks anyway. – knarf Jul 25 '12 at 7:29
  • Can I be reachable from a regular phone and for free with SIP? I'm doing this as a hobby and I just don't want to pay for another services. – knarf Jul 25 '12 at 8:12
  • Updated the answer – laurent Jul 26 '12 at 21:10

You might try running Asterisk, which is:

Asterisk is an open source framework for building communications applications. Asterisk turns an ordinary computer into a communications server. Asterisk powers IP PBX systems, VoIP gateways, conference servers and more. It is used by small businesses, large businesses, call centers, carriers and governments worldwide. Asterisk is free and open source.

Beginning Asterisk documentation can be found here. Wikipedia entry is here.



As mentioned, it uses Asterisk, but makes it pretty easy.

There site has a large variety of tutorials, step by step instructions, and you can be up and running very inexpensively.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.