Wowza Community

Receiving RTP audio stream without the sdp file

I’m working on an architecture where a telephone gateway sends an RTP stream to Wowza and I want to restream it to flash player (just one way). The system supports multiple sessions and each stream is created dynamically.

I’m trying to figure out how Wowza can pick up the RTP stream from the gateway without resorting to sdp files. I already have HTTP-based communication going between the 2 servers, so it’s no problem to exchange id’s, urls, ports or other stuff.

How can I get Wowza to initiate restreaming in response to, say, a request by a Flash client?

To clarify, here’s a little event sequence:

  1. Flash Client connects to a Wowza Application

  2. Flash Client sends a dial request to the Application

  3. The Application assigns an id to this request and sends an HTTP request to the phone gateway

  4. The phone gateway places a call

  5. When the call is connected, the gateway starts streaming (using the id) to Wowza and notifies the Wowza Application with an HTTP request

  6. When the Wowza App is notified, it needs to start restreaming and notify the Flash Client

  7. When Flash Client is notified, it starts playing the new stream

Now, I could predefine, say, 30 sdp files and just keep track of a mapping between the dial request and the sdp file, but that would get rather messy. I prefer not having the sdp files at all. Is that possible?



We really don’t have a direct API for this. It gets very complicated and it not publicly documented.


How can I get Wowza to initiate restreaming in response to, say, a request by a Flash client?

You can use and the MediaCaster API:

client-side:"startMediaCasterStream", "");

Where “” is a text file in content folder that might have an RTSP url to an IP camera, for example. Or you could just send the rtsp url as a parameter or other MediaCaster source.


package com.wowza.wms.example.module;
import com.wowza.wms.amf.*;
import com.wowza.wms.client.*;
import com.wowza.wms.module.*;
import com.wowza.wms.request.*;
public class ModuleMediaCasterExample extends ModuleBase {
	public void startMediaCasterStream(IClient client,
			RequestFunction function, AMFDataList params) {
		String streamName = params.getString(PARAM1);
		client.getAppInstance().startMediaCasterStream(streamName, "rtp");


Yes, exactly the same really. TThese are two ways of implementing the MediaCaster API. You can reference the stream without the .stream file. The .stream file is useful in players that will not accepts a url as a stream name. Flowplayer for example will have a problem with that.


I think you need an sdp file in that case.


If the encoder is doing rtsp announce (like the Wirecast doing quicktime streaming), it pushes the sdp to Wowza. In that case you don’t need StreamManager, you just play the stream name.

But otherwise the sdp file is generated and written to or copied to Wowza content folder, then use MediaCaster (StreamManager, etc) to start the stream.


Which encoder?


Hi Richard,

Is the call to startMediaCasterStream roughly what happens when using ‘start receiving stream’ with the streammanager?

Wouldn’t that require the file “” to exist? Isn’t that replacing one file by another?

If I understand correctly, the name of a stream identifies either a stream originating from a Flash Player, or a local media file, or a filename describing some other source. What about describing the source directly in the code? Is that possible, without the need for a file in the content directory?

Ok. So suppose I’d want to start receiving a stream with the following characteristics:

c=IN IP4

m=audio 1234 RTP/AVP 96


a=rtpmap:96 PCMU/8000/2

Could you tell me how I can start a MediaCaster so that it receives this stream (without writing any of this info to a file first)? How do I assign a name to this stream so that a Flash Client can play this same stream?


Isn’t there a way to short-circuit the sdp file? What part of Wowza server is reading the sdp file? Perhaps there’s a way to create a class that overrides this by taking the stream characteristics from the calling function instead?

You wrote:

Or you could just send the rtsp url as a parameter or other MediaCaster source

I thought this might be what I was looking for, but how do I pass this URL to the MediaCaster? Or am I confusing things?



What if the RTP encoder doesn’t produce an sdp file?


We need to work with a proprietary encoder that sits on a telephony gateway. It encodes phone audio to 8khz ulaw and sends it over RTP to Wowza.