Solved

RTP application sample

Posted on 2006-06-16
20
1,310 Views
Last Modified: 2008-01-09
I want to write an RTP (Real-time Protocol) player in C++. The application reads in audio (RTP) packets generated by Cisco Voip phones. It then creates an audio (*.au or *.wav) file, and dump audio stream into this file.

I would like to read this audio file and analyze them. Can some one please show me a sample application and tutorial that can get me started.

Thanks much .
0
Comment
Question by:sjcu
  • 11
  • 6
  • 3
20 Comments
 
LVL 86

Expert Comment

by:jkr
ID: 16923777
You'll find a lot of code regarding that at e.g. http://www.voip-info.org/wiki-Open+Source+VOIP+Software with http://www.pjsip.org/ probably being a good place to start (Desc.: "Tiny console based SIP UA with sound, RTP/RTCP, SIMPLE, etc.")
0
 
LVL 4

Expert Comment

by:havman56
ID: 16932548


i have used some RTP free code avalialbe from bell laboartaories site . i have used it long time back may be 5 years back .

i will search , if i have surely i can give you entire RTP code .  keep searching in bell lab site


0
 
LVL 4

Expert Comment

by:havman56
ID: 16932628
u can mail "rosenberg" of dynamic soft he worked extensively on RTP
he helped me lot. i dont have his mail id as of now. it was 5 years back .
probably u cna get his id from web
0
 

Author Comment

by:sjcu
ID: 16935385
Thanks havman56.
i found the source under http://www-out.bell-labs.com/project/RTPlib/.
But i have trouble creating and linking it under vs dot net...
0
 
LVL 86

Expert Comment

by:jkr
ID: 16935622
>>But i have trouble creating and linking it under vs dot net...

And you want to keep them as your secret?
0
 

Author Comment

by:sjcu
ID: 16935648
i dont understand what u mean by that.
There is a good example in the library, sending and receving data from 1 source/multiple sources..
0
 
LVL 86

Expert Comment

by:jkr
ID: 16936925
Well, if you are getting errors when building the project, the best way to get help is to tell *which* errors exactly these are.
0
 

Author Comment

by:sjcu
ID: 16936966
d:\TEMP\Servers\voip\rtplib\rtplib\sysdep.h(13) : fatal error C1083: Cannot open include file: 'strings.h': No such file or directory
rtp_mlist_internal.c
d:\TEMP\Servers\voip\rtplib\rtplib\sysdep.h(13) : fatal error C1083: Cannot open include file: 'strings.h': No such file or directory
rtp_mlist.c
d:\TEMP\Servers\voip\rtplib\rtplib\sysdep.h(13) : fatal error C1083: Cannot open include file: 'strings.h': No such file or directory
rtp_highlevel.c
d:\TEMP\Servers\voip\rtplib\rtplib\sysdep.h(13) : fatal error C1083: Cannot open include file: 'strings.h': No such file or directory
rtp_encrypt.c
d:\TEMP\Servers\voip\rtplib\rtplib\sysdep.h(13) : fatal error C1083: Cannot open include file: 'strings.h': No such file or directory
rtp_collision.c
d:\TEMP\Servers\voip\rtplib\rtplib\sysdep.h(13) : fatal error C1083: Cannot open include file: 'strings.h': No such file or directory
rtp_api_internal.c
d:\TEMP\Servers\voip\rtplib\rtplib\sysdep.h(13) : fatal error C1083: Cannot open include file: 'strings.h': No such file or directory
rtp_api.c
d:\TEMP\Servers\voip\rtplib\rtplib\sysdep.h(13) : fatal error C1083: Cannot open include file: 'strings.h': No such file or directory
tclHash.c
d:\TEMP\Servers\voip\rtplib\rtplib\sysdep.h(13) : fatal error C1083: Cannot open include file: 'strings.h': No such file or directory
Generating Code...
0
 
LVL 4

Expert Comment

by:havman56
ID: 16941767
Nice to know u got rtplib from Bell labs site which i mentined . i am happy abt it.

build it on vc6. i used vc to build no idea on.net

give include directories path in ur project settings for strings.h
0
 
LVL 4

Expert Comment

by:havman56
ID: 16941925
i could able to compile the project . yes i also got same error as u got .

there is amacro in the code so defien that macro in project settings ur code will compile

include this macro in preprocessor "HAVE_STRING_H"


this is a code in sysdep.h

#if HAVE_STRING_H
# include <string.h>
#else
# include <strings.h>
# include <memory.h>
#endif

so include HAVE_STRING_H

problem solved
0
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 4

Expert Comment

by:havman56
ID: 16942052
wowwwwwwwwwwwwwww! amazin i could sucessuly able to build rtp.exe from lucent code in vc .


do the folloiwng stuff.

1. go to project setting -> preprocessor definitions --> add "HAVE_STRING_H "

2. then go to link liner tab--> library --> add these 2 libraries " wsock32.lib ws2_32.lib"

3. then exclude example 2 from building  

4. build only example 1 . bcoz both has main () so u will get error

5. remove rtp_unix.c from building

so build with example1 u will get rtp.exe


Nice u made me to remind RTP after 5 years .



0
 
LVL 4

Expert Comment

by:havman56
ID: 16942229
After u build u need to execute like

" rtp filename.* portno"

i didnt try this bcoz in my system i closed many ports . i could not able to execute

please execute on any RTPport and let me know port no

i will also try executing in my system
0
 

Author Comment

by:sjcu
ID: 16944043
Thanks. I am able to compile and link without any prob in vc6.0 but doesn't work on dot net environment. Any way..
I tried running it by rtplib  "D:\TEMP\Servers\voip\RTP\RTPLib\testrtp\rtp.txt" 5000   and it didn't work.
got an error message <bad address: 5000>.
0
 
LVL 4

Expert Comment

by:havman56
ID: 16951619
u cannot use any port as u need. specified RTP ports are available . i dont know the numbers u can find it in web

or u can mail to henningschulzarine of columbia university who worked on RTP
0
 
LVL 4

Expert Comment

by:havman56
ID: 16967171
Any progress ? please let me know
0
 

Author Comment

by:sjcu
ID: 16971730
Nope. There is no response from henningschulzarine.
0
 
LVL 4

Accepted Solution

by:
havman56 earned 300 total points
ID: 17012015
can u try 5001, 5002 dynamic pair ports for RTP

0
 
LVL 4

Expert Comment

by:havman56
ID: 17185492
why silence so long ?
0
 

Author Comment

by:sjcu
ID: 17186128
I will let you know, I was on to somenthing else...
0
 
LVL 4

Expert Comment

by:havman56
ID: 17265232
mmmmmmmmmm?
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now