Other side keeps ringing after I hangup

I’m only just beginning to discover Asterisk/FreePBX, and already running into something strange.

Installation itself was not too difficult, in fact I’ve done it twice already: once from the FreePBX distro on a virtual PC, and once from RasPBX on a Raspberry PI. Both show this issue.

Next step - set up two extensions: check.
Then connect two phones: check.
One phone calls the other, the other one rings, I pick it up, and I can talk to myself: check.

The weird thing happens when one phone rings the other, and then hangs up before the call is answered.
When Phone2 calls Phone1 and then hangs up, Phone1 stops ringing as expected.
But when Phone1 calls Phone2 and then hangs up, Phone2 keeps ringing, and when I pick it up then it actually shows that it’s connected (though there’s no sound, obviously).

Bits from the log.
Normal case:

[2013-02-27 19:01:53] VERBOSE[12543][C-00000012] netsock2.c: == Using SIP RTP TOS bits 184 [2013-02-27 19:01:53] VERBOSE[12543][C-00000012] netsock2.c: == Using SIP RTP CoS mark 5 [2013-02-27 19:01:53] VERBOSE[12543][C-00000012] app_dial.c: -- Called SIP/101 [2013-02-27 19:01:53] VERBOSE[12543][C-00000012] app_dial.c: -- Connected line update to SIP/102-00000011 prevented. [2013-02-27 19:01:53] VERBOSE[12543][C-00000012] app_dial.c: -- SIP/101-00000012 is ringing [2013-02-27 19:01:53] VERBOSE[12543][C-00000012] app_dial.c: -- SIP/101-00000012 is ringing [2013-02-27 19:02:01] VERBOSE[12543][C-00000012] app_macro.c: == Spawn extension (macro-dial-one, s, 42) exited non-zero on 'SIP/102-00000011' in macro 'dial-one' [2013-02-27 19:02:01] VERBOSE[12543][C-00000012] app_macro.c: == Spawn extension (macro-exten-vm, s, 7) exited non-zero on 'SIP/102-00000011' in macro 'exten-vm' [2013-02-27 19:02:01] VERBOSE[12543][C-00000012] pbx.c: == Spawn extension (from-internal, 101, 2) exited non-zero on 'SIP/102-00000011' [2013-02-27 19:02:01] VERBOSE[12543][C-00000012] pbx.c: -- Executing [h@from-internal:1] Hangup("SIP/102-00000011", "") in new stack [2013-02-27 19:02:01] VERBOSE[12543][C-00000012] pbx.c: == Spawn extension (from-internal, h, 1) exited non-zero on 'SIP/102-00000011'
Weird case:
[2013-02-27 18:50:24] VERBOSE[12445][C-00000010] netsock2.c: == Using SIP RTP TOS bits 184 [2013-02-27 18:50:24] VERBOSE[12445][C-00000010] netsock2.c: == Using SIP RTP CoS mark 5 [2013-02-27 18:50:24] VERBOSE[12445][C-00000010] app_dial.c: -- Called SIP/102 [2013-02-27 18:50:24] VERBOSE[12445][C-00000010] app_dial.c: -- Connected line update to SIP/101-0000000d prevented. [2013-02-27 18:50:24] VERBOSE[12445][C-00000010] app_dial.c: -- SIP/102-0000000e is ringing [2013-02-27 18:50:52] VERBOSE[12445][C-00000010] app_dial.c: -- Connected line update to SIP/101-0000000d prevented. [2013-02-27 18:50:52] VERBOSE[12445][C-00000010] app_dial.c: -- SIP/102-0000000e answered SIP/101-0000000d [2013-02-27 18:51:09] VERBOSE[12445][C-00000010] pbx.c: -- Executing [h@macro-dial-one:1] Macro("SIP/101-0000000d", "hangupcall,") in new stack [2013-02-27 18:51:09] VERBOSE[12445][C-00000010] pbx.c: -- Executing [s@macro-hangupcall:1] GotoIf("SIP/101-0000000d", "1?theend") in new stack [2013-02-27 18:51:09] VERBOSE[12445][C-00000010] pbx.c: -- Goto (macro-hangupcall,s,3) [2013-02-27 18:51:09] VERBOSE[12445][C-00000010] pbx.c: -- Executing [s@macro-hangupcall:3] ExecIf("SIP/101-0000000d", "0?Set(CDR(recordingfile)=)") in new stack [2013-02-27 18:51:09] VERBOSE[12445][C-00000010] pbx.c: -- Executing [s@macro-hangupcall:4] Hangup("SIP/101-0000000d", "") in new stack [2013-02-27 18:51:09] VERBOSE[12445][C-00000010] app_macro.c: == Spawn extension (macro-hangupcall, s, 4) exited non-zero on 'SIP/101-0000000d' in macro 'hangupcall' [2013-02-27 18:51:09] VERBOSE[12445][C-00000010] pbx.c: == Spawn extension (macro-dial-one, h, 1) exited non-zero on 'SIP/101-0000000d' [2013-02-27 18:51:10] WARNING[3062] chan_sip.c: Retransmission timeout reached on transmission [email protected] for seqno 4126 (Critical Response) -- See https://wiki.asterisk.org/wiki/display/AST/SIP+Retransmissions Packet timed out after 17858ms with no response [2013-02-27 18:51:10] WARNING[3062] chan_sip.c: Hanging up call [email protected] - no reply to our critical packet (see https://wiki.asterisk.org/wiki/display/AST/SIP+Retransmissions). [2013-02-27 18:51:10] VERBOSE[12445][C-00000010] app_macro.c: == Spawn extension (macro-dial-one, s, 42) exited non-zero on 'SIP/101-0000000d' in macro 'dial-one' [2013-02-27 18:51:10] VERBOSE[12445][C-00000010] app_macro.c: == Spawn extension (macro-exten-vm, s, 7) exited non-zero on 'SIP/101-0000000d' in macro 'exten-vm' [2013-02-27 18:51:10] VERBOSE[12445][C-00000010] pbx.c: == Spawn extension (from-internal, 102, 2) exited non-zero on 'SIP/101-0000000d'
Is this a bug in either of my phones, or something I can fix in FreePBX or Asterisk ? (Phone1 is a spare Alcatel 918D without any SIMs, connected to my home network over Wifi. Phone2 is a Gigaset N300A-IP, connected over ethernet.)

I found the answer myself: it is a bug in the android.
I disabled the built in Voip account and installed a softphone (3cxphone), and now it behaves normally.