Residual changes for Asterisk v10 branch from ASTERISK-18747.