Hello everyone,
I’ve been using Asterisk 11.10.0 for a few months and have successfully added and configured about 12 SIP extensions using Aastra 6731i phones and also set up an H.323 trunk between my Asterisk box and an Avaya system (via Communication Manager) using chan OOH323 but I’m really new to all this.
My overall setting is this: the Asterisk and Avaya boxes are on two different subnets on my same network and they can see each other just fine, there’s no NAT involved. (Avaya is in the 192.168.9.x subnet and Asterisk in the 192.168.10.x). I have some local phones on the same subnet as the Avaya and some others at 6 different branches that are connected through VPN, so again there’s no NAT involved to talk to those phones.
I can make calls between my SIP extensions just fine and also from Asterisk to Avaya and from Avaya to Asterisk, in all but two of the Aastra phones. I can call from Asterisk or from Avaya to those two extensions, but I can’t call to either Asterisk of Avaya from them. On any call placed from those phones I get the following error:
SIP/2.0 401 Unauthorized
This is the console output of a call placed from one of those phones:
<— SIP read from UDP:192.168.96.141:5060 —>
INVITE sip:85004@192.168.10.227:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.96.141:5060;branch=z9hG4bKd4511cd84a4f22669.bbb2635a0516602e8
Max-Forwards: 70
From: “” sip:85014@192.168.10.227:5060;tag=5dde10fb77
To: “85004” sip:85004@192.168.10.227:5060
Call-ID: 169216acc663493c
CSeq: 28267 INVITE
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, OPTIONS, UPDATE, PRACK, SUBSCRIBE, INFO
Allow-Events: talk, hold, conference, LocalModeStatus
Contact: “” sip:85014@192.168.96.141:5060;transport=udp;+sip.instance="urn:uuid:00000000-0000-1000-8000-00085D2B85C3"
Supported: gruu, path, timer, 100rel, replaces
User-Agent: Aastra 6731i/2.6.0.1007
Content-Type: application/sdp
Content-Length: 698
v=0
o=MxSIP 0 0 IN IP4 192.168.96.141
s=SIP Call
c=IN IP4 192.168.96.141
t=0 0
m=audio 3000 RTP/AVP 0 18 106 107 113 110 111 112 4 4 98 97 115 96 9 108 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:18 G729/8000
a=rtpmap:106 BV16/8000
a=rtpmap:107 BV32/16000
a=rtpmap:113 L16/16000
a=rtpmap:110 PCMU/16000
a=rtpmap:111 PCMA/16000
a=rtpmap:112 L16/8000
a=rtpmap:4 G723/8000
a=rtpmap:4 G723/8000
a=rtpmap:98 G726-16/8000
a=rtpmap:97 G726-24/8000
a=rtpmap:115 G726-32/8000
a=rtpmap:96 G726-40/8000
a=rtpmap:9 G722/8000
a=rtpmap:108 G7221/16000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=silenceSupp:on - - - -
a=fmtp:18 annexb=yes
a=fmtp:101 0-15
a=ptime:30
a=sendrecv
<------------->
— (14 headers 29 lines) —
Sending to 192.168.96.141:5060 (no NAT)
Sending to 192.168.96.141:5060 (no NAT)
Using INVITE request as basis request - 169216acc663493c
Found peer ‘85014’ for ‘85014’ from 192.168.96.141:5060
<— Reliably Transmitting (NAT) to 192.168.96.141:5060 —>
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.96.141:5060;branch=z9hG4bKd4511cd84a4f22669.bbb2635a0516602e8;received=192.168.96.141;rport=5060
From: “” sip:85014@192.168.10.227:5060;tag=5dde10fb77
To: “85004” sip:85004@192.168.10.227:5060;tag=as52309181
Call-ID: 169216acc663493c
CSeq: 28267 INVITE
Server: Asterisk PBX 11.10.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm=“asterisk”, nonce="03eab1fd"
Content-Length: 0
<------------>
Scheduling destruction of SIP dialog ‘169216acc663493c’ in 32000 ms (Method: INVITE)
<— SIP read from UDP:192.168.96.141:5060 —>
ACK sip:85004@192.168.10.227:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.96.141:5060;branch=z9hG4bKd4511cd84a4f22669.bbb2635a0516602e8
Max-Forwards: 70
From: “” sip:85014@192.168.10.227:5060;tag=5dde10fb77
To: “85004” sip:85004@192.168.10.227:5060;tag=as52309181
Call-ID: 169216acc663493c
CSeq: 28267 ACK
User-Agent: Aastra 6731i/2.6.0.1007
Content-Length: 0
And that just keep repeating and repeating but the call never actually takes place.
I think this is just a SIP issue so I’m just going to paste the contents of my sip.conf file:
[general]
context=unauthenticated
allowguest=no
srvlookup=no
udpbindaddr=0.0.0.0
tcpenable=no
shrinkcallerid=no
office-phone
type=peer
context=LocalSets
host=dynamic
nat=force_rport,comedia
dtmfmode=auto
disallow=all
allow=g729
85004
defaultuser=85004
secret=securepass
callerid=“Phone 4” <85004>
85014
defaultuser=85014
secret=securepass
callerid=“Phone 14” <85014>
host=192.168.96.141
transport=udp,tcp
Originally I had not have the defaultuser option on any of the extensions, nor the host and transport on the [85014] one, but the problem occurs with or without those options.
Note that I’m including only two extensions to simplify things up and that the extension with the problem is 85014.
Also, I said there’s no NAT involved here but I’m using the option nat=force_rport,comedia as suggested by “Asterisk The Definitive Guide 4th edition”. I’ve also switched that option to nat=no and the result has been the same.
My dialplan is also really simple. extensions.conf file:
[LocalSets]
exten => 85004,1,Dial(SIP/85004)
exten => 85014,1,NoOp()
same => n,System(echo ${CALLERID(all)})
same => n,Dial(SIP/85014)
In the beginning exten 85014 had only the Dial application just like exten 85004 but I added that echo for debugging purposes.
As I said this is only happening when calling from two of my branch phones. I don’t think it’s a network issue because I can call to those phones but not from them, but still I do see the phones are communicating to this side on the trace. Also our computers on those branches do see the Asterisk server (in the sense that I can ping or ssh into it from the remote computers).
All my SIP phones are the same: Aastra 6731i. Also all the phones are configured the same.
I’m really puzzled here, I’ve been trying out a lot of different configurations and nothing seems to work and I just don’t know where to look any more.
Any idea on what can be wrong here?
Thanks.