Board index » cppbuilder » VoIP implementation

VoIP implementation


2008-06-30 09:35:54 AM
cppbuilder89
Alright... So, I've been reading a book for VoIP and have been wondering
whether or not I should even bother trying to implement a feature like this
into a program of mine... I was wondering if anyone on here would be willing
to work with me to help with creating some sample code so I can understand
the process in this language... I am decently experienced with Codegear RAD
Studio (C++) and write applications on a daily basis... My understandings
are that this isnt an easy task, but im tired of hearing that and I want to
learn this so that I can implement this type of feature into a multitude of
different applications. If you have any ideas as to where I could get
started or have some spare time to write some sample coding, I would
absolutely appreciate it! I have posted on several different forums over the
past year and no one has helped at all.. Thank you again for your time!
Also, if you have any questions, please ask!
 
 

Re:VoIP implementation

EDIT: I need to implement transmission of voice packets using ip packets,
not VoIP because that involves alot of different things... I dont really
care about encyption either. Just want to make something where I can talk
back and forth, possibly p2p...
"Carl Danley" < XXXX@XXXXX.COM >wrote in message
Quote
Alright... So, I've been reading a book for VoIP and have been wondering
whether or not I should even bother trying to implement a feature like
this into a program of mine... I was wondering if anyone on here would be
willing to work with me to help with creating some sample code so I can
understand the process in this language... I am decently experienced with
Codegear RAD Studio (C++) and write applications on a daily basis... My
understandings are that this isnt an easy task, but im tired of hearing
that and I want to learn this so that I can implement this type of feature
into a multitude of different applications. If you have any ideas as to
where I could get started or have some spare time to write some sample
coding, I would absolutely appreciate it! I have posted on several
different forums over the past year and no one has helped at all.. Thank
you again for your time!

Also, if you have any questions, please ask!
 

Re:VoIP implementation

Carl Danley wrote:
Quote
EDIT: I need to implement transmission of voice packets using ip
packets, not VoIP because that involves alot of different things... I
dont really care about encyption either. Just want to make something
where I can talk back and forth, possibly p2p...


"Carl Danley" < XXXX@XXXXX.COM >wrote in message
news: XXXX@XXXXX.COM ...
>Alright... So, I've been reading a book for VoIP and have been
>wondering whether or not I should even bother trying to implement a
Hi,
A couple of years ago, I have worked on a project on a project involving
the transmission of voice over a network (not related to VoIP as is).
After a lot of experimentation, I started building a system with a Linux
server backend (pretty much functionnal) and a C++Builder Windows
client. Eventually (after several months of spare time) I had to suspend
the project because I was stuck on an almost complete system but without
the knowledge to make it really usable. At the best time, I was able to
send voice over the system, but the receiver would only get all cut
piece of voice in a non continous basis. At that moment, I started
looking for a partner, but coudn't find anyone interested. The system
was called Aleck and did have a website. I still have all of the source
code archived in the hope of someday resurect the project.
Let me know if you would like to discuss with me. We could exchange msn
address if you like.
Sorry for my written English. Not only it is not my native language, but
I'm very tired right now. I usually have better written English :p
Tom :)
 

{smallsort}

Re:VoIP implementation

Carl Danley wrote:
Quote
Alright... So, I've been reading a book for VoIP and have been wondering
whether or not I should even bother trying to implement a feature like
this into a program of mine... I was wondering if anyone on here would
be willing to work with me to help with creating some sample code so I
can understand the process in this language... I am decently experienced
with Codegear RAD Studio (C++) and write applications on a daily
basis... My understandings are that this isnt an easy task, but im tired
of hearing that and I want to learn this so that I can implement this
type of feature into a multitude of different applications. If you have
any ideas as to where I could get started or have some spare time to
write some sample coding, I would absolutely appreciate it! I have
posted on several different forums over the past year and no one has
helped at all.. Thank you again for your time!

Also, if you have any questions, please ask!
(read the other post first)
Oh, and for the VoIP... Well you will never hear "forget it" from me,
but let's say I had a peak at it a some moment and found that the whole
protocol was very complicated, and looked messy to me. After some
research, I decided never to make any experimentation regarding that,
although I was very interested.
As for compression/encryption, I'm not even remotely close to something
that you would call an expert, but I have bases for having experimenting
a lot around that when I was wrong. Let's just say that part of my
enthusiasm went away when I received a letter from a lawyer requesting
that I stop distributing my implementation of the LZ78 algorithm, which
was, to the best of my judgment, a poor non optimized only good for
educational purpose implementation.
Tom :)
 

Re:VoIP implementation

