Call to extension internal disconnects in exactly 20 seconds

I have setup an elastix box version 1.6-13 with freepbx 2.5.1.0
The system talks to a PRI E1 line using a digium TE121 Card.
The end points are Cisco 7940G and 7970. The system is working fine with calls to exeternal world and incoming fine. I am facing a problem calling from the Cisco 7970 to any end point the call disconnects in exactly 20 seconds.
I am a new asterisk user and have tried and read around a lot but cannot figure this one out.
At the CLI i can see the Invite request going out and retrying 6 times and then hangs up. Happens only when the calls are intiated from the 7970’s .

I replicated this setup at my office (except using anlog lines) and exactly the same thing is happening.

Desperately need help.