Asterisk 1.4 problem with translation g729 -> ulaw

I upgrade Asterisk from 1.2.X to 1.4.0 and after that when I make a call via VoipDiscount (g729 buy from Digum) on my internel SIP phone (ulaw) I got silent.
When I make same call with internel analog phone connected to Digium TDM4xx everything is ok.
When I make same call with external (gsm) trunk - everyting is ok.
When I make same call with mISDN - everything is ok.

Only when translate beetwen g729 and SIP a have silent.

Problem is because I do not have any error or message. Asterisk looks work fine, but I have silent in my phone.

In previous all verion this working perfect.
The g729 codeck I have for 1.4 version.

Does somebody know what happend ??

how many codec licences did you buy ?

3 licence

dembinski3*CLI> show g729
0/0 encoders/decoders of 3 licensed channels are currently in use

When I make a call the value 0/0 not change.

But:
dembinski3*CLI> core show channels
Channel Location State Application(Data)
SIP/voipdiscount01-0 (None) Up Bridged Call(SIP/grandstream01
SIP/grandstream01-b7 848228339677@default Up Dial(SIP/48228339677@voipdisco
2 active channels
1 active call

And:
dembinski3*CLI> core show channel SIP/voipdiscount01-0822b538
– General -->
Name: SIP/voipdiscount01-0822b538
Type: SIP
UniqueID: 1168011990.210
Caller ID: 848228339677
Caller ID Name: (N/A)
DNID Digits: (N/A)
State: Up (6)
Rings: 0
NativeFormats: 0x100 (g729)
WriteFormat: 0x40 (slin)
ReadFormat: 0x40 (slin)
WriteTranscode: Yes
ReadTranscode: Yes
1st File Descriptor: 50
Frames in: 2
Frames out: 0
Time to Hangup: 0
Elapsed Time: N/A
Direct Bridge: SIP/grandstream01-b7a30e88
Indirect Bridge: SIP/grandstream01-b7a30e88
– PBX –
Context: default
Extension:
Priority: 1
Call Group: 0
Pickup Group: 0
Application: Bridged Call
Data: SIP/grandstream01-b7a30e88
Blocking in: ast_waitfor_nandfds
Variables:
BRIDGEPEER=SIP/grandstream01-b7a30e88
DIALEDPEERNUMBER=48228339677@voipdiscount01
SIPCALLID=640551bd61b7f89049ea73ef2db84c56@192.168.22.203

Which kernel version do you have? I understand that there is a problem with certain kernel versions and G.729.

kernel 2.6.19-gentoo-r2

based on Gento-sources

I change kernel to 2.6.18-gentoo-r6 - same situation

But is it really kernel conflict ?? Because old Asterisk version 1.2.x on kernel 2.6.19 works fine.

I found the problem.
In sip.conf in this version MUST be set does the trunk/client are behind nat or not. In previous version Asterisk done this by himself, or just it works witout any setting.

sip.conf

[trunk0]
nat=yes