Actually, this sounds very interesting... My only thing is this: As I dont
have the greatest experience with the whole process for sending voice
packets over the internet, i would have to catch up on what you already
know. I would be happy to work with someone on implementing this feature
into a program. I'm not sure what I could help with but I'd love to help. In
reference to receiving the voice packets all cut and choppy, out of order, I
believe we would have to implement something to put them back into order...
Sounds obvious, but this would imply some way to send a packet with the
ordering so that when all of the voice packets have been received, the
receiver can put them back into place... Anyways, I would love to work with
you on this project, if I am capable, so that we may both further our
understanding of the transmission of voice packets. I dont have MSN
Messenger, but I can go get one if needed.
Carl :)
"Tom420" < XXXX@XXXXX.COM >wrote in message
Quote
Carl Danley wrote:
>EDIT: I need to implement transmission of voice packets using ip packets,
>not VoIP because that involves alot of different things... I dont really
>care about encyption either. Just want to make something where I can talk
>back and forth, possibly p2p...
>
>
>"Carl Danley" < XXXX@XXXXX.COM >wrote in message
>news: XXXX@XXXXX.COM ...
>>Alright... So, I've been reading a book for VoIP and have been wondering
>>whether or not I should even bother trying to implement a


Hi,

A couple of years ago, I have worked on a project on a project involving
the transmission of voice over a network (not related to VoIP as is).
After a lot of experimentation, I started building a system with a Linux
server backend (pretty much functionnal) and a C++Builder Windows client.
Eventually (after several months of spare time) I had to suspend the
project because I was stuck on an almost complete system but without the
knowledge to make it really usable. At the best time, I was able to send
voice over the system, but the receiver would only get all cut piece of
voice in a non continous basis. At that moment, I started looking for a
partner, but coudn't find anyone interested. The system was called Aleck
and did have a website. I still have all of the source code archived in
the hope of someday resurect the project.

Let me know if you would like to discuss with me. We could exchange msn
address if you like.

Sorry for my written English. Not only it is not my native language, but
I'm very tired right now. I usually have better written English :p

Tom :)
 

Re:VoIP implementation

Carl Danley wrote:
Quote
Actually, this sounds very interesting... My only thing is this: As I dont
have the greatest experience with the whole process for sending voice
packets over the internet, i would have to catch up on what you already
know. I would be happy to work with someone on implementing this feature
into a program. I'm not sure what I could help with but I'd love to help.
In reference to receiving the voice packets all cut and choppy, out of
order, I believe we would have to implement something to put them back
into order... Sounds obvious, but this would imply some way to send a
packet with the ordering so that when all of the voice packets have been
received, the receiver can put them back into place... Anyways, I would
love to work with you on this project, if I am capable, so that we may
both further our understanding of the transmission of voice packets. I
dont have MSN Messenger, but I can go get one if needed.
If you use the TCP/IP packet protocol, the packets are guaranteed to arrive
in order.
HTH
Jon
 

Re:VoIP implementation

So, in theory I could open up a file stream, record to it, and send it over
the TCP/IP socket? The receiving end would just grab the file and store it
somewhere to play?
"Jonathan Benedicto" < XXXX@XXXXX.COM >wrote in message
Quote
If you use the TCP/IP packet protocol, the packets are guaranteed to
arrive in order.
 

Re:VoIP implementation

Carl Danley wrote:
Quote
So, in theory I could open up a file stream, record to it, and send it
over the TCP/IP socket? The receiving end would just grab the file and
store it somewhere to play?
Correct, though probably would give performance issues. Voip requires very
low latency, so ideally you'd want to be sending lots of small packets.
Jon
 

Re:VoIP implementation

Is there a way to declare how big the packets are before they are sent?
Also, I can code the majority of this, but the only thing i dont know how to
do is send the file over the socket and open a stream to be recorded to...
Any Ideas? Here is some coding that I would use for everything else:
//<-------BEGIN
TClientSocket * TCP = new TClientSocket();
//-----------------------------------------------------
TCP->Host = "something.com";
TCP->Port = 3980;
try
{
TCP->Active = true;
}
catch(...)
{
ShowMessage("Could not connect to server!");
};
//now i would need to insert the process to open a stream and start
recording
//during the recording process, I would need to send a packet of XX size to
the server component
//<-------END
I know that might be alot of potential coding, but I sure could use the
help. Would it be possible to use the TMediaPlayer component to record to a
stream and then send? or would I use an MCI Media Player?
"Jonathan Benedicto" < XXXX@XXXXX.COM >wrote in message
Quote
Correct, though probably would give performance issues. Voip requires very
low latency, so ideally you'd want to be sending lots of small packets.
 

Re:VoIP implementation

Carl Danley wrote:
Quote
Is there a way to declare how big the packets are before they are sent?
Not really, because to limit the size of each packet you send, just send a
few (<1000) bytes at a time.
Quote
Also, I can code the majority of this, but the only thing i dont know how
to do is send the file over the socket and open a stream to be recorded
to... Any Ideas? Here is some coding that I would use for everything else:
You won't be sending a file, you'll most likely want to send a compressed
audio stream as fast as it comes from the sound card.
Quote
I know that might be alot of potential coding, but I sure could use the
help. Would it be possible to use the TMediaPlayer component to record to
a stream and then send? or would I use an MCI Media Player?
You'll probably want to use the waveIn API functions, or possibly DirectShow
or a 3rd party component to get the audio stream.
Jon
 

