[asterisk-dev] rtp data in an app question

Tilghman Lesher tilghman at mail.jeffandtilghman.com
Mon Aug 10 17:48:58 CDT 2009


On Monday 10 August 2009 01:57:06 pm Gallmeier, Jonathan wrote:
> I'm writing an asterisk app that bridges a sip call to a software
> application that takes and receives RTP audio and video data only via a
> named pipe interface. I've got the app up and running, but the
> audio/video data is not decodable. I'm thinking that I need to handle
> RTP packetization across this interface.

No, but you might have to deal with jitter (packets arriving out of order).

> Can someone confirm that the data in the asterisk app channel is sample
> data? (Asterisk removes the RTP headers before pushing data into a
> channel.) If the data is sample data, are are there asterisk RTP
> packetization/depacketization APIs that I can use?

It generally is NOT sample data, but rather data using a negotiated codec.
If you wanted raw signed linear sample data, you'd need to call
ast_set_read_format() to get Asterisk to translate the frames from whatever
codec the channel is using to signed linear (or whatever other codec you
want).  You'd also need to ast_set_write_format() if you wanted to send audio
in a format other than what the channel is using.

-- 
Tilghman



More information about the asterisk-dev mailing list