SIP forcing wrong codec

When I connect to my SIP provider I need it to always be G729 and so have this set as the first codec in sip.conf. While this works great for one provider I use, a new provider I started using when I issue sip show channels at the start of the call it shows G729 then switches to Ulaw after a few seconds. Does anyone know why this would happen?

You will need to debug/snif SIP.

looks like a SIP renegotiation of client capabilities takes place. Although you might setup the call as g729 initially, any of the 2 parties that comprise the call, might want to decide capabilities, mid call (or after a few seconds in your case). Can you remove ulaw from the SIP.conf file for just this provider?

it must be your sip server send some message to change the codec. you could send the sip debug information to see why it is.

Thanks - I will check but pretty sure nothing is being passed which would change the codec.