Hi,
I would suggest you to refer to the following link, though it talks about T1/E1 the concept would be the same for FXO.
http://www.cisco.com/c/en/us/support/docs/voice/digital-ccs/14072-direct-inward-dial.html
you can do the following configuration under port for inbound calls to work:
dial-peer voice 3 pots
incoming called-number +058251....$
direct-inward-dial
for outbound you may do the following:
dial-peer voice 4 pots
destination-pattern .T
forward-digits all
port 0/0/0
Please rate and mark if helpful
Regards,
Adarsh Chauhan
Please rate and mark correct if helpful
Regards,
Adarsh Chauhan