]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res_agi: Prevent run_agi from eating frames it shouldn't 89/2689/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:12 +0000 (09:56 -0500)
commita2249031ef4fe32db3cb8a2885fa29868fad0956
treef605a1bb81fb9195458ab7c7de2d7b13b2b67778
parent15ebfb181d5ed72a48cfad6890e094db32897287
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