[Home]

Summary:ASTERISK-13717: [patch] Ghost calls with queues and spa942 and 922
Reporter:latinsud (latinsud)Labels:
Date Opened:2009-03-09 09:17:26Date Closed:2009-07-08 14:28:09
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Applications/app_queue
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) extensions.conf
( 1) queue_announce_ghost_call.diff
( 2) queue_announce_ghost_call2.diff
( 3) queues.conf
( 4) sip.conf
( 5) sipdebug.log
Description:I am testing a simple static queue setup and i often get ghost calls (right after the caller hangs up before anyone has answered) on my linksys phones (but not on x-lite).

I also get these errors:
channel.c: ast_prod: Prodding channel ... failed
chan_sip.c: handle_response: Remote host can't match request CANCEL to call ...

To reproduce it you have to call and be placed in que, noone answers, let the "periodic-announce" start playing and then hangup.

I see a 2 weird things happen (imho):
- Right after caller hangs, Asterisk sends an INVITE and immediately a CANCEL. Imho it shouldn't send any of them.
- Phone returns a "481 call does not exist".

****** ADDITIONAL INFORMATION ******

extensions.conf:
  exten => 1999,n,Queue(myQueue,t,,,300)

queues.conf:
[general]
persistentmembers = yes
autofill = yes
monitor-type = MixMonitor
[myQueue]
timeout=5
ringinuse=no
periodic-announce-frequency=3
periodic-announce = espere-o-buzon
strategy = ringall
announce-holdtime = no
member => sip/1001

Sniffed SIP traffic:
1 0.000000 10.0.2.7 10.0.0.27 SIP/SDP Request: INVITE sip:1001@10.0.0.27:5062, with session description
2 0.008992 10.0.0.27 10.0.2.7 SIP Status: 100 Trying
3 0.026445 10.0.0.27 10.0.2.7 SIP Status: 180 Ringing

4 3.080033 10.0.2.7 10.0.0.27 SIP Request: CANCEL sip:1001@10.0.0.27:5062
5 3.089047 10.0.0.27 10.0.2.7 SIP Status: 487 Request Terminated
6 3.089111 10.0.2.7 10.0.0.27 SIP Request: ACK sip:1001@10.0.0.27:5062
7 3.091310 10.0.0.27 10.0.2.7 SIP Status: 200 OK

8 9.725839 10.0.2.7 10.0.0.27 SIP/SDP Request: INVITE sip:1001@10.0.0.27:5062, with session description
9 9.733975 10.0.0.27 10.0.2.7 SIP Status: 100 Trying
10 9.734034 10.0.2.7 10.0.0.27 SIP Request: CANCEL sip:1001@10.0.0.27:5062
11 9.749519 10.0.0.27 10.0.2.7 SIP Status: 481 Call Leg/Transaction Does Not Exist
12 9.758557 10.0.0.27 10.0.2.7 SIP Status: 180 Ringing

Tested on:
- Server1: Ubuntu 8.04.1 / Kernel 2.6.24-21-server / Asterisk SVN-trunk-r180641
- Server2: Fedora Core 6 / Kernel 2.6.20-1.2933.fc6 / Asterisk 1.4.23.1
- Phone1: SPA942 FW: 5.1.15(a)
- Phone2: SPA922 FW: 5.2.2(a)
Comments:By: latinsud (latinsud) 2009-03-09 12:25:56

Also tried FW 6.1.3(a) on the SPA942

By: Enrique Medrano (barboles) 2009-03-19 04:18:56

Hello, I have the same problem. It's very important for me to solve this, because clients thinks that calls are being lost.

By: Enrique Medrano (barboles) 2009-03-19 04:30:42

a little more of information. It happens with phones aastra 55i and others. The version of Asterisk is  1.4.20.1

By: latinsud (latinsud) 2009-04-07 20:26:28

I just sumbitted a patch.

The problem was in say_periodic_announcement().
The logic of the function is a bit tricky and it had a bug. If play_file() returned a negative value we were returning 0 instead of the said value.

Please use the later patch, which is simpler but equivalent.



By: Enrique Medrano (barboles) 2009-04-13 10:09:03

What is the version of Asterisk which have this patch?

By: latinsud (latinsud) 2009-04-13 12:15:52

It's made from SVN.

It should fix properly 1.4, 1.6 and SVN versions.



By: Digium Subversion (svnbot) 2009-07-08 14:26:14

Repository: asterisk
Revision: 205349

U   branches/1.4/apps/app_queue.c

------------------------------------------------------------------------
r205349 | mmichelson | 2009-07-08 14:26:13 -0500 (Wed, 08 Jul 2009) | 14 lines

Prevent phantom calls to queue members.

