Issue receiving calls

Good afternoon,

During two years I have been installing asterisk. Today setting up a new trunk I found an issue that it doesn’t allow me to pass incoming call trough that new trunk. I can make calls but not receive.

The error that I have when I receive a call is:

Before receiving the call I receive an invite from the provider:


<--- SIP read from UDP:199.36.250.60:5060 --->
INVITE sip:0138387b18ea542af7000100620001@98.174.154.133:5060 SIP/2.0
Record-Route: <sip:199.36.250.60:5061;ftag=as6b8a3a35;lr=on>
m: <sip:9492325109@199.36.250.60:5061>
Via: SIP/2.0/UDP 199.36.250.60:5061;branch=z9hG4bK41b4.8e586c86.0
v: SIP/2.0/UDP 10.101.7.24:5060;received=10.101.7.24;branch=z9hG4bK63dfdbfa;rport=5060
Max-Forwards: 69
f: "MANTECON,HECTOR" <sip:9492325109@jiveip.net>;tag=as6b8a3a35
t: <sip:0138387b18ea542af7000100620001@10.101.3.1:5061>
i: 4bfe07e05ec19c1a04e7c3675cec30a1@jiveip.net
CSeq: 102 INVITE
User-Agent: Jive Application Server
Date: Thu, 06 Feb 2014 22:14:18 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
k: replaces
X-ref: 570615494_21262505@4.55.3.161
X-jid: pbx24.c1.jiveip.net-1391724857.2444415
Privacy: none
c: application/sdp
l: 320
P-hint: NAT

v=0
o=root 1782689202 1782689202 IN IP4 199.36.250.31
s=Jive
c=IN IP4 199.36.250.31
t=0 0
m=audio 24582 RTP/AVP 0 9 3 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:9 G722/8000
a=rtpmap:3 GSM/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv
<------------->
--- (20 headers 15 lines) ---
Sending to 199.36.250.60:5060 (NAT)
Sending to 199.36.250.60:5060 (NAT)
Using INVITE request as basis request - 4bfe07e05ec19c1a04e7c3675cec30a1@jiveip.net
Found peer '0138387b18ea542af7000100620001' for '9492325109' from 199.36.250.60:5060

<--- Reliably Transmitting (NAT) to 199.36.250.60:5060 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 199.36.250.60:5061;branch=z9hG4bK41b4.8e586c86.0;received=199.36.250.60;rport=5060
Via: SIP/2.0/UDP 10.101.7.24:5060;received=10.101.7.24;branch=z9hG4bK63dfdbfa;rport=5060
From: "MANTECON,HECTOR" <sip:9492325109@jiveip.net>;tag=as6b8a3a35
To: <sip:0138387b18ea542af7000100620001@10.101.3.1:5061>;tag=as7067db29
Call-ID: 4bfe07e05ec19c1a04e7c3675cec30a1@jiveip.net
CSeq: 102 INVITE
Server: Cisco/SPA303-7.5.4
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="67552883"
Content-Length: 0


<------------>
Scheduling destruction of SIP dialog '4bfe07e05ec19c1a04e7c3675cec30a1@jiveip.net' in 32000 ms (Method: INVITE)

<--- SIP read from UDP:199.36.250.60:5060 --->
ACK sip:0138387b18ea542af7000100620001@98.174.154.133:5060 SIP/2.0
Via: SIP/2.0/UDP 199.36.250.60:5061;branch=z9hG4bK41b4.8e586c86.0
From: "MANTECON,HECTOR" <sip:9492325109@jiveip.net>;tag=as6b8a3a35
i: 4bfe07e05ec19c1a04e7c3675cec30a1@jiveip.net
To: <sip:0138387b18ea542af7000100620001@10.101.3.1:5061>;tag=as7067db29
CSeq: 102 ACK
Max-Forwards: 70
Content-Length: 0

<------------->
--- (8 headers 0 lines) ---

<--- SIP read from UDP:199.36.250.60:5060 --->
INVITE sip:0138387b18ea542af7000100620001@98.174.154.133:5060 SIP/2.0
Record-Route: <sip:199.36.250.60:5061;ftag=as6b8a3a35;lr=on>
m: <sip:9492325109@199.36.250.60:5061>
Via: SIP/2.0/UDP 199.36.250.60:5061;branch=z9hG4bK51b4.691c11e7.0
v: SIP/2.0/UDP 10.101.7.24:5060;received=10.101.7.24;branch=z9hG4bK6ece369a;rport=5060
Max-Forwards: 69
f: "MANTECON,HECTOR" <sip:9492325109@jiveip.net>;tag=as6b8a3a35
t: <sip:0138387b18ea542af7000100620001@10.101.3.1:5061>
i: 4bfe07e05ec19c1a04e7c3675cec30a1@jiveip.net
CSeq: 103 INVITE
User-Agent: Jive Application Server
Authorization: Digest username="0138387b18ea542af7000100620001", realm="asterisk", algorithm=MD5, uri="sip:0138387b18ea542af7000100620001@10.101.3.1:5061", nonce="67552883", response="7794b7de9372617dd4be729db67dd2fa"
Date: Thu, 06 Feb 2014 22:14:18 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
k: replaces
X-ref: 570615494_21262505@4.55.3.161
X-jid: pbx24.c1.jiveip.net-1391724857.2444415
Privacy: none
c: application/sdp
l: 320
P-hint: NAT

v=0
o=root 1782689202 1782689203 IN IP4 199.36.250.31
s=Jive
c=IN IP4 199.36.250.31
t=0 0
m=audio 24582 RTP/AVP 0 9 3 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:9 G722/8000
a=rtpmap:3 GSM/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv
<------------->

Here is my asterisk sip config:

[777]
deny=0.0.0.0/0.0.0.0
secret=tin03mar
dtmfmode=rfc2833
canreinvite=no
context=from-internal
host=dynamic
trustrpid=yes
sendrpid=no
type=friend
nat=no
port=5060
qualify=yes
qualifyfreq=60
transport=udp
avpf=no
icesupport=no
encryption=no
callgroup=
pickupgroup=
dial=SIP/777
mailbox=777@device
permit=0.0.0.0/0.0.0.0
callerid=Jeff Bennett <777>
callcounter=yes
faxdetect=no

[from-trunk]

host=199.36.250.0/24
type=friend
insecure=port,invite
dissallow=all
allow=ulaw
context=from-trunk

All suggestions are welcome :smile:

Thank you in advance.

host takes a single address, not a sub-network range.

Also note that canreinvite is deprecated in versions that support some of the other options that you are using, and may even have been completely replaced. peer is better than friend, in most cases.