Outgoing Routes are FreePBX concepts. If you want something easy to implement in FreePBX, you are on the wrong forum.
You can use the dialplan function CUT, or diaplan regular expressions, to parse out the two parts of the number. You set the CALLERID “function”, from the caller ID value you have obtained.