Arbitrary channel variable/option; starup script

Hi. Is there a way to set arbitrary option for channel, for example SIP or SCCP phone?

I want to use that option later, in dialing rules.

Also, is there a way to execute some asterisk script at asterisk startup, to initialize some AstDB keys for example?