BYE is received late

Home » Asterisk Users » BYE is received late
Asterisk Users No Comments


I’m having an issue with all my calls going out my SIP provider. I’m using
a softphone registering to a local Asterisk PBX (I’m using Jitsi by the way – it’s great and actively growing).

I register as extension 4053 to asterisk server at (alias IP –
real IP addr. is and dial a phone number that is routed via
an Internet SIP provider.
The call is correctly established and conversation is OK. If the local softphone user
hangs up first, the remote end is also disconnected immediately.
However, if the remote party hangs up first, the local caller is not
immediately disconnected.
That, of course, is undesirable.

I’d like to understand why the call isn’t automatically hung up and fix it.

I’m supposing that Jitsi isn’t receiving a BYE as expected in a correct SIP
transaction (or BYE is arriving very late).
I don’t know why though.

Here’s my network setup:

Softphone asterisk extension 4053 at
Asterisk eth0: but softphone registers to the alias/floating IP
for failover setup
Asterisk eth1:
Asterisk default gateway:
-> Asterisk accesses Internet via eth1 ( is a DSL modem/router)

I did a tcpdump on the asterisk server while calling from the local softphone as so:
tcpdump -s0 -X -n -w asterisk.cap -i eth0 host

It’s here:

Here’s the full session (softphone waits 2 minutes until it finally hangs up):

Asterisk seems to send BYE to the softphone after 120 seconds since the remote party actually hung up…

A packet dump on eth1 during the call also shows the BYE message coming in from the SIP provider:

I’m almost certain the remote SIP provider sends BYE in time because earlier
today I tested by connecting the softphone directly to the SIP provider and going out
the same DSL line (thus removing Asterisk from the equation). ie. I placed a laptop with Jitsi in the same subnet and used the default gateway (just like
Asterisk). All went well.
I also setup my Jitsi laptop within the subnet (just like my
Asterisk client setup) but connected directly to the SIP provider (without
going through Asterisk). In this case the call ended as expected (OK).
So I guess that something’s wrong with my Asterisk configuration. Both my softphone and network configuration *should* be OK.

However, it may have something to do with my Asterisk eth0/eth1 setup but I don’t see what.

Any ideas/suggestions?