Codec list problem

I’m using Asterisk 1.2.2-BRIstuffed-0.3.0-PRE-1i. I am using 2 softphones to talk to each other in a LAN. Each softphone has GSM codec set as the first in the payload list. When I start a call, with canreinvite=yes, the RTP traffic flows between the peers, but the used codec is PCMU, not GSM. This is because in asterisk the first allowed codec is PCMU.

I can’t set GSM the first because I don’t want too. I have IP phones who don’t understand GSM.

So the problem is that I want to set Asterisk to let the codec list as it is negotiated by the peers, and not interfere here.

How can I make this? Is there a configuration option?