Qasim,<div><br></div><div>Thank you for your response. I tried it but still doesn&#39;t work. This is what I have:</div><div><br></div><div><div>exten =&gt; _XXX.,1,NoOP(Set G711 codec)</div><div>exten =&gt; _XXX.,n,Set(SIP_CODEC=ulaw)</div>
<div>exten =&gt; _XXX.,n,Set(SIP_CODEC_OUTBOUND=ulaw)</div><div>exten =&gt; _XXX.,n,Dial(DAHDI/g1/$EXTEN)<br></div></div><div><br></div><div>Then I get this error:</div><div><br></div><div><div>WARNING[12156]: channel.c:5796 ast_request: No translator path exists for channel type DAHDI (native (ulaw|alaw|slin)) to (h264|silk8)</div>
<div>WARNING[12156]: app_dial.c:2277 dial_exec_full: Unable to create channel of type &#39;DAHDI&#39; (cause 58 - Bearer capability not available)</div></div><div><br></div><div>I tried both g711 and ulaw with no luck. I read the SIP_CODEC value and it is set properly. </div>
<div><br></div><div>Any suggestions/ideas?</div><div><br></div><div>Thanks,</div><div>Ali Pey</div><div><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Nov 1, 2012 at 12:02 PM, <a href="mailto:qasimakhan@gmail.com">qasimakhan@gmail.com</a> <span dir="ltr">&lt;<a href="mailto:qasimakhan@gmail.com" target="_blank">qasimakhan@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"><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 rel="nofollow" href="https://issues.asterisk.org/view.php?id=13243" target="_blank">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"><div><div class="h5">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>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
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></div></div><span class="HOEnZb"><font color="#888888">--<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></font></span></blockquote></div><br></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>