]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res_agi: Prevent run_agi from eating frames it shouldn't 90/2690/3
authorGeorge Joseph <gjoseph@digium.com>
Fri, 22 Apr 2016 22:53:23 +0000 (16:53 -0600)
committerGeorge Joseph <gjoseph@digium.com>
Mon, 25 Apr 2016 14:56:24 +0000 (09:56 -0500)
commit5cbd4b97998f56d4155fee7d8f7aaaeab10df760
tree95ab4e378386bf0a1652340951f9bbc099482d01
parent7a18ebaa0c3fa93c7bc68ed0681df0e4c8127805
res_agi:  Prevent run_agi from eating frames it shouldn't

The run_agi function is eating control frames when it shouldn't be. This is
causing issues when an AGI is run from CONNECTED_LINE_SEND_SUB in a blond
transfer.

Alice calls Bob. Bob attended transfers to Charlie but hangs up before Charlie
answers.

Alice gets the COLP UPDATE indicating Charlie but Charlie never gets an UPDATE
and is left thinking he's connected to Bob.

In this case, when CONNECTED_LINE_SEND_SUB runs on Alice's channel and it calls
an AGI, the extra eaten frames prevent CONNECTED_LINE_SEND_SUB from running on
Charlie's channel.

The fix was to accumulate deferrable frames in the "forever" loop instead of
dropping them, and re-queue them just before running the actual agi command
or exiting.

ASTERISK-25951 #close

Change-Id: I0f4bbfd72fc1126c2aaba41da3233a33d0433645
res/res_agi.c