Does freeswitch have anything similar to canreinvite (asterisk sip setting)? I know there is bypass_media but it does not work in the same way as canreinvite in asterisk.

It looks like bypass_media always tells freeswitch to send media directly between originator and terminator even though they do not have common codecs.

I want to use bypass_media only when leg A and leg B have common codecs. If they do not have then freeswitch should stay in media path and handle codec transcoding.

Is there an easy way to achieve this in freeswitch?