Dialplan for Cisco7960

Does anyone tried to prepare dialplan.xml for Cisco 7940/7960 with some rules to simplify calling.
To dial national calls I need to dial 11 digits.
How to write a rule for example that always is added a prefix to dialed number?
OR
IF 9 digits dialled THEN add international prefix
ELSE IF 11 digits dialled THEN dial after 0 seconds

I wonder about it as backup for Asterisk.