If a caller were to hang up while a periodic announcement or position
were being said, the return value for those functions would incorrectly
indicate that the caller was still in the queue. With these changes,
the problem does not occur.

(closes issue ASTERISK-13717)
Reported by: latinsud
Patches:
     queue_announce_ghost_call2.diff uploaded by latinsud (license 745)
 (with small modification from me)


------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=205349

By: Digium Subversion (svnbot) 2009-07-08 14:26:56

Repository: asterisk
Revision: 205350

_U  trunk/
U   trunk/apps/app_queue.c

------------------------------------------------------------------------
r205350 | mmichelson | 2009-07-08 14:26:56 -0500 (Wed, 08 Jul 2009) | 20 lines

Merged revisions 205349 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
 r205349 | mmichelson | 2009-07-08 14:26:13 -0500 (Wed, 08 Jul 2009) | 14 lines
 
 Prevent phantom calls to queue members.
 
 If a caller were to hang up while a periodic announcement or position
 were being said, the return value for those functions would incorrectly
 indicate that the caller was still in the queue. With these changes,
 the problem does not occur.
 
 (closes issue ASTERISK-13717)
 Reported by: latinsud
 Patches:
       queue_announce_ghost_call2.diff uploaded by latinsud (license 745)
   (with small modification from me)
........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=205350

By: Digium Subversion (svnbot) 2009-07-08 14:27:27

Repository: asterisk
Revision: 205351

_U  branches/1.6.0/
U   branches/1.6.0/apps/app_queue.c

------------------------------------------------------------------------
r205351 | mmichelson | 2009-07-08 14:27:26 -0500 (Wed, 08 Jul 2009) | 27 lines

Merged revisions 205350 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
 r205350 | mmichelson | 2009-07-08 14:26:55 -0500 (Wed, 08 Jul 2009) | 20 lines
 
 Merged revisions 205349 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.4
 
 ........
   r205349 | mmichelson | 2009-07-08 14:26:13 -0500 (Wed, 08 Jul 2009) | 14 lines
   
   Prevent phantom calls to queue members.
   
   If a caller were to hang up while a periodic announcement or position
   were being said, the return value for those functions would incorrectly
   indicate that the caller was still in the queue. With these changes,
   the problem does not occur.
   
   (closes issue ASTERISK-13717)
   Reported by: latinsud
   Patches:
         queue_announce_ghost_call2.diff uploaded by latinsud (license 745)
     (with small modification from me)
 ........
................

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=205351

By: Digium Subversion (svnbot) 2009-07-08 14:27:50

Repository: asterisk
Revision: 205352

_U  branches/1.6.1/
U   branches/1.6.1/apps/app_queue.c

------------------------------------------------------------------------
r205352 | mmichelson | 2009-07-08 14:27:50 -0500 (Wed, 08 Jul 2009) | 27 lines

Merged revisions 205350 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
 r205350 | mmichelson | 2009-07-08 14:26:55 -0500 (Wed, 08 Jul 2009) | 20 lines
 
 Merged revisions 205349 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.4
 
 ........
   r205349 | mmichelson | 2009-07-08 14:26:13 -0500 (Wed, 08 Jul 2009) | 14 lines
   
   Prevent phantom calls to queue members.
   
   If a caller were to hang up while a periodic announcement or position
   were being said, the return value for those functions would incorrectly
   indicate that the caller was still in the queue. With these changes,
   the problem does not occur.
   
   (closes issue ASTERISK-13717)
   Reported by: latinsud
   Patches:
         queue_announce_ghost_call2.diff uploaded by latinsud (license 745)
     (with small modification from me)
 ........
................

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=205352

By: Digium Subversion (svnbot) 2009-07-08 14:28:08

Repository: asterisk
Revision: 205353

_U  branches/1.6.2/
U   branches/1.6.2/apps/app_queue.c

------------------------------------------------------------------------
r205353 | mmichelson | 2009-07-08 14:28:08 -0500 (Wed, 08 Jul 2009) | 27 lines

Merged revisions 205350 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
 r205350 | mmichelson | 2009-07-08 14:26:55 -0500 (Wed, 08 Jul 2009) | 20 lines
 
 Merged revisions 205349 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.4
 
 ........
   r205349 | mmichelson | 2009-07-08 14:26:13 -0500 (Wed, 08 Jul 2009) | 14 lines
   
   Prevent phantom calls to queue members.
   
   If a caller were to hang up while a periodic announcement or position
   were being said, the return value for those functions would incorrectly
   indicate that the caller was still in the queue. With these changes,
   the problem does not occur.
   
   (closes issue ASTERISK-13717)
   Reported by: latinsud
   Patches:
         queue_announce_ghost_call2.diff uploaded by latinsud (license 745)
     (with small modification from me)
 ........
................

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=205353