Ports forwarded, but no incoming calls?

Get help with installing, upgrading and running Asterisk.

Moderators: muppetmaster, Moderator, Support

Ports forwarded, but no incoming calls?

Postby zerohedges » Thu Jan 21, 2016 9:12 am

I having a regular problem with my RasPBX (Asterisk 11.21.0, FreePBX 12.0.76.2) box for incoming calls. Outgoing calls work fine. The RasPBX box is behind NAT (BT Home Hub with ports 5060,5061 and 10000-20000 forwarded. SIP trunk provider is Voipfone.

One of two things happens. Either caller hears American female voice: "The number you have dialled is not in service, please check the number and try again [then Voipfone account number, which is set up as the DID number for the incoming route]"

OR caller hears a British female voice: "Welcome to Voipfone voicemail. The person you have called is currently unavailable [etc...]"

Nothing happens in /var/log/asterisk/full. Not a flicker.

Restarting asterisk fixes the issue temporarily.

Here is the output of sip show peers, which doesn't seem to change regardless of whether incoming calls get through. Local IP is a grandstream IP phone:
Code: Select all
Name/username             Host                                    Dyn Forcerport Comedia    ACL Port     Status      Description                     
201/201                   192.168.1.96                             D  Yes        Yes         A  5060     OK (11 ms)                                   
Voipfone-SIP/[account num]     195.189.XXX.XX                              Yes        Yes            5060     OK (22 ms)                                   
2 sip peers [Monitored: 2 online, 0 offline Unmonitored: 0 online, 0 offline]


This may be unrelated, but I am also getting these warnings in the logs:
Code: Select all
[2016-01-21 12:02:33] WARNING[18290] chan_sip.c: Timeout on [32-length hex] on non-critical invite transaction.

I have read on one forum that this can be caused by bad NAT/router setup but on another that they are caused by botnets attacking SIP. We do get IPs being banned by Fail2Ban.

Pointers greatly appreciated! :D
zerohedges
Newsterisk
 
Posts: 2
Joined: Thu Jan 21, 2016 8:46 am

Re: Ports forwarded, but no incoming calls?

Postby zerohedges » Fri Jan 22, 2016 10:08 am

May have found the problem: a 'subscriber absent' error, even though 'sip show peers' shows both the SIP trunk and my Grandstream IP phone as 'OK'.

I am not even sure which has gone away. Is the 'subscriber' here the SIP trunk or the IP phone?

Anyway, with an incoming call from the telephone network, looking in Asterisk CLI with SIP debugging on first we get ...

Code: Select all
[2016-01-22 14:48:19] WARNING[8654][C-0000004b]: app_dial.c:2437 dial_exec_full: Unable to create channel of type 'SIP' (cause 20 - Subscriber absent)


Followed by ...
Code: Select all
<--- Reliably Transmitting (NAT) to <SIP trunk IP>:5060 --->
SIP/2.0 503 Service Unavailable
Via: SIP/2.0/UDP <SIP trunk IP>:5060;branch=z9hG4bK1f072430;received=<SIP trunk IP>;rport=5060
From: "<incoming phone number>" <sip:<incoming phone number>@<SIP trunk IP>>;tag=VF1a652684b9859ff8360c4cea3a26
To: <sip:<SIP trunk login username>@<RasPBX box IP>:5060>;tag=as0784267c
Call-ID: VFb6acdb1dd88c7542e38213093ecb89@voipfone
CSeq: 102 INVITE
Server: FPBX-12.0.76.2(11.20.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
X-Asterisk-HangupCause: Subscriber absent
X-Asterisk-HangupCauseCode: 20
Content-Length: 0
<------------>


Full log below:

Code: Select all
<------------->
--- (12 headers 0 lines) ---
[2016-01-22 14:48:17] NOTICE[1403]: chan_sip.c:23710 handle_response_register: Outbound Registration: Expiry for sip.voipfone.net is 60 sec (Scheduling reregistration in 45 s)
Really destroying SIP dialog '68adf7f8405b43236c9345725f7880eb@127.0.0.1' Method: REGISTER

<--- SIP read from UDP:<SIP trunk IP>:5060 --->
INVITE sip:<SIP trunk login username>@<RasPBX box IP>:5060 SIP/2.0
Via: SIP/2.0/UDP <SIP trunk IP>:5060;branch=z9hG4bK1f072430;rport
From: "<incoming phone number>" <sip:<incoming phone number>@<SIP trunk IP>>;tag=VF1a652684b9859ff8360c4cea3a26
To: <sip:<SIP trunk login username>@<RasPBX box IP>:5060>
Contact: <sip:<incoming phone number>@<SIP trunk IP>:5060>
Call-ID: VFb6acdb1dd88c7542e38213093ecb89@voipfone
CSeq: 102 INVITE
User-Agent: Voipfone Sip Network
Date: Fri, 22 Jan 2016 14:48:19 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER
Content-Type: application/sdp
Content-Length: 335

v=0
o=root 3300 3300 IN IP4 <SIP trunk IP>
s=session
c=IN IP4 <SIP trunk IP>
t=0 0
m=audio 14260 RTP/AVP 8 2 97 3 110 101
a=sendrecv
a=rtpmap:8 PCMA/8000
a=rtpmap:2 G726-32/8000
a=rtpmap:97 iLBC/8000
a=rtpmap:3 GSM/8000
a=rtpmap:110 speex/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
<------------->
--- (12 headers 15 lines) ---
Sending to <SIP trunk IP>:5060 (NAT)
Sending to <SIP trunk IP>:5060 (NAT)
Using INVITE request as basis request - VFb6acdb1dd88c7542e38213093ecb89@voipfone
Found peer 'Voipfone-SIP' for '<incoming phone number>' from <SIP trunk IP>:5060
Found RTP audio format 8
Found RTP audio format 2
Found RTP audio format 97
Found RTP audio format 3
Found RTP audio format 110
Found RTP audio format 101
Found audio description format PCMA for ID 8
Found audio description format G726-32 for ID 2
Found audio description format iLBC for ID 97
Found audio description format GSM for ID 3
Found audio description format speex for ID 110
Found audio description format telephone-event for ID 101
Capabilities: us - (alaw), peer - audio=(gsm|alaw|g726|speex|ilbc)/video=(nothing)/text=(nothing), combined - (alaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x1 (telephone-event|), combined - 0x1 (telephone-event|)
Peer audio RTP is at port <SIP trunk IP>:14260
Looking for <SIP trunk login username> in from-pstn (domain <RasPBX box IP>)
list_route: hop: <sip:<incoming phone number>@<SIP trunk IP>:5060>

<--- Transmitting (NAT) to <SIP trunk IP>:5060 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP <SIP trunk IP>:5060;branch=z9hG4bK1f072430;received=<SIP trunk IP>;rport=5060
From: "<incoming phone number>" <sip:<incoming phone number>@<SIP trunk IP>>;tag=VF1a652684b9859ff8360c4cea3a26
To: <sip:<SIP trunk login username>@<RasPBX box IP>:5060>
Call-ID: VFb6acdb1dd88c7542e38213093ecb89@voipfone
CSeq: 102 INVITE
Server: FPBX-12.0.76.2(11.20.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: <sip:<SIP trunk login username>@<RasPBX box IP>:5060>
Content-Length: 0


<------------>
[2016-01-22 14:48:19] WARNING[8654][C-0000004b]: func_channel.c:538 func_channel_read: Unknown or unavailable item requested: 'reversecharge'
[2016-01-22 14:48:19] WARNING[8654][C-0000004b]: func_callerid.c:917 callerpres_read: CALLERPRES is deprecated.  Use CALLERID(name-pres) or CALLERID(num-pres) instead.
Really destroying SIP dialog '447afe4068a1fa7f350eda9f0fc80d06@127.0.0.1:5060' Method: INVITE
[2016-01-22 14:48:19] WARNING[8654][C-0000004b]: app_dial.c:2437 dial_exec_full: Unable to create channel of type 'SIP' (cause 20 - Subscriber absent)
[2016-01-22 14:48:19] WARNING[8654][C-0000004b]: translate.c:338 framein: no samples for alawtolin

<--- Reliably Transmitting (NAT) to <SIP trunk IP>:5060 --->
SIP/2.0 503 Service Unavailable
Via: SIP/2.0/UDP <SIP trunk IP>:5060;branch=z9hG4bK1f072430;received=<SIP trunk IP>;rport=5060
From: "<incoming phone number>" <sip:<incoming phone number>@<SIP trunk IP>>;tag=VF1a652684b9859ff8360c4cea3a26
To: <sip:<SIP trunk login username>@<RasPBX box IP>:5060>;tag=as0784267c
Call-ID: VFb6acdb1dd88c7542e38213093ecb89@voipfone
CSeq: 102 INVITE
Server: FPBX-12.0.76.2(11.20.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
X-Asterisk-HangupCause: Subscriber absent
X-Asterisk-HangupCauseCode: 20
Content-Length: 0


<------------>

<--- SIP read from UDP:<SIP trunk IP>:5060 --->
ACK sip:<SIP trunk login username>@<RasPBX box IP>:5060 SIP/2.0
Via: SIP/2.0/UDP <SIP trunk IP>:5060;branch=z9hG4bK1f072430;rport
From: "<incoming phone number>" <sip:<incoming phone number>@<SIP trunk IP>>;tag=VF1a652684b9859ff8360c4cea3a26
To: <sip:<SIP trunk login username>@<RasPBX box IP>:5060>;tag=as0784267c
Contact: <sip:<incoming phone number>@<SIP trunk IP>:5060>
Call-ID: VFb6acdb1dd88c7542e38213093ecb89@voipfone
CSeq: 102 ACK
User-Agent: Voipfone Sip Network
Content-Length: 0

<------------->
--- (9 headers 0 lines) ---
Really destroying SIP dialog 'VFb6acdb1dd88c7542e38213093ecb89@voipfone' Method: ACK
zerohedges
Newsterisk
 
Posts: 2
Joined: Thu Jan 21, 2016 8:46 am


Return to Asterisk Support

Who is online

Users browsing this forum: Google [Bot] and 1 guest