[Asterisk-Dev] Per-call codec preference

Michael Giagnocavo mgg-digium at atrevido.net
Thu Jan 13 00:18:46 MST 2005


Thanks for that pointer! 

The problem I've run into is that in iax2_call(), I have no way of accessing
the channelvars that are set, since Dial does not copy them over. Of course,
I could be missing something quite basic, as this is the first patch I've
worked on for Asterisk.

I made a horrible hack by editing app_dial to copy the variable
("CODEC_OVERRIDE") (I'm listening for better names, perhaps
PREFERRED_CODEC?), from chan to tmp->chan. That does the trick, but it's
hackish.

So how can I get the original channel to grab the channelvars from
iax2_call()?

Thanks,
Michael

-----Original Message-----
From: asterisk-dev-bounces at lists.digium.com
[mailto:asterisk-dev-bounces at lists.digium.com] On Behalf Of John Todd
Sent: Wednesday, January 12, 2005 6:45 PM
To: Asterisk Developers Mailing List
Subject: Re: [Asterisk-Dev] Per-call codec preference

At 6:00 PM -0600 on 1/12/05, Michael Giagnocavo wrote:
>Hi there,
>
>	I'm thinking of adding patches to allow per-call codec negotiation,
>so that the codec can be set via the dialplan ("at runtime"), instead of
>just when defining peers ("design time").
>
>	My idea would be to add a channel variable that could be a codec
>("g729", "ulaw", etc.), "current", to mean whatever codec is currently in
>use, or null/"default", for whatever would normally work.
>
>	Any comments or suggestions on this?
>
>-Michael

This does (used to?) exist already, at least for SIP, though I've 
heard people complaining recently that it doesn't work as expected. 
Check out the SIP_CODEC variable in the chan_sip code.

It would be nice, of course, to extend this type of functionality 
across all VoIP channel types that support codecs, though.

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





More information about the asterisk-dev mailing list