[asterisk-users] Peer is UNREACHABLE
Luca Bertoncello
lucabert at lucabert.de
Thu May 28 16:09:19 CDT 2015
Darryl Moore <darryl at moores.ca> schrieb:
> Ahh. Seen that before! That suggests to me that you don't have your
> sip.conf records setup right.
>
> What's your sip.conf look like?
Well, here what I wrote in my sip.conf:
register => 00493511111111:MYSECRET at pbxluca/00493511111111
register => 00493512222222:MYSECRET at pbxfax/00493512222222
register => 00493513333333:MYSECRET at pbxanika/00493513333333
register => 4444444444:MYSECRET at messagenet/4444444444
[pbxluca]
type=peer
defaultuser=00493511111111
secret= MYSECRET
dtmfmode=rfc2833
host=172.16.34.132
context=luca_incoming
outboundproxy=172.16.34.132
port=5060
fromuser=00493511111111
fromdomain=172.16.34.132
usereqphone=yes
canreinvite=no
insecure=invite
[pbxfax]
type=peer
defaultuser=00493512222222
secret= MYSECRET
dtmfmode=rfc2833
host=172.16.34.132
context=fax_incoming
outboundproxy=172.16.34.132
port=5060
fromuser=00493512222222
fromdomain=172.16.34.132
usereqphone=yes
canreinvite=no
insecure=invite
[pbxanika]
type=peer
defaultuser=00493513333333
secret= MYSECRET
dtmfmode=rfc2833
host=172.16.34.132
context=anika_incoming
outboundproxy=172.16.34.132
port=5060
fromuser=00493513333333
fromdomain=172.16.34.132
usereqphone=yes
canreinvite=no
insecure=invite
[messagenet]
type=peer
defaultuser=4444444444
secret=MYSECRET
dtmfmode=rfc2833
host=sip.messagenet.it
context=messagenet_incoming
outboundproxy=sip.messagenet.it
port=5061
fromuser=4444444444
fromdomain=sip.messagenet.it
usereqphone=yes
canreinvite=no
insecure=invite
Here my extensions.conf:
[stdexten]
include => luca_incoming
include => fax_incoming
include => anika_incoming
include => messagenet_incoming
[luca_incoming]
exten => _00493511111111,1,Verbose(2,Call for Luca)
exten => _00493511111111,n,Dial(SIP/00493511111111)
exten => _00493511111111,n,Hangup
[fax_incoming]
exten => _00493512222222,1,Verbose(2,Call for FAX)
exten => _00493512222222,n,Dial(SIP/00493512222222)
exten => _00493512222222,n,Hangup
[anika_incoming]
exten => _00493513333333,1,Verbose(2,Call for Anika)
exten => _00493513333333,n,Dial(SIP/00493513333333)
exten => _00493513333333,n,Hangup
[messagenet_incoming]
exten => _4444444444,1,Verbose(2,Call from Messagenet)
exten => _4444444444,n,Dial(SIP/00493511111111)
exten => _4444444444,n,Hangup
[myproxy]
exten => _X.,1,Verbose(2,Call from ${CALLERID(num)} to ${EXTEN})
exten => _X.,n,GotoIf($["${CALLERID(num)}" = "00493511111111"]?dialluca)
exten => _X.,n,GotoIf($["${CALLERID(num)}" = "00493512222222"]?dialfax)
exten => _X.,n,GotoIf($["${CALLERID(num)}" = "00493513333333"]?dialanika)
exten => _X.,n,Dial(SIP/pbxluca/${EXTEN},30,r)
exten => _X.,n,Hangup
exten => _X.,n(dialluca),Verbose(2,Outgoing using pbxluca)
exten => _X.,n(dialluca),Dial(SIP/pbxluca/${EXTEN},30,r)
exten => _X.,n,Hangup
exten => _X.,n(dialfax),Verbose(2,Outgoing using pbxfax)
exten => _X.,n(dialfax),Dial(SIP/pbxfax/${EXTEN},30,r)
exten => _X.,n,Hangup
exten => _X.,n(dialanika),Verbose(2,Outgoing using pbxanika)
exten => _X.,n(dialanika),Dial(SIP/pbxanika/${EXTEN},30,r)
exten => _X.,n,Hangup
And here my users.conf:
[00493511111111]
fullname = luca
secret = MYSECRET
dahdichan = 1
hassip = yes
hasiax = no
hash323 = no
hasmanager = no
callwaiting = no
context = myproxy
host = dynamic
dtmfmode=rfc2833
canreinvite=no
sendrpid=pai
type=friend
nat=force_rport,comedia
qualify=yes
qualifyfreq=60
transport=Auto
avpf=no
force_avp=no
icesupport=no
encryption=no
callgroup=
pickupgroup=
dial=SIP/00493511111111
[00493512222222]
fullname = fax
secret = MYSECRET
dahdichan = 1
hassip = yes
hasiax = no
hash323 = no
hasmanager = no
callwaiting = no
context = myproxy
host = dynamic
dtmfmode=rfc2833
canreinvite=no
sendrpid=pai
type=friend
nat=force_rport,comedia
qualify=yes
qualifyfreq=60
transport=Auto
avpf=no
force_avp=no
icesupport=no
encryption=no
callgroup=
pickupgroup=
dial=SIP/00493512222222
[00493513333333]
fullname = anika
secret = MYSECRET
dahdichan = 1
hassip = yes
hasiax = no
hash323 = no
hasmanager = no
callwaiting = no
context = myproxy
host = dynamic
dtmfmode=rfc2833
canreinvite=no
sendrpid=pai
type=friend
nat=force_rport,comedia
qualify=yes
qualifyfreq=60
transport=Auto
avpf=no
force_avp=no
icesupport=no
encryption=no
callgroup=
pickupgroup=
dial=SIP/00493513333333
Now I see this: if I call my phone (00493511111111) from Twinkle it works.
If I call it from the phone of my wife, logged in on the same AsteriskNOW of
Twinkle and able to speak with Twinkle, it does NOT work and I see that in the
Log of my Asterisk:
== Using SIP RTP CoS mark 5
[May 28 23:05:59] WARNING[4135]: chan_sip.c:12800 check_auth: username mismatch, have <1234>, digest has <luca>
[May 28 23:05:59] NOTICE[4135]: chan_sip.c:20083 handle_request_invite: Failed to authenticate device "Test1" <sip:1234 at 172.16.34.132>;tag=as7855ffe5
(the phone of my wife is now logged in on AsteriskNOW with the user "1234" and try
to call my phone with the same number I use from Twinkle, which works).
Very puzzled...
Thanks
Luca Bertoncello
(lucabert at lucabert.de)
More information about the asterisk-users
mailing list