Try this: sample
on the sip.conf (depends if you asterisk server is behind NAT), if NAted you add up (NAT-config)
[SIPtrunk]
type=friend
host=xxxxx.xxxx.xxxx
canreinvite=no
disallow=all
allow=g729
allow=ulaw
dtmfmode=rfc2833
qualify=1000
For NAT:
you add this to-
[general]
localnet=192.168.0.0/255.255.0.0 ; or your subnet
externip=x.x.x.x ; use your address
on extensions.conf look for this config on the dial plan- replace the xxxxx with the context of your SIP provider.
[globals]
CONSOLE=Console/dsp ; Console interface for demo
TRUNK=SIP/xxxxxx ; Trunk interface
TRUNKX=SIP/xxxxx
this will be executed in this dial plan
; dial a long distance outbound number
; This 'o' Dial flag is VERY important for VICIDIAL on outbound calls
exten => _91NXXNXXXXXX,1,AGI(
agi://127.0.0.1:4577/call_log)
exten => _91NXXNXXXXXX,2,Dial(${TRUNKX}/${EXTEN:1},,To)
exten => _91NXXNXXXXXX,3,Hangup
then asterisk -rvvvvvv => reload
try to check on the CLI: sip show peers if your voip context is reachable
then test call
thats it