13

I have a desktop application of address diary, developed in C# .Net.

I want to make call from software throw land line phone service, in my office we have 8 phone lines, so i want to select line before call, i want to use headphone and mic in place of phone instrument.

how to connect phone lines to pc. i have more then 8 phone lines

is it possible ? if yes then how and which hardware i need for this.

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Haider Ali Wajihi
  • 2,756
  • 7
  • 51
  • 82

3 Answers3

15

Have you thought of the Skype API: http://developer.skype.com/public/skypekit or http://www.twilio.com

Get rid of the landlines and use a service. Much easier in my opinion. Then it would be far more scalable as well.

If you want to go down the telephony services path check out this library: https://github.com/markjulmar/atapi.net/

Hardware for landlines would just include 8 modems and selecting which one to use, before making a call.

I would assume that the atapi library contains functions to select the audio input and output. If not there are plenty of c# libraries for recording audio, in which you could pass the stream through to the library.

I wasn't going to point you down this direction but as per @Saif Khan comment you can use Asterix.

Using Asterix

Step 1 - Get a server install Asterix on it. http://www.asterisk.org. It's open source.

Step 2 - Get supported hardware e.g. http://www.asterisk.org/hardware

Step 3 - Communicate to it with http://sourceforge.net/projects/asterisk-dotnet/ (open source c# to asterisk library.

This maybe overkill for you, I don't know. I suppose I shouldn't assume :)

Adam
  • 16,089
  • 6
  • 66
  • 109
  • i need more re-search on this, but i want to use local phone lines so i need solutions about this. – Haider Ali Wajihi Mar 16 '12 at 08:23
  • What is more to research? Look at the functions in the atapi library. I am here to help but no one is going to delve much deeper into this unless they have experience with it already. Is there anything more you actually need to know? – Adam Mar 16 '12 at 08:51
  • i was talking about this atapi, i have to dig some more in it, and i have no experience about this. – Haider Ali Wajihi Mar 16 '12 at 08:59
  • View http://www.julmar.com/tapi/ It shows examples (mainly part of the c++ library so not the c# wrapper for it.) However it does show that the library can monitor, make and drop calls. Seems like a perfect fit. You will need to download and get stuck into it, or Google to see if there are examples. e.g. http://julmar.com/blog/mark/?p=101 – Adam Mar 16 '12 at 10:19
  • thnx, can you help me about how to connect phone lines to pc. – Haider Ali Wajihi Mar 16 '12 at 10:54
  • 1
    Buy a 56kbps modem e.g. http://www.amazon.com/s/ref=nb_sb_noss?url=search-alias%3Daps&field-keywords=56kbps+modem You can have USB or PCI (but if you wanted 8 I would say you need USB) – Adam Mar 16 '12 at 11:32
  • 2
    If the app is installed in individal pcs you will need modems for each. There are modems with 2-4 ports. You will run into problems though as you won't know when a line is in use...remember each port on a modem is tied to a line. It's better of if you look into IP telephony with a PBX library 3CX and Asterisk...or just use a service. – Saif Khan Mar 19 '12 at 06:08
  • I want to do the same think in java. Is it possible? Tell me if any API available in java for this. – Max Sep 23 '12 at 07:09
2

Since Google Voice is still free in United States and Canada. You can use this Google Voice API in C#.

http://sourceforge.net/projects/gvoicedotnet/

engaso
  • 469
  • 5
  • 4
2

Doesn't want to sound like a noob, but did you try out Windows Dialer? You will need x number of 56k dialup voice modem depending on the no. of connections you have and you want to use.

It should work just fine. Test it out, and if it works well, you can get your app synced with your existing software to export the number to the dialer upon calling. (There is no such functions on the dialer app yet.)

BenMorel
  • 34,448
  • 50
  • 182
  • 322
Kishor
  • 1,513
  • 2
  • 15
  • 25