[SOLVED]Change the order of preferred codecs

How do i change the Order of preferred codecs. For example, When calls are first negotiated with my server, My server ask’s for Ulaw then g729 as the order. I want it to ask for g729 THEN ulaw as the order of available codecs. So if the carrier had both, The carrier would default to g729. If the carrier does not have g729 then the line would use ulaw.

Thanks

Update: thanks to the suggestion i went to sip settings and unchecked all codecs.
Then One by one i checked, Submit, Reload untill the list was in the order i want.
Thanks!!

P.S. Now how do i do that with Trixbox?

Go to the Asterisk SIP Settings module and scroll down until you see the Codecs section.

I am running FreePBX 2.9.0.7 distro at my office. In this version there are little green arrows by each codec. Just drag the arrows to rearrange the codec order.