Asim:
Here's a code sample from IOS 12.4 you can use as a template to get you started. Saw it as an example in a training doc.
Hope it helps.
Tom
isdn switch-type primary-qsig
!
voice call send-alert
voice rtp send-recv
!
controller E1 1/0
pri-group timeslots 1-31
description Conn to remote PBX
!
interface FastEthernet0/0
no ip address
shutdown
duplex auto
speed auto
!
interface Serial0/0
ip address xxx.xxx.xxx.x 255.255.255.252
no fair-queue
no dce-terminal-timing-enable
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
interface Serial0/1
no ip address
shutdown
no dce-terminal-timing-enable
!
interface Serial1/0:15
description D-Channel For PBX
no ip address
isdn switch-type primary-qsig
isdn overlap-receiving
isdn incoming-voice voice
isdn contiguous-bchan
isdn bchan-number-order ascending
no cdp enable
!
ip classless
ip route 0.0.0.0 0.0.0.0 xxx.xxx.xxx.x
!
voice-port 1/0:15
description voice port for PBX
!
dial-peer voice 99 voip
destination-pattern .T
progress_ind setup enable 3
session target ipv4:xxx.xxx.xxx.x
tech-prefix 99
dtmf-relay h245-alphanumeric
!
dial-peer voice 9 pots
destination-pattern 9T
progress_ind alert enable 8
direct-inward-dial
port 1/0:15