[asterisk-dev] rtp data in an app question

Gallmeier, Jonathan Jonathan.Gallmeier at polycom.com
Tue Aug 11 16:46:35 CDT 2009


Thanks again.

I'm still trying to debug my original problem where the phone can't
decode the data from the sip channel. I'm trying to get the RTP data out
of the channel by copying it like:

 struct ast_frame *f = ast_read(chan); // chan is my SIP channel

  ...
 write(outpipe, f->data.ptr, f->datalen); // outpipe is the named pipe
to my phone's rtp input

  ...
 
I verified that my formats are the same on both ends of the call (ulaw,
same data rate and packet size).

Is this the correct way to read data from the channel? Should I use the
offset field or the samplesize field?

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: Tuesday, August 11, 2009 10:06 AM
To: Asterisk Developers Mailing List
Subject: Re: [asterisk-dev] rtp data in an app question

On Tuesday 11 August 2009 09:13:15 Gallmeier, Jonathan wrote:
> 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.

Renegotiation of the codec is not a supported operation at this time.
When
you call that API, Asterisk sets up a transcoding path and hands you the
codec
you requested.

-- 
Tilghman & Teryl
with Peter, Cottontail, Midnight, Thumper, & Johnny (bunnies)
and Harry, BB, & George (dogs)

_______________________________________________
--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