Solved

RTP application sample

Posted on 2006-06-16
20
1,317 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Written by John Humphreys C++ Threading and the POSIX Library This article will cover the basic information that you need to know in order to make use of the POSIX threading library available for C and C++ on UNIX and most Linux systems.   [s…
C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (http://www.experts-exchange.com/Programming/Languages/CPP/A_3912-Object-Properties-in-C.ht…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

911 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

21 Experts available now in Live!

Get 1:1 Help Now