[HELP] ulaw pass-thru with 729 enabled

Here’s my situation:

I’m using Asterisk 1.2 as a proxy between two sip peers. Both peers have both 729 and ulaw allowed.

Peer 1 usually sends calls to my asterisk proxy with both 729 and ulaw as options, and asterisk sends the call out peer 2 using 729 pass-thru.

Sometimes, however, I need Peer 1 to only offer ulaw and have asterisk setup the call with peer 2 with ulaw.

What happens is asterisk negotiates 729 for peer 2 and is forced to ulaw on peer 1 (because that is all that is offered), and instead of forcing the connection with peer 2 to ulaw, it kills the call with “can’t find a path from ulaw to g729…” because I don’t have 729 licencing on this box (and don’t need it, because I just want it to pass-thru the codecs).

Any ideas on how to get asterisk to fall back to 711 if transcoding isn’t available?

Does anyone know how to do this or should I put a feature request into the bug tracker?

This is critical to my implementation also. Surely this must be possible!