Hi
I am experienced CCIE level knowledge cisco engineer, having years of experience on CME/CUCM, and all kind of known cisco ip phones, also integrating theme with Asterisk and FreePBX.
The CP-8831 is a bit different comparing with other cisco phones to with on sip protocol with asterisk.
I have configured like this phone before, just setup a tftp and let me know to do this as well as u need.
Regards