Do you use CCA? In there its easy.
You navigate to Telephony > Ports and Trunks > FXS ports.
There you select either User Mode (gets a voice mail and feature code access and uses a license), FAX, or Common Area
To further configure "User Phone" go to Telephony > Users and Extensions > Users and Phones > User Extensions.
To further configure "Common Area Phone" and "Fax" go to Telephony > Users and Extensions > Users and Phones > Analog Extensions.
Creating a USER MODE:
voice-port 0/0/2
shutdown
dial-peer voice 3 pots
no description
no destination-pattern
service stcapp
sip-register
no corlist incoming
no translation-profile incoming
no dial-peer voice 1112 pots
voice-port 0/0/2
no station-id number
caller-id enable
no dial-peer voice 1112 pots
voice-port 0/0/2
no shutdown
Creating Common Area:
voice-port 0/0/1
shutdown
dial-peer voice 2 pots
no service
destination-pattern 302
no corlist incoming
no description
no translation-profile incoming
no sip-register
port 0/0/1
no dial-peer voice 1111 pots
voice-port 0/0/1
station-id number 302
caller-id enable
voice-port 0/0/1
no shutdown
In the case of the user Mode, and ephone gets created (this is an example of one created on my system):
ephone 42
device-security-mode none
mac-address 4C46.9D0F.2002 <-- bogus MAC address
max-calls-per-button 2
type anl
A Common Area or FAX dont get an ephone.
For User Mode you would then create the user and voice mail (ephone-dn and all its parameters as well as CUE voice mail box configuration). Too many commands to list.