<code>exten =&gt; _X.,1,NoOP(G711 CoDec)<br>exten =&gt; _X.,n,Set(SIP_CODEC=g711)<br>exten =&gt; _X.,n,Dial(...)<br><br></code><strong>${SIP_CODEC}</strong>: Set the SIP codec for the inbound 
(=first) call leg (see channelvariables.txt or README.variables in 1.2);
 Asterisk 1.6.2 also comes with <a class="" rel="nofollow" target="_blank" href="https://issues.asterisk.org/view.php?id=13243">SIP_CODEC_OUTBOUND</a> for the remote (=second) call leg.<br><br>Hope this helps,<br><br>Regards,<br>
Qasim<br><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Nov 1, 2012 at 8:49 PM, Ali Pey <span dir="ltr">&lt;<a href="mailto:alipey@gmail.com" target="_blank">alipey@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">
Hello,<div><br></div><div>Let&#39;s say I have a sip client that supports both G711 and G729 codecs and I have them both enabled in sip.conf and G729 has higher priority.</div><div><br></div><div>Can I force the call to choose a different codec based on the dialed number or other conditions?</div>

<div><br></div><div>For instance I would want to do G711 if the call was routed to T1 card over Dahdi but G729 if the call was going to another sip client.</div><div><br></div><div>Thanks,</div><div>Ali Pey</div>
<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>