[asterisk-dev] rtp data in an app question

Gallmeier, Jonathan Jonathan.Gallmeier at polycom.com
Tue Aug 11 09:13:15 CDT 2009


Thanks. That makes more sense to me.

Since I'm using a SIP interface, will setting the format via the
ast_set_read_format() cause the SIP stack to re-negotiate the codec with
the SIP phone? Or, will it simply insert a codec and translate the audio
format by decoding and re-encoding? I'd rather re-negotiate the audio
codec with the phone if possible.

jonathan

-----Original Message-----
From: asterisk-dev-bounces at lists.digium.com
[mailto:asterisk-dev-bounces at lists.digium.com] On Behalf Of Tilghman
Lesher
Sent: Monday, August 10, 2009 5:49 PM
To: Asterisk Developers Mailing List
Subject: Re: [asterisk-dev] rtp data in an app question

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

_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--

AstriCon 2009 - October 13 - 15 Phoenix, Arizona
Register Now: http://www.astricon.net

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev



More information about the asterisk-dev mailing list