<div dir="ltr"><div>Hi</div><div> </div><div>Our application makes use of long-running calls with a lot of diaplan transfers to bridge them to other calls, put them on hold etc. We've noticed a slow down in performance (high CPU, audio dropped, delayed) after several hours. I can reproduce it with some dialplan that does 1000 transfers: </div>
<div><br><extension name="test_transfer"><br> <condition field="destination_number" expression="^test_transfer$"><br> <action application="set" data="max_forwards=9999"/><br>
<action application="transfer" data="test_transfer_999"/><br> </condition><br></extension></div><div><extension name="test_transfer_0" continue="false"><br>
<condition field="destination_number" expression="^test_transfer_0$"><br> <action application="hangup"/><br> </condition><br></extension></div><div><extension name="test_transfer_n"><br>
<condition field="destination_number" expression="^test_transfer_(\d+)$"><br> <!--<action application="info"/>--><br> <action application="transfer" data="test_transfer_${expr $1-1}"/><br>
</condition><br></extension><br></div><div>and then</div><div> </div><div>originate user/1000 test_transfer XML blah</div><div> </div><div>On a Windows laptop (git head) it slows down to more than 1 sec per iteration after it gets past 800, on a bigger Linux server (FS 1.2.5.1) it gets a bit futher but not much. On a server with an old version (git-1086cba 2011-05-23 22-51-43 -0500) it zips through to the end with no slow down. If you put the info call in you can see that variable_transfer_history is growing, and I think this is the source of the problem - this variable is missing from the older version but the newer ones are apparently appending to it on each iteration which becomes a very expensive operation.</div>
<div> </div><div>I'll raise a Jira. Any suggestion for a workaround? (Apart from rewriting our dialplan!)</div><div> </div><div>David</div><div> </div><div><br> </div></div>