Solved

500:Make RTP Packet

Posted on 2006-11-24
7
450 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

690 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