I'll need a bit more.
What kind of gateway?
Why does the FXO port have an extension number?
Aliases don't, as a rule, call trunks (unless a member of a ring group is a cell or external number). Routes call trunks. Aliases receive calls from trunks and ring extension groups.
Your questions seem to imply that you have an inverted view of the way the PBX flows calls. I don't mean to be rude or difficult, it's just that I need more information to understand your problem space.
Please tell me as much as you can about what you are trying to do and how you have your gateway hooked up.
Kind Regards
S