Re:VoIP implementation

Would you happen to know where I could find some samples for these
functions? like a how-to or something, just need something to look at and
understand
"Jonathan Benedicto" < XXXX@XXXXX.COM >wrote in message
Quote
You'll probably want to use the waveIn API functions, or possibly
DirectShow or a 3rd party component to get the audio stream.
 

Re:VoIP implementation

Carl Danley wrote:
Quote
Would you happen to know where I could find some samples for these
functions? like a how-to or something, just need something to look at and
understand
No examples, but the help starts here.
(Mobile and CE docs, but should be ok for regular?)
msdn.microsoft.com/en-us/library/aa909799.aspx
Looks like
waveInOpen()
waveInPrepareHeader()
waveInAddBuffer();
waveInStart();
You can pass a callback function to waveInOpen that
is to process the buffers when they fill. It would
also make new buffers (recycled) available to be filled.
waveInPrepareHeader() sets the buffer size.
I would assume you could (and would want to)
add multiple buffers so you could TCP from one
while waveIn is filling the next.
I would also add that you would likely wish
to use TCP_NODELAY
int t = TRUE;
setsockopt( mysocket, IPPROTO_TCP, TCP_NODELAY,
(char*)&t, sizeof(t) );
 

Re:VoIP implementation

Architecture folks architecture.
Have some ideas no code....
Communications of this type has two aspects (a) control and (b) data
just like FTP.
Have the control work with TCP. and the data work on UDP.
What I mean with control is a TCP registration with a server, just like
a chat session. You get your 'ip-phone' to be part of a voice extension
based network like a pabx. The server knows you exists when you log onto
the server.
If you have multiple users, then you can call someone. Just type in the
extension number. The server will know who is who (ext->ip translation)
and initiate a call.
The thing is what platform shall we agree on Indy9 or Indy10.
Delphi or C++...
Carl Danley wrote:
Quote
Alright... So, I've been reading a book for VoIP and have been wondering
whether or not I should even bother trying to implement a feature like
this into a program of mine... I was wondering if anyone on here would
be willing to work with me to help with creating some sample code so I
can understand the process in this language... I am decently experienced
with Codegear RAD Studio (C++) and write applications on a daily
basis... My understandings are that this isnt an easy task, but im tired
of hearing that and I want to learn this so that I can implement this
type of feature into a multitude of different applications. If you have
any ideas as to where I could get started or have some spare time to
write some sample coding, I would absolutely appreciate it! I have
posted on several different forums over the past year and no one has
helped at all.. Thank you again for your time!

Also, if you have any questions, please ask!
 

Re:VoIP implementation

(After reading other posts)
Just a few thoughts OTTH to maybe help out:
For help with the waveXX() functions check out the Multimedia help files
in the for the SDK that come with Builder.
I have been looking at trying to do some audio stuff myself and seem to
remember that recording involves a couple of input buffers (one filling,
one saving). In playing back an audio file that can't fit into memory
you would use enough buffers to hold about 2 seconds of audio. Fill one
up start playing it, fill the rest, wait for 1 to finish playing, start
2, fill 1 with more stuff, rise & repeat...:)
As I was reading the other posts, I was thinking that if one were to
place the ->SendBuf() transfer in the between the record/fill and the
fill/play operations of the standard record/play process and increased
the amount of buffer to 3~4 secs. You would wind up sending continuously
from the mic side to the play side, but it might work.
There used to be a site that had some good information
(www.borg.com/~jglatt/tech/lowaud.htm) but I just checked and the site
is gone now :( Doing a search came up with some code:
(VB)
www.planetsourcecode.com/vb/scripts/ShowCode.asp
Another post said, "For samples on how to record audio with waveIn,
there are plenty on codeguru.com."
And one more thought the MTU on my firewall is 1500 (bytes), so the size
of your data buffers should take that into account.
DC
Carl Danley wrote:
Quote
Alright... So, I've been reading a book for VoIP and have been wondering
whether or not I should even bother trying to implement a feature like
this into a program of mine... I was wondering if anyone on here would
be willing to work with me to help with creating some sample code so I
can understand the process in this language... I am decently experienced
with Codegear RAD Studio (C++) and write applications on a daily
basis... My understandings are that this isnt an easy task, but im tired
of hearing that and I want to learn this so that I can implement this
type of feature into a multitude of different applications. If you have
any ideas as to where I could get started or have some spare time to
write some sample coding, I would absolutely appreciate it! I have
posted on several different forums over the past year and no one has
helped at all.. Thank you again for your time!

Also, if you have any questions, please ask!