Thanks for the reply David,<div><br></div><div>I guess I don't understand an issue in implementing the offer/answer model (rfc3264). If asterisk receives an invite and knows the egress peer's capabilities, why not respond to the sdp in the initial invite with modified sdp containing only g729?</div>
<div><br></div><div>So asterisk knows that it is going to dial a peer that supports only g729 when it gets an invite from a peer that supports both ulaw and g729. Using the offer / answer model it would look like this:</div>
<div><br></div><div>Peer -> Invite (SDP:ulaw,g729) -> Asterisk </div><div>Peer <- 100 Trying (w/ SDP -- g729 only) <- Asterisk</div><div>Peer -> 200 OK (w/ SDP g729) -> Asterisk</div><div><br></div><div>
I understand your point about not knowing what may happen after initial call setup, but the same implementation would apply in the event of a reinvite.</div><div><br></div><div>Maybe this could be an option (allow_rfc3264=yes or something of that nature).</div>
<div><br></div><div>Thanks again,</div><div><br></div><div>-Ryan<br><br><div class="gmail_quote">On Thu, Aug 4, 2011 at 9:58 AM, David Vossel <span dir="ltr"><<a href="mailto:dvossel@digium.com">dvossel@digium.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">----- Original Message -----<br>
> From: "Ryan McGuire" <<a href="mailto:rdmcguire01@gmail.com">rdmcguire01@gmail.com</a>><br>
> To: <a href="mailto:asterisk-users@lists.digium.com">asterisk-users@lists.digium.com</a><br>
> Sent: Wednesday, August 3, 2011 9:47:42 AM<br>
> Subject: Re: [asterisk-users] Codec negotiation issue (no audio format found to offer)<br>
> From looking into this, it appears as if this is due to Asterisk<br>
> negotiating the legs separately as if they were not related to the<br>
> same call. So the ingress leg negotiates ulaw, and despite it knowing<br>
> that the peer also supports g729 fails the call since it's already<br>
> decided on ulaw and the egress leg only accepts g729.<br>
><br>
><br>
> If this is design intent I'm wondering if there is demand enough to<br>
> justify a feature request?<br>
><br>
><br>
> Any advice on how I can work around this issue?<br>
><br>
><br>
> Thanks,<br>
><br>
><br>
> -Ryan<br>
<br>
</div>This is a much more complicated issue than Asterisk negotiating each call leg separate of one another. Even if we give one call leg information about call setup occurring on the other call leg it is about to be bridged to, we are dependent on the endpoints honoring the codec preference priority we send them to avoid translation between one codec and another during the bridge... Honoring the preference order in the SDP does not always occur, which means that any effort in this area would only work in a perfect scenario.<br>
<br>
Even if we get call legs to negotiate perfectly before being bridged during call setup, we are not guaranteed that translation will not occur later if the call is transfered or parked. Regardless of what we do, if your setup allows ulaw and g729 for sip peers, you will always run the risk of a codec mixmatch... You may however be able to avoid this for some cases by using the sip.conf preferred_codec_only option. I believe that will limit the codecs negotiated during call setup to the single codec currently chosen on the other call leg. The problem with this is that we are not guaranteed the call leg supplying the codec will not change later.<br>
<br>
--<br>
David Vossel<br>
Digium, Inc. | Software Developer, Open Source Software<br>
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA<br>
Check us out at: <a href="http://www.digium.com" target="_blank">www.digium.com</a> & <a href="http://www.asterisk.org" target="_blank">www.asterisk.org</a><br>
The_Boy_Wonder in #asterisk-dev<br>
<br>
--<br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
New to Asterisk? Join us for a live introductory webinar every Thurs:<br>
<a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br>
</blockquote></div><br></div>