Hi Asterisk lovers!!
I have installed asterisk 11.2 a few weeks ago on our new Redhat Enterprise server.
We have a also a Patton SmartNode 4112 connected for our landline. At this moment we only use 1 FXO port.
Everything is working fine like CDR to mysql, make calls internally, make outbound calls. Also all the calls are being recorded. We can make a call using our erp-php program.
But when someone is calling to our landline that is connected to patton. Then asterisk gives us this message :
chan_sip.c:25184 handle_request_invite: Call from ‘anonymous’ (192.168.1.192:5060) to extension ‘anonymous’ rejected because extension not found in context ‘anonymous’.
I have been working on this for few days now without succes.
Below i have posted my config files.
Who knows what the problem can be?
SIP.CONF
[general]
port=5060
bindaddr=0.0.0.0
context=incoming
externip=xxxxxxxxxxxx
nat=force_rport,comedia
localnet=192.168.1.0/255.255.255.0
allowguest=yes
insecure=port,invite
[1000]
type=friend
context=phones
host=dynamic
secret=xxxx
[2000]
type=friend
context=phones
host=dynamic
secret=xxxx
[3000]
type=friend
context=phones
host=dynamic
secret=xxxx
[4000]
type=friend
context=phones
host=dynamic
secret=xxxx
[5000]
type=friend
context=phones
host=dynamic
secret=xxxx
[6000]
type=friend
context=phones
host=dynamic
secret=xxxx
[fxo1]
type=peer
context=incoming
host=dynamic
secret=xxx
insecure=port,invite
canreinvite=no
disallow=all
allow=alaw
allow=ulaw
allowexternaldomains=yes
allowguest=yes
[fxo2]
type=friend
context=incoming
host=dynamic
secret=fxo2
insecure=port,invite
[anonymous]
type=user
host=192.168.1.192
secret=xxxx
context=anonymous
insecure=port,invite
allowguest=yes
EXTENSIONS.CONF
[general]
static=yes
writeprotect=no
priorityjumping=no
autofallthrough=yes
clearglobalvars=no
[globals]
OUTBOUND=SIP/fxo1
[phones]
include => outgoing
include => incoming
exten => 1000,1,MixMonitor(${EXTEN}_${UNIQUEID}.wav)
exten => 1000,n,Dial(SIP/1000)
exten => 2000,1,MixMonitor(${EXTEN}_${UNIQUEID}.wav)
exten => 2000,n,Dial(SIP/2000)
exten => 2000,n,Background(main-menu)
exten => 2000,n,WaitExten()
exten => 1,1,Playback(digits/1)
exten => 2,1,Playback(digits/2)
exten => 3000,1,MixMonitor(${EXTEN}_${UNIQUEID}.wav)
exten => 3000,n,Dial(SIP/3000)
exten => 4000,1,MixMonitor(${EXTEN}_${UNIQUEID}.wav)
exten => 4000,n,Dial(SIP/4000)
exten => 5000,1,MixMonitor(${EXTEN}_${UNIQUEID}.wav)
exten => 5000,n,Dial(SIP/5000)
exten => 6000,1,MixMonitor(${EXTEN}_${UNIQUEID}.wav)
exten => 6000,n,Dial(SIP/6000)
[incoming]
exten => s,1,Answer()
exten => s,n,Dial(SIP/2000)
[outgoing]
exten => _X.,1,MixMonitor(${EXTEN}_${UNIQUEID}.wav)
exten => _X.,n,Dial(${OUTBOUND}/${EXTEN})
PATTON CONFIG
cli version 3.20
dns-client server 192.168.1.50
dns-client server 192.168.1.99
dns-relay
webserver port 80 language en
system
ic voice 0
low-bitrate-codec g729
profile ppp default
profile tone-set default
profile voip default
codec 1 g711alaw64k rx-length 20 tx-length 20
codec 2 g711ulaw64k rx-length 20 tx-length 20
profile pstn default
profile sip default
profile aaa default
method 1 local
method 2 none
context ip router
interface LAN
ipaddress 192.168.1.192 255.255.255.0
tcp adjust-mss rx mtu
tcp adjust-mss tx mtu
context ip router
route 0.0.0.0 0.0.0.0 192.168.x.xx 0
context cs switch
national-prefix 0
international-prefix 00
interface fxo IF-FXO-1
route call dest-interface IF-SIP-1
disconnect-signal loop-break
ring-number 3
dial-after timeout 2
interface sip IF-SIP-1
bind context sip-gateway GW_PATTON_1
route call dest-interface IF-FXO-1
remote 192.168.x.xx 5060
early-disconnect
context cs switch
no shutdown
authentication-service AUTH_ASTERISK
username fxo1 password xxxx
username fxo2 password xxxx
location-service LOC_SERV_ASTERISK_1
domain 1 192.168.1.50
identity fxo1
authentication outbound
authenticate 1 authentication-service AUTH_ASTERISK username fxo1
registration outbound
registrar 192.168.1.50 5060
lifetime 60
register auto
retry-timeout on-system-error 10
retry-timeout on-client-error 10
retry-timeout on-server-error 10
location-service LOC_SERV_ASTERISK_2
domain 1 192.168.1.50
identity fxo2
authentication outbound
authenticate 1 authentication-service AUTH_ASTERISK username fxo2
registration outbound
registrar 192.168.1.50 5060
lifetime 60
register auto
retry-timeout on-system-error 10
retry-timeout on-client-error 10
retry-timeout on-server-error 10
context sip-gateway GW_PATTON_1
interface IF_GW_SIP_ASTERISK_1
bind interface LAN context router port 5060
context sip-gateway GW_PATTON_1
bind location-service LOC_SERV_ASTERISK_1
no shutdown
context sip-gateway GW_PATTON_2
interface IF_GW_SIP_ASTERISK_2
bind interface LAN context router port 5062
context sip-gateway GW_PATTON_2
bind location-service LOC_SERV_ASTERISK_2
no shutdown
port ethernet 0 0
medium auto
encapsulation ip
bind interface LAN router
no shutdown
port fxo 0 0
caller-id format bell
encapsulation cc-fxo
bind interface IF-FXO-1 switch
no shutdown