Strange codec problem (asterisk 10.3.0)

Hello
I have a rather strange problem. when i make a call to ana (see sip.conf below) from tst using any other codec than ulaw I get no sound at all in any direction but when i call tst from ana i get perfect sound in both directions regardless of codecs on tst.

[code] sip.conf
[general]
context=sip-trunk
port = 5060
udbpindaddr = 81.91.1.28
session-timers = refuse
canreinvite=no
srvlookup = yes
fromdomain=holmedal.net
disallow = all
allow = alaw
allow = ulaw
allow = Ilbc
allow = gsm
nat=no

[ana]
callerid="Analogue" <101>
type=friend
defaultuser=ana
secret=XXXX
context=out
host=dynamic
nat=no
call-limit=1
canreinvite=no
session-timers=refuse
mailbox=101@default
 
[tst]
callerid="Bjarnes voip" <102>
dtmfmode=rfc2833
type=friend
defaultuser=tst
secret=xxxx
disallow=all
allow=gsm
allow=ilbc
allow=ulaw
context=out
host=dynamic
nat = yes
directmedia=no
directsetup=no
canreinvite=no
qualify = yes
session-timers=refuse
mailbox=101@default

[/code]

All help will be appreciated as this is driving me crazy
Thanks in advance
Bjarne Nilsson

Asterisk has good diagnostic tracing capabilities, which make this sort of thing much easier to to debug. Turn on sip set debug and enable debugging for the chan_sip module, and look at the SDP negotiation and the trace output about codec negotiation.

Also directmedia and canreinvite are synonyms, although canreinvite will eventually be removed (I’m not sure if it is still present in 10.3.0).

Thanks I will continue debugging. One interesting observation before I go posting a lot of sip debug output.
When I pick up a call from ana on tst the client brefly displays a status of ?/gsm then changes the status to gsm an sound works, but making the call from tst to ana the status stays ?/gsm and no sound (same for ilbc
only u-law works both ways seems like asterisk fails somewhere when the caller uses anything but u-law

Can anyone replicate this/remember the same problem?

I know it takes time to do testeing, so if you can point me to a way I cen test further myself or need me to post sip debug I will be deeply grateful for any input