I took a look at the export_descr_unit.txt file to see if I could work this out. Comparing the entry for NE ballista and peasant crossbowmen I noticed three things which might be what you're looking for.

First, under the attributes section the ballista has artillery which might be what allows it to target walls.

Second, under stat_sec (the actual ballista attack) the ballista has siege_missile which might be what you're looking for.

Finally you might have to set the category of the unit to siege.

Not sure if any of this will help, am going to test it now.