Fix codec negiocation on inbound calls. Bugs 3980, 4021, 4045