<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><BR><DIV><DIV>On Jul 20, 2006, at 11:41 AM, Douglas Garstang wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite"> <DIV><SPAN class="050553918-20072006"><FONT face="Arial" color="#0000ff" size="2">Sorry for the top posting. My email client is misbehaving.</FONT></SPAN></DIV> <DIV><SPAN class="050553918-20072006"><FONT face="Arial" color="#0000ff" size="2"></FONT></SPAN> </DIV> <DIV><SPAN class="050553918-20072006"><FONT face="Arial" color="#0000ff" size="2">Can't use gsm. The polycom phones only support g711/ulaw and g729.</FONT></SPAN></DIV> <DIV><SPAN class="050553918-20072006"><FONT face="Arial" color="#0000ff" size="2"></FONT></SPAN> </DIV> <DIV><SPAN class="050553918-20072006"><FONT face="Arial" color="#0000ff" size="2">No, we aren't intending to check for available g729 codecs.... that's why we wanted to have ulaw as a backup when no g729 codecs where available.</FONT></SPAN></DIV> <DIV><SPAN class="050553918-20072006"><FONT face="Arial" color="#0000ff" size="2"></FONT></SPAN> </DIV></BLOCKQUOTE>That won't work. If it's trying to use G729, it will still try even when the licenses are all in use. So you need to either force it g729 and make sure there are always licenses for it available, or use ulaw and make sure there is enough bandwidth.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>The other option is to write your own code that checks to verify the licenses are free somehow, and then tampers with the codec preferences? I think Brett (trixter) has some ideas/work in this direction already.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Marty</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BLOCKQUOTE type="cite"> <BLOCKQUOTE dir="ltr" style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px"> <DIV class="OutlookMessageHeader" dir="ltr" align="left"><FONT face="Tahoma" size="2">-----Original Message-----<BR><B>From:</B> Martin Joseph [<A href="mailto:ast@stillnewt.org">mailto:ast@stillnewt.org</A>]<BR><B>Sent:</B> Thursday, July 20, 2006 12:34 PM<BR><B>To:</B> Asterisk Users Mailing List - Non-Commercial Discussion<BR><B>Subject:</B> Re: [asterisk-users] Codec Negotiation<BR><BR></FONT></DIV><BR> <DIV> <DIV>On Jul 20, 2006, at 11:00 AM, Douglas Garstang wrote:</DIV> <BLOCKQUOTE type="cite"><BR class="Apple-interchange-newline"> <BLOCKQUOTE dir="ltr" style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: rgb(0,0,255) 2px solid; MARGIN-RIGHT: 0px"> <DIV class="OutlookMessageHeader" dir="ltr" align="left"><FONT class="Apple-style-span" face="Tahoma" size="5"><SPAN class="Apple-style-span" style="FONT-SIZE: 16px"><B>Subject:</B></SPAN></FONT><FONT class="Apple-style-span" face="Tahoma" size="5"><SPAN class="Apple-style-span" style="FONT-SIZE: 16px"> Re: [asterisk-users] Codec Negotiation</SPAN></FONT><FONT class="Apple-style-span" face="Tahoma" size="5"><SPAN class="Apple-style-span" style="FONT-SIZE: 16px"><BR></SPAN></FONT><FONT class="Apple-style-span" face="Tahoma" size="5"><SPAN class="Apple-style-span" style="FONT-SIZE: 16px"><BR></SPAN></FONT></DIV><BR> <DIV> <DIV>On Jul 20, 2006, at 10:16 AM, Douglas Garstang wrote:</DIV> <BLOCKQUOTE type="cite"> <DIV><SPAN class="810300317-20072006"><FONT class="Apple-style-span" face="Arial" color="#0000ff" size="5"><SPAN class="Apple-style-span" style="FONT-SIZE: 16px">I'm a little confused about Asterisk codec negotiation. Hopefully someone can help.</SPAN></FONT></SPAN></DIV> <DIV><SPAN class="810300317-20072006"></SPAN> </DIV> <DIV><SPAN class="810300317-20072006"><FONT class="Apple-style-span" face="Arial" color="#0000ff" size="5"><SPAN class="Apple-style-span" style="FONT-SIZE: 16px">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.</SPAN></FONT></SPAN></DIV> <DIV><SPAN class="810300317-20072006"></SPAN> </DIV> <DIV><SPAN class="810300317-20072006"><FONT class="Apple-style-span" face="Arial" color="#0000ff" size="5"><SPAN class="Apple-style-span" style="FONT-SIZE: 16px">My sip.conf has:</SPAN></FONT></SPAN></DIV> <DIV><SPAN class="810300317-20072006"></SPAN> </DIV> <DIV><SPAN class="810300317-20072006"><FONT class="Apple-style-span" face="Arial" color="#0000ff" size="5"><SPAN class="Apple-style-span" style="FONT-SIZE: 16px">[general]</SPAN></FONT></SPAN></DIV> <DIV><SPAN class="810300317-20072006"><FONT class="Apple-style-span" face="Arial" color="#0000ff" size="5"><SPAN class="Apple-style-span" style="FONT-SIZE: 16px">allow=ulaw</SPAN></FONT><FONT class="Apple-style-span" face="Arial" color="#0000ff" size="5"><SPAN class="Apple-style-span" style="FONT-SIZE: 16px"><BR></SPAN></FONT><FONT class="Apple-style-span" face="Arial" color="#0000ff" size="5"><SPAN class="Apple-style-span" style="FONT-SIZE: 16px">allow=g729</SPAN></FONT></SPAN></DIV> <DIV><SPAN class="810300317-20072006"><FONT class="Apple-style-span" face="Arial" color="#0000ff" size="5"><SPAN class="Apple-style-span" style="FONT-SIZE: 16px">...</SPAN></FONT></SPAN></DIV> <DIV><SPAN class="810300317-20072006"><FONT class="Apple-style-span" face="Arial" color="#0000ff" size="5"><SPAN class="Apple-style-span" style="FONT-SIZE: 16px">[slow-phone]</SPAN></FONT></SPAN></DIV> <DIV><SPAN class="810300317-20072006"><FONT class="Apple-style-span" face="Arial" color="#0000ff" size="5"><SPAN class="Apple-style-span" style="FONT-SIZE: 16px">allow=g729</SPAN></FONT></SPAN></DIV> <DIV><SPAN class="810300317-20072006"><FONT class="Apple-style-span" face="Arial" color="#0000ff" size="5"><SPAN class="Apple-style-span" style="FONT-SIZE: 16px">allow=ulaw</SPAN></FONT></SPAN></DIV> <DIV><SPAN class="810300317-20072006"></SPAN> </DIV> <DIV><SPAN class="810300317-20072006"><FONT class="Apple-style-span" face="Arial" color="#0000ff" size="5"><SPAN class="Apple-style-span" style="FONT-SIZE: 16px">Firstly, does setting the codec for the slow-link phone override the general settings? Of course it's not actually documented anywhere.</SPAN></FONT></SPAN></DIV> <DIV><SPAN class="810300317-20072006"></SPAN> </DIV> <DIV><SPAN class="810300317-20072006"><FONT class="Apple-style-span" face="Arial" color="#0000ff" size="5"><SPAN class="Apple-style-span" style="FONT-SIZE: 16px">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.</SPAN></FONT></SPAN></DIV> <DIV><SPAN class="810300317-20072006"></SPAN> </DIV> <DIV><SPAN class="810300317-20072006"><FONT class="Apple-style-span" face="Arial" color="#0000ff" size="5"><SPAN class="Apple-style-span" style="FONT-SIZE: 16px">I guess the settings in [slow-phone] aren't overriding the settings in [general]. That's bad...</SPAN></FONT></SPAN></DIV> <DIV><SPAN class="810300317-20072006"><FONT class="Apple-style-span" face="Arial" color="#0000ff" size="5"><SPAN class="Apple-style-span" style="FONT-SIZE: 16px">How can I work around this?</SPAN></FONT></SPAN></DIV></BLOCKQUOTE>As you already stated in your previous post the slow phone codec pref does override general when it's the caller.<BR><BR></DIV> <DIV>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...</DIV> <DIV><BR class="khtml-block-placeholder"></DIV> <DIV>I remember reading this described somewhere, but can't find the docs at the moment.</DIV> <DIV><BR class="khtml-block-placeholder"></DIV> <DIV>HTH,</DIV> <DIV>Marty</DIV></BLOCKQUOTE></BLOCKQUOTE> <DIV><BR class="khtml-block-placeholder"></DIV> <DIV><BR class="khtml-block-placeholder"></DIV><BR class="Apple-interchange-newline"> <BLOCKQUOTE type="cite"> <DIV><SPAN class="050595817-20072006"><FONT face="Arial" color="#0000ff" size="2">Marty,</FONT></SPAN></DIV> <DIV><SPAN class="050595817-20072006"><FONT face="Arial" color="#0000ff" size="2"></FONT></SPAN> </DIV> <DIV><SPAN class="050595817-20072006"><FONT face="Arial" color="#0000ff" size="2">Ahhh.... I wasn't thinking about the fact that it would be keyed of the callers settings, rather than the callee's.</FONT></SPAN></DIV> <DIV><SPAN class="050595817-20072006"><FONT face="Arial" color="#0000ff" size="2"></FONT></SPAN> </DIV> <DIV><SPAN class="050595817-20072006"><FONT face="Arial" color="#0000ff" size="2">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.</FONT></SPAN></DIV> <DIV><SPAN class="050595817-20072006"><FONT face="Arial" color="#0000ff" size="2"></FONT></SPAN> </DIV></BLOCKQUOTE><BR></DIV> <DIV>Are you intending to implement some logic to check for available g729 codecs? Because asterisk doesn't do this for you... </DIV> <DIV><BR class="khtml-block-placeholder"></DIV> <DIV>What about using some form of unrestricted codec like GSM instead for the slow link?</DIV> <DIV><BR class="khtml-block-placeholder"></DIV> <DIV>Don't know any great solutions for you...</DIV> <DIV>Marty</DIV> <DIV><BR class="khtml-block-placeholder"></DIV></BLOCKQUOTE><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">_______________________________________________</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">--Bandwidth and Colocation provided by Easynews.com --</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">asterisk-users mailing list</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">To UNSUBSCRIBE or update options visit:</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><SPAN class="Apple-converted-space"> </SPAN><A href="http://lists.digium.com/mailman/listinfo/asterisk-users">http://lists.digium.com/mailman/listinfo/asterisk-users</A></DIV> </BLOCKQUOTE></DIV><BR></BODY></HTML>