[asterisk-users] outgoing sip calls work; incoming calls fail
listmail at websage.ca
listmail at websage.ca
Sat Oct 10 19:00:18 CDT 2009
On Sun, 11 Oct 2009 01:41:36 +0200
Ivan Stepaniuk <ivan at albafotonica.com> wrote:
> listmail at websage.ca wrote:
> > After running for months without issue I've got a situation where
> > incoming SIP calls to my asterisk server are failing while outbound
> > calls appear to be working as expected.
> >
> > The server is a gateway between my home LAN and a broadband cable
> > connection with a dynamic IP. The gateway runs FreeBSD 7.1 and
> > Asterisk 1.6.0.15 (built from ports) and registers to my ISTP no
> > problem. Outgoing calls can be made successfully and no error
> > messages or warnings are reported by Asterisk.
> >
> > However, incoming calls appear to enter my dialplan as desired and
> > go so far as to start ringing my SIP phone (Grandstream GXP-2000)
> > but drop after two rings. The caller gets a busy tone and that's
> > it. If I answer the call before the two rings I just get a moment
> > of dead air and it drops in the same way.
> >
> > In the asterisk console (and log file) I see these messages at the
> > fail point:
> >
> > [Oct 9 12:42:47] WARNING[1056]: chan_sip.c:2917 retrans_pkt:
> > Maximum retries exceeded on transmission
> > b734bd26-2fae-122d-91a5-653b331e358a for seqno 121440337 (Critical
> > Response) -- See doc/sip-retransmit.txt. [Oct 9 12:42:47]
> > WARNING[1056]: chan_sip.c:2944 retrans_pkt: Hanging up call
> > b734bd26-2fae-122d-91a5-653b331e358a - no reply to our critical
> > packet (see doc/sip-retransmit.txt)
> >
> > Okay, so I verified that my firewall is properly accepting traffic
> > on the range of SIP and RTP ports as specified by my ITSP.
> >
> > After sending them a sip debug trace my provider said this:
> >
> > "It appears that your machine is not receiving replies when it
> > tries to acknowledge the incoming call back to our server. This
> > could be a firewall issue or potentially something else that
> > changed without your knowledge."
> >
> > Furthermore, they suggested I might try registering and connecting
> > directly to their Asterisk using only the Grandstream phone. I tried
> > this and...surprise! Both inbound and outbound calls work fine but
> > leave me without voicemail or any other services my PBX would be
> > providing.
> >
> > Right, so now I'm thinking there must be something wrong with my
> > Asterisk configuration yet I've made no config changes that would
> > account for the sudden (and consistent) incoming call failures.
> >
> > Here's the relevant portions of my sip.conf if it helps (with
> > credentials and ips replaced by Xs):
> >
> > [general]
> > alwaysauthreject=yes
> > dtmfmode=auto
> > disallow=all
> > allow=ulaw
> >
> > register => XXXX:XXXX at XXX.XXX.XXX.XXX:5060
> > register => XXXX:XXXX at XXX.XXX.XXX.XXX:5060
> >
> > [101]
> > type=friend
> > context=websage
> > host=dynamic
> > deny=0.0.0.0/0
> > permit=XXX.XXX.XXX.XXX/24
> > qualify=yes
> > secret=XXXX
> > mailbox=101 at default
> > accountcode=101
> >
>
> Does your asterisk server have two network interfaces, one with a
> private IP address and another one with the public one?
> Did you try adding "canreinvite=no" to your 101 friend sip entry?
> What does the SIP debug say?
>
Thanks for the response! Yes, the server has two interfaces with
private addressing on the LAN side and a dynamically assigned IP on the
public side (which has remained the same throughout this period).
I did try canreinvite=no but it made no apparent difference in
behaviour.
In addition to the sip debug I've also performed tcpdump captures
(using `tcpdump -i <interface-name> -n -s0 -v udp port 5060`) on both
LAN and WAN sides:
On the LAN side I can see the INVITE and OKAY messages which end with a
CANCEL, apparently initiated by the Asterisk gateway.
On the WAN side I can see that my Asterisk gateway is repeatedly
sending OKAY messages in response to the INVITE from my ITSP. I assume
the trouble is that these messages are either not getting back to my
provider or something is blocking the confirmation from them. This more
or less confirms what was seen in the sip debug trace as well.
I've opened up all outbound udp and turned up logging on PF but see no
evidence of any dropped or rejected traffic on my end (except the usual
port scanning and netbios garbage on the outside).
I'm stumped.
GM
--
Greg Maruszeczka
Office: 250.412.9568 || Mobile: 250.886.4577
Skype: websage.ca || GTalk IM: gmarus
http://websage.ca
GnuPG-ID: 0x4309323E, http://pgp.mit.edu
More information about the asterisk-users
mailing list