I am wondering how Asterisk selects codecs between devices. For example, in my sip.conf I have: disallow=all allow=ulaw allow=alaw allow=g729 Does the order matter? Does it mean it will try each codec in succession and use the first that both endpoints support? Thanks, Adi
The order does matter. You want to offer ulaw, alaw and g729. I want to offer g726, g729 and gsm. In the order you have them listed in your stanza you offer them to me. In the order I have them in mine I offer them to you. In this case only g729 matches our lists and so we choose g729 for the call. If your list was ulaw, alaw and g729 and mine was gsm, g729 and ulaw and you had originated the call we would choose ulaw as that was your highest matching preference. Hope this make sense? Mark On Sun, 2005-01-02 at 15:55, Adi Linden wrote:> I am wondering how Asterisk selects codecs between devices. For example, > in my sip.conf I have: > > disallow=all > allow=ulaw > allow=alaw > allow=g729 > > Does the order matter? Does it mean it will try each codec in succession > and use the first that both endpoints support? > > Thanks, > Adi > _______________________________________________ > Asterisk-Users mailing list > Asterisk-Users@lists.digium.com > http://lists.digium.com/mailman/listinfo/asterisk-users > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users-- Mark Phillips, G7LTT/KC2ENI Randolph, NJ
Yes, this makes a lot of sense and gives me the information I am looking for! Thanks, Adi> The order does matter. > > You want to offer ulaw, alaw and g729. I want to offer g726, g729 and > gsm. > > In the order you have them listed in your stanza you offer them to me. > In the order I have them in mine I offer them to you. In this case only > g729 matches our lists and so we choose g729 for the call. > > If your list was ulaw, alaw and g729 and mine was gsm, g729 and ulaw and > you had originated the call we would choose ulaw as that was your > highest matching preference. > > Hope this make sense? > > Mark
Well disallow=all allow=ulaw,alaw,g729 That works in cvs-stable and head now. For sip order can/does matter on global and per user/peer. More people need to test and comment on this: http://bugs.digium.com/bug_view_page.php?bug_id=0002971 Don't say we didn't ask you to comment when it goes in and changes things and anyone feels the need to bitch about it. bkw> -----Original Message----- > From: asterisk-users-bounces@lists.digium.com [mailto:asterisk-users- > bounces@lists.digium.com] On Behalf Of Adi Linden > Sent: Sunday, January 02, 2005 2:55 PM > To: asterisk-users@lists.digium.com > Subject: [Asterisk-Users] Codec Selection in Asterisk > > I am wondering how Asterisk selects codecs between devices. For example, > in my sip.conf I have: > > disallow=all > allow=ulaw > allow=alaw > allow=g729 > > Does the order matter? Does it mean it will try each codec in succession > and use the first that both endpoints support? > > Thanks, > Adi > _______________________________________________ > Asterisk-Users mailing list > Asterisk-Users@lists.digium.com > http://lists.digium.com/mailman/listinfo/asterisk-users > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users