I think you can also use another variable on the A leg SDP to make it easier on the regex. ep_codec_string.<div><br></div><div>This will contain the parsed version of the A leg SDP and that&#39;s what I use most of the times for these tricks. Also, can you document that? :-)</div>
<div><br></div><div>Regards,<br clear="all">Joăo Mesquita<br>
<br><br><div class="gmail_quote">On Tue, May 4, 2010 at 1:52 PM, Anthony Minessale <span dir="ltr">&lt;<a href="mailto:anthony.minessale@gmail.com">anthony.minessale@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
you can regex the SDP for something specific and use that to set the absolute_codec_string in a standalone extension that comes first in the stack and has continue=true on it<div><br><div><br><br><div class="gmail_quote">
<div><div></div><div class="h5">On Tue, May 4, 2010 at 11:32 AM, Ken Fulmer <span dir="ltr">&lt;<a href="mailto:kenfulmer@icstechnologysolutions.com" target="_blank">kenfulmer@icstechnologysolutions.com</a>&gt;</span> wrote:<br>

</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div></div><div class="h5">








<div lang="EN-US" link="blue" vlink="purple">

<div>

<p class="MsoNormal"><span style="color:#1F497D">Just in case others are
interested, this is possible with the following parameters:</span></p>

<p class="MsoNormal"><span style="color:#1F497D"> </span></p>

<p class="MsoNormal"><span style="color:#1F497D">SIP Profile:</span></p>

<p class="MsoNormal"><span style="color:#1F497D"> </span></p>

<p class="MsoNormal"><span style="color:#1F497D">    &lt;param
name=&quot;inbound-late-negotiation&quot; value=&quot;true&quot;/&gt;</span></p>

<p class="MsoNormal"><span style="color:#1F497D"> </span></p>

<p class="MsoNormal"><span style="color:#1F497D">Dial-Plan:</span></p>

<p class="MsoNormal"><span style="color:#1F497D"> </span></p>

<p class="MsoNormal"><span style="color:#1F497D">      &lt;action
application=&quot;set&quot; data=&quot;inherit_codec=true&quot;/&gt;</span></p>

<p class="MsoNormal"><span style="color:#1F497D"> </span></p>

<p class="MsoNormal"><span style="color:#1F497D">The codec negotiated in Call Leg
B, is forced onto Call Leg A. This is possible due to the “inbound late
negotiation” parameter in the sip profile.</span></p>

<p class="MsoNormal"><span style="color:#1F497D"> </span></p>

<p class="MsoNormal"><span style="color:#1F497D">Hope this helps someone else. </span></p>

<p class="MsoNormal"><span style="color:#1F497D"> </span></p>

<p class="MsoNormal"><span style="color:#1F497D">Ken</span></p>

<p class="MsoNormal"><span style="color:#1F497D"> </span></p>

<p class="MsoNormal"><span style="color:#1F497D"> </span></p>

<p class="MsoNormal"><span style="color:#1F497D"> </span></p>

<div>

<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">

<p class="MsoNormal"><b><span style="font-size:10.0pt">From:</span></b><span style="font-size:10.0pt">
<a href="mailto:freeswitch-users-bounces@lists.freeswitch.org" target="_blank">freeswitch-users-bounces@lists.freeswitch.org</a> [mailto:<a href="mailto:freeswitch-users-bounces@lists.freeswitch.org" target="_blank">freeswitch-users-bounces@lists.freeswitch.org</a>]
<b>On Behalf Of </b>Ken Fulmer<br>
<b>Sent:</b> Tuesday, May 04, 2010 8:29 AM</span></p><div><br>
<b>To:</b> <a href="mailto:freeswitch-users@lists.freeswitch.org" target="_blank">freeswitch-users@lists.freeswitch.org</a><br>
</div><b>Subject:</b> [Freeswitch-users] Different codecs for different devices?<p></p>

</div>

</div><div><div></div><div>

<p class="MsoNormal"> </p>

<p class="MsoNormal">This may be a far out question but here goes:</p>

<p class="MsoNormal"> </p>

<p class="MsoNormal">Our fax machines that are connected to ATA’s need to be
g.711 on both Call Leg A and Call Leg B (in either direction). </p>

<p class="MsoNormal"> </p>

<p class="MsoNormal">However, our phones need to be g.711 on the internal side
that faces our PBX. On the side facing our SIP provider, the calls should be
transcoded to g.729. Inbound the calls to phones (not ATA’s) need to be g.729
on the inbound call leg and g.711 on the outbound call leg. </p>

<p class="MsoNormal"> </p>

<p class="MsoNormal">I realize we can set inbound / outbound codec preferences in
single or multiple profiles and we can set the “absolute_codec_string” value
for the outbound call leg. </p>

<p class="MsoNormal"> </p>

<p class="MsoNormal">However, I’ve yet to determine how to set the inbound call
leg’s codec differently depending on the device. Is this possible? </p>

<p class="MsoNormal"> </p>

<p class="MsoNormal">Thanks,</p>

<p class="MsoNormal"> </p>

<p class="MsoNormal">Ken Fulmer</p>

<p class="MsoNormal"> </p>

</div></div></div>

</div>


<br></div></div><div class="im">_______________________________________________<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></div></blockquote></div><div class="im"><br><br clear="all"><br>-- <br>Anthony Minessale II<br><br>FreeSWITCH <a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org/</a><br>ClueCon <a href="http://www.cluecon.com/" target="_blank">http://www.cluecon.com/</a><br>

Twitter: <a href="http://twitter.com/FreeSWITCH_wire" target="_blank">http://twitter.com/FreeSWITCH_wire</a><br><br>AIM: anthm<br><a href="mailto:MSN%3Aanthony_minessale@hotmail.com" target="_blank">MSN:anthony_minessale@hotmail.com</a><br>
GTALK/JABBER/<a href="mailto:PAYPAL%3Aanthony.minessale@gmail.com" target="_blank">PAYPAL:anthony.minessale@gmail.com</a><br>
IRC: <a href="http://irc.freenode.net" target="_blank">irc.freenode.net</a> #freeswitch<br><br>FreeSWITCH Developer Conference<br><a href="mailto:sip%3A888@conference.freeswitch.org" target="_blank">sip:888@conference.freeswitch.org</a><br>
<a href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org" target="_blank">googletalk:conf+888@conference.freeswitch.org</a><br>
pstn:+19193869900<br>
</div></div></div>
<br>_______________________________________________<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br></div>