Transcoding is not working in asterisk?

hi,we are make call from alaw codec enable SIP1-phone to g722 codec enable SIP2,bothe phones are ringing then ofter the offhook bothe phones are hangup automatically and in logs shows like circute busy /congested.

alaw <----> ulaw(working)
alaw <----> g722(not working)
ulaw <----->g722(not working)

At a guess, your sip.conf is trying to force the second phone to use a codec it doesn’t support. However, without the proper logs, and configuration details, that is just a guess.

Codec negotiation

When Asterisk is receiving a call, the codec will initially be set to the
first codec in the allowed codecs defined for the user receiving the call
that the caller also indicates that it supports. But, after the caller
starts sending RTP, Asterisk will switch to using whatever codec the caller
is sending.

When Asterisk is placing a call, the codec used will be the first codec in
the allowed codecs that the callee indicates that it supports. Asterisk will
not switch to whatever codec the callee is sending.

That information applies after the call is successfully connected. If he is getting all busy, the call is failing before any RTP need have been exchanged.

The SDP exchange offers all the allowed codecs, although the best candidate on the incoming side is given first place.

Reading carefully I think that part of this info apply also before connect the call.