Solved

500:Make RTP Packet

Posted on 2006-11-24
7
440 Views
Last Modified: 2008-07-06
Hi all,

I have visited an excellent sight explaining how to construct your own ICMP protocol ‘echo’ request using PHP.  The function used for implementing your own protocol in PHP is ‘socket_create()’.
See:   http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=1786&lngWId=8

I know that the UDP protocol socket function is already created in PHP but I want to send RTP data packets. So can I have an example on how this could be done using PHP.  Take note that UDP is a transport protocol and that RTP is (in more cases than not) considered as an application protocol which sits on top of UDP (or TCP but I want UDP).

Do I need to create my own protocol set i.e. UDP and RTP on top??
Or can I use the UDP sockets already available and send some extra initiall headers to represent RTP? Will that work or will the UDP sockets only pack and unpack the packets as UDP packets only, thus ignoring RTP header and treating them as part of the UDP packet itself…….

Please advise on how to go about achieving this or give example code if they exist and available……

Many thanks
0
Comment
Question by:smotbd
  • 3
  • 2
7 Comments
 
LVL 48

Expert Comment

by:hernst42
ID: 18007898
As RTP is on top of you UDP you can set and get all information as raw-data from RTP, but you will nned to implement the wholde RTP-protocol in PHP like the listed PING. AFAIk there is no php-class/extension where you just can use RTP
0
 

Author Comment

by:smotbd
ID: 18008097
Yes but do I need to implement the UDP aswell?... I.e. implement UDP and RTP protocol.
0
 
LVL 48

Expert Comment

by:hernst42
ID: 18017870
No as RTP is on top of udp and if you are using udp-sockets the underlying laying is taking care of the udp-headers
0
 

Author Comment

by:smotbd
ID: 18018152
So, if I understand you correctly then- I can use the UDP socket php-class/extension and then simply pack all data packets with an RTP header i.e. just send the RTP header before any packets.

Is this correct? How does the UDP socket understand that it is RTP headers and not just UDP data?

Thanks again
0
 
LVL 48

Accepted Solution

by:
hernst42 earned 500 total points
ID: 18018569
RTP is run on top of UDP so UDP does not need to care about the RTP-headers. Those are evaluated by yor application/RTP library
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

Suggested Solutions

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
These days socially coordinated efforts have turned into a critical requirement for enterprises.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to dynamically set the form action using jQuery.

943 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

10 Experts available now in Live!

Get 1:1 Help Now