Broken lines


I have asterisk 1.2 and freepbx
I have more than 20 phones and 4 trunks.
My system is a little bit interesting, because my server connects to the main server and the owner of the main server is not me. So
My phones connect to my server and my server connects by trunk to the main server. /I pay for the owner of the main server/
I use G729 codec. the G729 codec is NOT installed to my server, only my phones have the license for the g729 codec.
/I use linksys spa942/
I experience phone line breakings (call ended) 2 or 3 times a day . It means in the middle of the conversation the line breaks down.
The conversation hangs up. It happens 2 or 3 times a day. I’ve checked almost everything, but i don’t find any mistake.
/internet connection,intranet,switches almost everything/
And here is the most interesting thing.
I bought the g729 codec to my server. I installed it and when i want to use it the phone line is only one-sided.
The caller can hear the receiver but the receiver cannot hear the caller. I had to uninstall the g729 codec.
Does anybody have any idea about solving this problem?