[asterisk-users] MeetMe through DeadAGI has changed to return -1 on Hangup

Hadar Pedhazur hadar at unorthodox.com
Mon Jul 30 12:30:31 CDT 2007


I have a "support call" AGI script that has been working 
flawlessly for a couple of years now. It dumps the customer into a 
MeetMe conference room, then dials a bunch of support engineers, 
and connects anyone who accepts the call into the conference room.

The conference room is recorded. After the support call is over, 
the recording is emailed to a list for quality control, etc.

It stopped working correctly on Jun 25th. Roughly on that date, I 
upgraded to Asterisk 1.2.20 (I'm now on 1.2.23, and it hasn't 
worked correctly on any version since 1.2.19).

What happens now is that when the MeetMe is exited normally (all 
participants hang up), the AGI script simply stops executing. I 
see no error messages on the CLI. I turned on "agi debug", and I 
see that MeetMe is returning "res=-1". That is not supposed to 
happen with DeadAGI (if I understand correctly), and it didn't 
used to happen.

If I exit the MeetMe with the "#", then I correctly get "res=0", 
and the script indeed continues to process correctly.

It seems to me that since 1.2.20, and continuing through today's 
1.2.23, DeadAGI is behaving like AGI on a hangup of MeetMe.

Can anyone else confirm this, and if so, let me know what I can do 
to revert it? This is the entire diff of the current app_meetme.c 
with the one from 1.2.19, and it seems too innocuous to be the 
culprit, but of course, it _is_ a hangup, so perhaps it's as 
simple as reverting this one change?!?

[root at asterisk asterisk]# diff /usr/src/asterisk/apps/app_meetme.c 
/usr/src/asterisk-1.2.19/apps/app_meetme.c
40c40
< ASTERISK_FILE_VERSION(__FILE__, "$Revision: 69894 $")
---
 > ASTERISK_FILE_VERSION(__FILE__, "$Revision: 59360 $")
1299,1302d1298
<                       /* If the channel wants to be hung up, 
hang it up */
<                       if (ast_check_hangup(chan))
<                               break;
<

And here is the entire diff from res_agi.c:

[root at asterisk asterisk]# diff res/res_agi.c 
/usr/src/asterisk-1.2.19/res/res_agi.c
44c44
< ASTERISK_FILE_VERSION(__FILE__, "$Revision: 71656 $")
---
 > ASTERISK_FILE_VERSION(__FILE__, "$Revision: 54771 $")
572c572,579
<       ast_playstream(fs);
---
 >       res = ast_playstream(fs);
 >       if (res) {
 >               fdprintf(agi->fd, "200 result=%d endpos=%ld\n", 
res, sample_offset);
 >               if (res >= 0)
 >                       return RESULT_SHOWUSAGE;
 >               else
 >                       return RESULT_FAILURE;
 >       }
625c632,639
<         ast_playstream(fs);
---
 >         res = ast_playstream(fs);
 >         if (res) {
 >                 fdprintf(agi->fd, "200 result=%d endpos=%ld\n", 
res, sample_offset);
 >                 if (res >= 0)
 >                         return RESULT_SHOWUSAGE;
 >                 else
 >                         return RESULT_FAILURE;
 >         }
1106c1120
<       return res >= 0 ? RESULT_SUCCESS : RESULT_FAILURE;
---
 >       return res;



Thanks in advance!



More information about the asterisk-users mailing list