What routing protocol you are using?
If it's EIGRP, you assign the number.
If it's BGP, out to AT&T's IPeFR, etc., they assign the number.
And there are others.
If you have a Cisco network, the most common protocol is EIGRP. Generally, you give the routing process on each router the same AS#.