Codec negotiation when using voicemail


Is it possible to force codec renegotiation when call is forwarded to a voicemail


I have sip phone in LAN that use G.711 , G.729 and declared to support both G.711 and G.729 in sip.conf
but I have Voice mail messages and announces stored in G.729 format

if one sip phone is forwarded to Voicemail ==> the other sip phone are unable to renegotiate G.729 codec

So how to force codec renegotiation when forwarding call to a voicemail or another extension or a peer

Codec negotiation is fixed when the call is answered. If that results in more than one choice, it is the sender that chooses. As mentioned in several recent threads, there are channel variables that can narrow the choice, as long as they are set before answer. I don’t know if they are handled by the channel driver or the Dial application.

I don’t believe there is any facility to force a re-invite for the purposes of excluding codecs.