Grandstream gxw4104 Incoming and outgoing through PSTN

Out going works when the IAD is used as a peer, but when the IAD is registered using a SIP account, outgoing calls won’t work
incoming calls work fine through the auto attendent

please tell me the IAD configuration steps and asterisk configuration related with this matter
[b];[color=blue];;;;;;;;;;;;;; extensions.conf;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[home]

;SIP users
;lasitha
exten => 1234,1,Dial(SIP/lasitha,15)
exten => 1234,2,VoiceMail(444@mb_ippbx)
exten => 1234,3,PlayBack(vm-goodbye)
exten => 1234,n,HangUp()
exten => 4321,1,VoiceMailMain(444@mb_ippbx)

;sameera
exten => 1235,1,Dial(SIP/sameera,15)
exten => _*2.,Dial(${PANA}/11,${DEFTIMEOUT},Tt)
exten => 1235,2,VoiceMail(555@mb_ippbx)
exten => 1235,3,PlayBack(vm-goodbye)
exten => 1235,4,HangUp()
exten => 5321,1,VoiceMailMain(555@mb_ippbx)

;auto attendant
exten => 1,1,Answer()
exten => 1,2,BackGround(Sewanalisox)
exten => 1,3,WaitExten(60|m) ; voice
exten => i,1,Playback(invalid)
exten => i,2,Goto(1,2)
exten => 1,4,Playback(vm-goodbye) ;no extension entered good bye
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAD ;;;;;;;;;;;

exten => _XXXXXXX,1,Dial(SIP/${EXTEN}@201)
exten => _XXXXXXXXXX,1,Dial(SIP/${EXTEN}@201)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;direct callpickup

exten => _*8.,1,SET(GLOBAL(PICKUPMARK)=${EXTEN:2})
exten => _*8.,n,Pickup(${EXTEN:2}@PICKUPMARK)[/b][/color]

[b][color=red];;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sip.conf

[201]
type=friend
username=201
secret=201
host=203.115.19.14
context=home
insecure=port

; IAD channel two on profile 2 as a peer
;[gxw410x]
;type=peer
;context=incoming
;host=203.115.19.14
;insecure=port[/color][/b]