Amit this is the context i use in extensions.conf file.
[dialout]
exten => outbound,1,Answer ; switches to outbound-handler
exten => outbound,2,Wait(30)
exten => outbound,3,AGI(agi://10.1.1.68/ivr/unanswered)
exten => outbound,4,Hangup
exten => outbound-handler,1,Dial(SIP/${CallInitiate_phonenumber}@proxy.xxxxxx.com,120,gM(connect^agi://10.1.1.68/ivr/speak^${CallInitiate_hashdata}^${MACHINE_STATUS_UNKNOWN}))
exten => outbound-handler,2,NoOp(status_busy=${Dialstatus})
exten => outbound-handler,3,GotoIf($[${DIALSTATUS} = CONGESTION]?105)
exten => outbound-handler,4,NoOp(status=${DIALSTATUS}, DIALEDTIME=${DIALEDTIME},ANSWEREDTIME=${ANSWEREDTIME})
exten => outbound-handler,5,GotoIf($[${DIALSTATUS} = CHANUNAVAIL]?107)
exten => outbound-handler,6,GotoIf($[${DIALSTATUS} = ANSWER]?101)
exten => outbound-handler,7,Set(CallInitiate_hashdata=${CallInitiate_hashdata})
exten => outbound-handler,8,Goto(104)
exten => outbound-handler,101,AGI(agi://10.1.1.68/ivr/disconnected)
;exten => outbound-handler,102,Set(CallInitiate_hashdata=${CallInitiate_hashdata})
;exten => outbound-handler,103,AGI(agi://${AGI_SERVER}${AGI_URL}) ;DIAL_STATUS is busy, etc.
exten => outbound-handler,104,Hangup
exten => outbound-handler,105,AGI(agi://10.1.1.68/ivr/ignored)
exten => outbound-handler,107,AGI(agi://10.1.1.68/ivr/busy)
[macro-connect]
exten => s,1,Answer()
exten => s,2,Set(CallInitiate_hashdata=${ARG2})
exten => s,3,Set(machinestatus=${ARG3})
exten => s,4,AGI(agi://10.1.1.68/ivr/speak)
exten => s,5,Hangup
Peer configuration in sip.conf file is:
[proxy.xxxxx.com]
type=peer
secret=xxxxx
username=206820xxx1
host=proxy.xxxxx.com
fromuser=206820xxx1
fromdomain=10.1.1.68
dtmfmode=rfc2833
canreinvite=no
qualify=yes
disallow=all
allow=ulaw
progressinband=yes
promiscredir=yes
nat=yes
context=dialout
authuser=206820xxx1
outboundproxy=proxy.xxxxx.com
outboundproxyport=5060