Ali Pey
2012-Nov-01 15:49 UTC
[asterisk-users] Different codec for different type of calls
Hello, Let'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. Can I force the call to choose a different codec based on the dialed number or other conditions? 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. Thanks, Ali Pey -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20121101/72f2a356/attachment.htm>
Danny Nicholas
2012-Nov-01 15:57 UTC
[asterisk-users] Different codec for different type of calls
If you set up your DAHDI lines as "users" you should be able to do this. From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Ali Pey Sent: Thursday, November 01, 2012 10:49 AM To: asterisk-users at lists.digium.com Subject: [asterisk-users] Different codec for different type of calls Hello, Let'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. Can I force the call to choose a different codec based on the dialed number or other conditions? 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. Thanks, Ali Pey -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20121101/23ae5985/attachment.htm>
qasimakhan at gmail.com
2012-Nov-01 16:02 UTC
[asterisk-users] Different codec for different type of calls
exten => _X.,1,NoOP(G711 CoDec) exten => _X.,n,Set(SIP_CODEC=g711) exten => _X.,n,Dial(...) *${SIP_CODEC}*: 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 SIP_CODEC_OUTBOUND <https://issues.asterisk.org/view.php?id=13243> for the remote (=second) call leg. Hope this helps, Regards, Qasim On Thu, Nov 1, 2012 at 8:49 PM, Ali Pey <alipey at gmail.com> wrote:> Hello, > > Let'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. > > Can I force the call to choose a different codec based on the dialed > number or other conditions? > > 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. > > Thanks, > Ali Pey > > -- > _____________________________________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > New to Asterisk? Join us for a live introductory webinar every Thurs: > http://www.asterisk.org/hello > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20121101/1eeb26af/attachment.htm>