[Home]

Summary:ASTERISK-13377: Externalivr not sending 'H' event on channel hangup.
Reporter:Chris Maciejewski (chris-mac)Labels:
Date Opened:2009-01-15 08:20:46.000-0600Date Closed:2009-02-09 11:47:28.000-0600
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Applications/app_externalivr
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) extensions.conf
( 1) full.log
( 2) sip.conf
Description:How to reproduce:

extensions.conf
-------%<--------------------------
exten => _X.,1,Answer()
exten => _X.,n,ExternalIVR(/enc/etc/asterisk/ivr/test.sh)
exten => _X.,n,Hangup()
----------%<------------------------

test.sh
-----%<------------------------------------
#!/bin/bash
echo "S,/var/lib/asterisk/sounds/demo-congrats"
while true; do
 read stdin
 echo $stdin >> /tmp/ivr.log

 if [ "${stdin:0:1}" = "H" ]; then
   exit;
 fi
done
-----%<-------------------------------

Run:
$ tail -f /tmp/ivr.log

dial with any SIP phone into IVR. DTMF can be seen in /tmp/ivr.log just fine. But when phone disconnects, no 'H' event is sent and test.sh continues to run for ever.
Comments:By: David Vossel (dvossel) 2009-01-21 12:21:43.000-0600

Tested this using trunk and rev 16551.  Wasn't able to reproduce the issue in either of them.  Are their any specific steps you're taking to achieve this that I may not be aware of?

----------ivr.log output---------
T,1232552165
5,1232552179
6,1232552181
H,1232552185
---------------------------------

By: Chris Maciejewski (chris-mac) 2009-01-22 05:03:29.000-0600

dvossel: I can confirm this bug doesn't exist in trunk.

It does exist in 1.6.1 branch.



By: David Vossel (dvossel) 2009-01-23 11:09:33.000-0600

chris-mac: sorry, i ment rev 16551 in 1.6.1 in first note. tested this again in 1.6.1 rev 170447 as well and am not able to reproduce your results.  

------------ivr.log------
T,1232729550
1,1232729555
2,1232729555
3,1232729556
H,1232729561
---------------------------

By: Russell Bryant (russell) 2009-01-26 22:15:57.000-0600

chris-mac, could you show us the console output of the call you make to run this test?  Maybe it has to do with the channel technology you're using being different than what dvossel has in his setup.

By: Chris Maciejewski (chris-mac) 2009-01-27 01:55:14.000-0600

russell and dvossel: Sorry for not updating this bug recently. I was busy fixing dead RAIDs and restoring data in my server room last few days.

I will post console output and attach full debug log by the end of this week.

Best regards,
Chris

By: Russell Bryant (russell) 2009-01-27 07:22:37.000-0600

Thanks for the update.  Be sure to update to the latest revision before your next test.

By: Chris Maciejewski (chris-mac) 2009-01-28 16:14:08.000-0600

Please find attached full.log, sip.conf and extensions.conf files.

Should you still have problems reproducing this issue, I am OK to give you ssh access to my Asterisk box. Please send me an email to chris at wima dot co dot uk, and I will reply with login details.

By: David Vossel (dvossel) 2009-02-06 16:10:20.000-0600

i've reproduced the issue and am looking into it.

By: Digium Subversion (svnbot) 2009-02-09 11:26:04.000-0600

Repository: asterisk
Revision: 174325

U   trunk/apps/app_externalivr.c

------------------------------------------------------------------------
r174325 | dvossel | 2009-02-09 11:26:04 -0600 (Mon, 09 Feb 2009) | 9 lines

Fixes issue with hangups not being sent and external process never terminating.

The ignore_hangup, run_dead, and noanswer flags were never initilized to zero causing hangups to never be issued.  If the external script expects to be notified of a hangup and never receives one, it runs indefinitely.

(closes issue ASTERISK-13377)
Reported by: chris-mac
Tested by: dvossel


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

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

By: Digium Subversion (svnbot) 2009-02-09 11:47:27.000-0600

Repository: asterisk
Revision: 174330

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

------------------------------------------------------------------------
r174330 | dvossel | 2009-02-09 11:47:27 -0600 (Mon, 09 Feb 2009) | 15 lines

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

........
 r174325 | dvossel | 2009-02-09 11:26:02 -0600 (Mon, 09 Feb 2009) | 9 lines
 
 Fixes issue with hangups not being sent and external process never terminating.
 
 The ignore_hangup, run_dead, and noanswer flags were never initilized to zero causing hangups to never be issued.  If the external script expects to be notified of a hangup and never receives one, it runs indefinitely.
 
 (closes issue ASTERISK-13377)
 Reported by: chris-mac
 Tested by: dvossel
........

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

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