[asterisk-users] Codec Negotiation
Martin Joseph
ast at stillnewt.org
Thu Jul 20 11:34:04 MST 2006
On Jul 20, 2006, at 11:00 AM, Douglas Garstang wrote:
>
> Subject: Re: [asterisk-users] Codec Negotiation
>
>
> On Jul 20, 2006, at 10:16 AM, Douglas Garstang wrote:
>> I'm a little confused about Asterisk codec negotiation. Hopefully
>> someone can help.
>>
>> I have two phones, one on a slow link where I'd like to use G729,
>> and one on a fast link where I'd like to use ulaw.
>>
>> My sip.conf has:
>>
>> [general]
>> allow=ulaw
>> allow=g729
>> ...
>> [slow-phone]
>> allow=g729
>> allow=ulaw
>>
>> Firstly, does setting the codec for the slow-link phone override
>> the general settings? Of course it's not actually documented
>> anywhere.
>>
>> When the fast link phone calls the slow link phone, it sends ulaw
>> and G729 in that order to Asterisk. When Asterisk relays the
>> INVITE to the slow link phone, it does not change the codec
>> preference, and sends ulaw followed by G729. I end up with a call
>> that's ulaw on both legs, which isn't what I want.
>>
>> I guess the settings in [slow-phone] aren't overriding the
>> settings in [general]. That's bad...
>> How can I work around this?
> As you already stated in your previous post the slow phone codec
> pref does override general when it's the caller.
>
> I think the calling parties codec preferences are respected. That
> is why I suggested the last time you posted this that you "force"
> the slow link to g729 (allow that only), as that will cause the
> calling party (fast) to choose g729 also...
>
> I remember reading this described somewhere, but can't find the
> docs at the moment.
>
> HTH,
> Marty
> Marty,
>
> Ahhh.... I wasn't thinking about the fact that it would be keyed of
> the callers settings, rather than the callee's.
>
> However, setting the slow-link phone to g729 isn't a very workable
> solution. We want to have ulaw as a backup, in case all of our g729
> licenses are in use. Having the call completely fail in this case
> would be very bad. We should be able to have the slow-link phone
> negotiate to ulaw.
>
Are you intending to implement some logic to check for available g729
codecs? Because asterisk doesn't do this for you...
What about using some form of unrestricted codec like GSM instead for
the slow link?
Don't know any great solutions for you...
Marty
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20060720/c05fb79a/attachment.htm
More information about the asterisk-users
mailing list