Not accepting incoming calls from one of the trunks

This is my first dabble with voip/asterisk (using elsatix 2.3.0 distribution, running asterisk 1.8.11.0). I have at the moment two trunks set up. One (budgetphone.nl) is working fine, the other trunk (voys.nl) is not. Everything is working except for incoming calls. Since incoming calls for the other (budgetphone.nl) trunk is working i assume there is nothing wrong with the firewall settings (both the asterisk machine itself and the gateway). I made a tcpdump of the network interface on the asterisk server and the packets are arriving on the machine (with and without the firewall on the asterisk machine disabled). But somehow elastix is not routing them to the ring group. running asterisk -rvvvvv doesn’t show anything, it looks like nothing is arriving on the server, but the tcpdump shows otherwise. i made tcpdumps of inbound calls from both trunks. and the difference is that for the not working trunk i see a “SIP/2.0 401 Unauthorized” packet while the working trunk will go over in “TRYING”. below is the tcpdump of the not working trunk:

====================================================================

INVITE sip:@192.168.1.3:5060;transport=udp SIP/2.0
Record-Route: sip:217.21.203.27;lr;ftag=as1ede9164;cc=32333030;did=4e1.692927e2
Via: SIP/2.0/UDP 217.21.203.27;branch=z9hG4bK3b03.5eb566a6.0
Via: SIP/2.0/UDP 217.21.192.80:5060;received=217.21.192.80;branch=z9hG4bK1d1f4e7d;rport=5060
Max-Forwards: 70
From: <sip:@217.21.192.80>;tag=as1ede9164
To: <sip:@voipgrid.nl>
Contact: <sip:@217.21.192.80:5060>
Call-ID: 60efe8d129fb4a504ec31843318dfd82@217.21.192.80:5060
CSeq: 102 INVITE
User-Agent: VGUA-2355996m
Date: Sat, 02 Jun 2012 21:25:26 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Remote-Party-ID: <sip:@voipgrid.nl>;privacy=off;screen=yes
Content-Type: application/sdp
Content-Length: 300

v=0
o=- 272043919 272043919 IN IP4 217.21.192.80
s=VGUA-2355996m
c=IN IP4 217.21.192.80
t=0 0
m=audio 10894 RTP/AVP 8 18 101
a=rtpmap:8 PCMA/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 217.21.203.27;branch=z9hG4bK3b03.5eb566a6.0;received=217.21.203
.27;rport=5060
Via: SIP/2.0/UDP 217.21.192.80:5060;received=217.21.192.80;branch=z9hG4bK1d1f4e7
d;rport=5060
From: <sip:@217.21.192.80>;tag=as1ede9164
To: <sip:@voipgrid.nl>;tag=as5ad18df8
Call-ID: 60efe8d129fb4a504ec31843318dfd82@217.21.192.80:5060
CSeq: 102 INVITE
Server: FPBX-2.8.1(1.8.11.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm=“asterisk”, nonce="6051e4e0"
Content-Length: 0

ACK sip:@192.168.1.3:5060;transport=udp SIP/2.0
Via: SIP/2.0/UDP 217.21.203.27;branch=z9hG4bK3b03.5eb566a6.0
From: <sip:@217.21.192.80>;tag=as1ede9164
Call-ID: 60efe8d129fb4a504ec31843318dfd82@217.21.192.80:5060
To: <sip:@voipgrid.nl>;tag=as5ad18df8
CSeq: 102 ACK
Max-Forwards: 70
User-Agent: VGPXY-c9a8f78-OS
Content-Length: 0
INVITE sip:@192.168.1.3:5060;transport=udp SIP/2.0
Record-Route: sip:217.21.203.27;lr;ftag=as1ede9164;cc=32333030;did=4e1.792927e2
Via: SIP/2.0/UDP 217.21.203.27;branch=z9hG4bK4b03.582da7b2.0
Via: SIP/2.0/UDP 217.21.192.80:5060;received=217.21.192.80;branch=z9hG4bK2ce4bee6;rport=5060
Max-Forwards: 70
From: <sip:@217.21.192.80>;tag=as1ede9164
To: <sip:@voipgrid.nl>
Contact: <sip:@217.21.192.80:5060>
Call-ID: 60efe8d129fb4a504ec31843318dfd82@217.21.192.80:5060
CSeq: 103 INVITE
User-Agent: VGUA-2355996m
Authorization: Digest username="", realm=“asterisk”, algorithm=MD5, uri=“sip:@voipgrid.nl”, nonce=“6051e4e0”, response="7381d55771d8d3e390811a19cbb52752"
Date: Sat, 02 Jun 2012 21:25:26 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Remote-Party-ID: <sip:@voipgrid.nl>;privacy=off;screen=yes
Content-Type: application/sdp
Content-Length: 300

v=0
o=- 272043919 272043920 IN IP4 217.21.192.80
s=VGUA-2355996m
c=IN IP4 217.21.192.80
t=0 0
m=audio 10894 RTP/AVP 8 18 101
a=rtpmap:8 PCMA/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv

SIP/2.0 403 Forbidden
Via: SIP/2.0/UDP 217.21.203.27;branch=z9hG4bK4b03.582da7b2.0;received=217.21.203.27;rport=5060
Via: SIP/2.0/UDP 217.21.192.80:5060;received=217.21.192.80;branch=z9hG4bK2ce4bee6;rport=5060
From: <sip:@217.21.192.80>;tag=as1ede9164
To: <sip:@voipgrid.nl>;tag=as5ad18df8
Call-ID: 60efe8d129fb4a504ec31843318dfd82@217.21.192.80:5060
CSeq: 103 INVITE
Server: FPBX-2.8.1(1.8.11.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Length: 0

=============================================================================

i’m hoping it’s a simple configuration mistake. any help would be appreciated.

The error will be in sip.conf or users.conf. It probably involves an incorrect setting of the insecure option, either a failure to set it when it is needed, or setting it to an obsolete (an usually excessively permissive) value.

It could be as simple as the wrong password.

thanks for the fast reply. i didn’t have anything set for insecure (the config data from voys.nl didn’t say anything about that option). i added “insecure=invite” to the trunk config (becuase the other working trunk has that as well) and the non working trunk now also accepts incoming calls.

thanks for the help!