Hi everybody. I want to write a voip program with visual c++ for my final year project. Idon't know how to start. My c++ knowledge is also limited. Can you help me about the algorithm? Should I make a socket programming (server-client application) ? Or is voip program algorithm different from socket programming?
Yes i will study in these subjects. But I will use this program in a LAN. I want to connect two computers. How can I do that? Should I write two codes ( one server- one client)? How can I make the connection for a LAN, are cable and hub enough? Can I use my program with gateways and telephones? Infact I want to connect my pc and a telephone with a gateway and that gateway will be connected to a hub the same system will be connected to hub from another input. Is that possible? Some people say " you can't use your custom voip program with commercial gateways"
If you want to use your own protocol to be able to send VOIP data, then you will not be able to communicate with 3rd party devices such as SIP phones. If you just want to implement the SIP protocol, then you will be able to communicate to other phones. SIP involves the use of a registrar as a central server where all devices register. If you want to make a call to a certain device, you send an INVITE to the registrar and it will forward this message to the remote party (maybe involving other servers in between.
That's a starting point for SIP. I think you should re-think your plans, make sure what you want to achieve and then try to find out a solution. But be aware that the implementation requires a sound knowledge of C++.
Thank you for your advices. But at the moment I am just making a feasibility study. I want to learn what I can do. And from your words I understand that I can send voip data between two computers which have the program I will write. I just wanted to learn about the phone if I can use that, it is not a necessity.
And one more question; can I use one computer as both client and server? Another computer as client will be used to communicate with this computer.
If you implement a protocol on your own, then only PC using your application can communicate. If that is ok for you, just do it ;-)
Depending on the architecture of your app, you can use multiple instances on one PC and let them communicate. But you would possible run into troubles sharing mike and speaker between them.
A simple approach would be to pass the IP address and port of the partner to the application and let them send their voip data to it. Using RTP (based on UDP) does not require a "server" as such, but both applications must be ready to receive data immediately. You also need to make sure you use the correct codec (if you want to support more than one). G.711 A-law or u-law would be the simplest approach, I assume.