Solved

500:Make RTP Packet

Posted on 2006-11-24
7
447 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
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 …

790 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