I worked with Asterisk a number of years ago and have now been given to set up a new system.
On a CentOS 7 box, I installed Asterisk and added a SIP trunk and users. My provider gave me a separate fiber line with an IP plan and said to use those IP’s. The info he gave me was:
P2P Pool: 10.12.15.220/30
Provider P2P IP: 10.12.15.221
My P2P IP: 10.12.15.222
External Pool: 10.12.15.224/29
Provider Signaling IP: 10.12.15.225
Provider Media IP: 10.12.15.226
My Signaling IP: 10.12.15.227
I connected the line to my router and forwarded the packets to my server 192.168.10.11. The router has an Internet connection and I forwarded SIP and IAX ports from there also.
sip.conf:
[general]
context=default
bindport=5060
nat=no
externip = 10.12.15.222
localnet = 192.168.1.0/255.255.255.0
externaddr = 10.12.15.222
externtcpport = 5060
[provider-out]
type=peer
context=from-provider
host=10.12.15.225
insecure=invite
canreinvite=yes
qualify=yes
dtmfmode=rfc2833
nat=force_rport
[provider-in]
type=friend
host=10.12.15.225
insecure=invite
context=from-provider
port=5060
nat=force_rport
And the extensions.conf:
[test]
exten => 100,1,Dial(SIP/100)
exten => 101,1,Dial(SIP/101)
exten =>1000,1,Answer()
same => n,Wait(1)
same => n,Playback(hello-world)
same => n,Hangup()
exten => _X.,1,Set(CALLERID(num)=)
same => n,Dial(SIP/${EXTEN}@provider-out)
[from-provider]
exten => s,1,Dial(SIP/100)
exten => ,1,Dial(SIP/100)
I then installed Zoiper on two computers in the LAN and on my laptop at home.
From home, I just type a landline/call number and the call goes out just fine. I can dial 1000 and hear “Hello World”
From the LAN, if I dial an extension (e.g. from 100 I dial 101), that extension does not ring.
If I dial 1000, no sound is received although the console says that it is playing the sound file.
If I dial a landline/cell number, the landline rings, neither party can hear each other.
Help?