<div dir="ltr">What are you passing in originateCommand?<div><br></div><div>/b</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Mar 11, 2019 at 8:00 AM Grant Bagdasarian <<a href="mailto:gb@cm.nl">gb@cm.nl</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">





<div lang="EN-US">
<div class="gmail-m_-1665438744675222095WordSection1">
<p class="MsoNormal">Hello,<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">We’ve recently upgraded some of our servers to 1.8.5 and are now occasionally experiencing the error “too many stacked extensions” for some calls.
<u></u><u></u></p>
<p class="MsoNormal">According to Jira this has been patched since 1.8.1, but perhaps this is due to some other scenario being triggered.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">We’re using ESL (bgapi command) to spawn a python script which in turn does an originate.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">See below a snippet of the cli output.<u></u><u></u></p>
<p class="MsoNormal">As far as I can tell, this doesn’t have any real consequences resource consumption wise (CPU and memory), only the disk will get hammered in the case when logging to syslog.<u></u><u></u></p>
<p class="MsoNormal">Also, I haven’t been able to reproduce this myself, but I’m still in the process of doing more testing.
<u></u><u></u></p>
<p class="MsoNormal">It seems to be happening before the call is connected to the destination.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Any ideas how to properly debug this and find out what’s triggering this?<u></u><u></u></p>
<p class="MsoNormal">I’ve tried the following:<u></u><u></u></p>
<ul style="margin-top:0cm" type="disc">
<li class="gmail-m_-1665438744675222095MsoListParagraph" style="margin-left:0cm">Monitoring all ESL events<u></u><u></u></li><li class="gmail-m_-1665438744675222095MsoListParagraph" style="margin-left:0cm">fsctl debug_level 10<u></u><u></u></li><li class="gmail-m_-1665438744675222095MsoListParagraph" style="margin-left:0cm">sofia loglevel all 9<u></u><u></u></li></ul>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">They all output a lot of debugging information, which does get overwhelming.
<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">In a nutshell, this is the flow:<u></u><u></u></p>
<p class="MsoNormal">ESL: <u></u><u></u></p>
<p class="MsoNormal">bgapi pyrun app originateCommand<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Python:<u></u><u></u></p>
<p class="MsoNormal">session = freeswitch.Session(originateCommand)<u></u><u></u></p>
<p class="MsoNormal">session.execute("wait_for_answer")<u></u><u></u></p>
<p class="MsoNormal">session.streamFile(file)<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">2019-03-11 12:58:08.133457 [ALERT] switch_core_session.c:1047 Send signal sofia/local_eth0/XXXXXXXXXX@X.X.X.X:5060 [BREAK]<u></u><u></u></p>
<p class="MsoNormal">2019-03-11 12:58:08.133457 [ERR] switch_ivr.c:904 Error sofia/local_eth0/XXXXXXXXXX@X.X.X.X:5060 too many stacked extensions<u></u><u></u></p>
<p class="MsoNormal">2019-03-11 12:58:08.133457 [ALERT] switch_core_state_machine.c:705 sofia/local_eth0/XXXXXXXXXX@X.X.X.X:5060 session thread wake state: CS_SOFT_EXECUTE!<u></u><u></u></p>
<p class="MsoNormal">2019-03-11 12:58:08.133457 [ERR] switch_ivr.c:904 Error sofia/local_eth0/XXXXXXXXXX@X.X.X.X:5060 too many stacked extensions<u></u><u></u></p>
<p class="MsoNormal">2019-03-11 12:58:08.133457 [ERR] switch_ivr.c:904 Error sofia/local_eth0/XXXXXXXXXX@X.X.X.X:5060 too many stacked extensions<u></u><u></u></p>
<p class="MsoNormal">2019-03-11 12:58:08.133457 [ALERT] switch_core_state_machine.c:701 sofia/local_eth0/XXXXXXXXXX@X.X.X.X:5060 session thread sleep state: CS_SOFT_EXECUTE!<u></u><u></u></p>
<p class="MsoNormal">2019-03-11 12:58:08.153454 [ERR] switch_ivr.c:904 Error sofia/local_eth0/XXXXXXXXXX@X.X.X.X:5060 too many stacked extensions<u></u><u></u></p>
<p class="MsoNormal">2019-03-11 12:58:08.173495 [ERR] switch_ivr.c:904 Error sofia/local_eth0/XXXXXXXXXX@X.X.X.X:5060 too many stacked extensions<u></u><u></u></p>
<p class="MsoNormal">2019-03-11 12:58:08.193453 [ERR] switch_ivr.c:904 Error sofia/local_eth0/XXXXXXXXXX@X.X.X.X:5060 too many stacked extensions<u></u><u></u></p>
<p class="MsoNormal">2019-03-11 12:58:08.213458 [ERR] switch_ivr.c:904 Error sofia/local_eth0/XXXXXXXXXX@X.X.X.X:5060 too many stacked extensions<u></u><u></u></p>
<p class="MsoNormal">2019-03-11 12:58:08.233455 [ERR] switch_ivr.c:904 Error sofia/local_eth0/XXXXXXXXXX@X.X.X.X:5060 too many stacked extensions<u></u><u></u></p>
<p class="MsoNormal">2019-03-11 12:58:08.253489 [ALERT] switch_core_session.c:1047 Send signal sofia/local_eth0/XXXXXXXXXX@X.X.X.X:5060 [BREAK]<u></u><u></u></p>
<p class="MsoNormal">2019-03-11 12:58:08.253489 [ERR] switch_ivr.c:904 Error sofia/local_eth0/XXXXXXXXXX@X.X.X.X:5060 too many stacked extensions<u></u><u></u></p>
<p class="MsoNormal">2019-03-11 12:58:08.253489 [ALERT] switch_core_state_machine.c:705 sofia/local_eth0/XXXXXXXXXX@X.X.X.X:5060 session thread wake state: CS_SOFT_EXECUTE!<u></u><u></u></p>
<p class="MsoNormal">2019-03-11 12:58:08.253489 [ERR] switch_ivr.c:904 Error sofia/local_eth0/XXXXXXXXXX@X.X.X.X:5060 too many stacked extensions<u></u><u></u></p>
<p class="MsoNormal">2019-03-11 12:58:08.253489 [ERR] switch_ivr.c:904 Error sofia/local_eth0/XXXXXXXXXX@X.X.X.X:5060 too many stacked extensions<u></u><u></u></p>
<p class="MsoNormal">2019-03-11 12:58:08.253489 [ALERT] switch_core_state_machine.c:701 sofia/local_eth0/XXXXXXXXXX@X.X.X.X:5060 session thread sleep state: CS_SOFT_EXECUTE!<u></u><u></u></p>
<p class="MsoNormal">2019-03-11 12:58:08.273448 [ERR] switch_ivr.c:904 Error sofia/local_eth0/XXXXXXXXXX@X.X.X.X:5060 too many stacked extensions<u></u><u></u></p>
<p class="MsoNormal">2019-03-11 12:58:08.293454 [ERR] switch_ivr.c:904 Error sofia/local_eth0/XXXXXXXXXX@X.X.X.X:5060 too many stacked extensions<u></u><u></u></p>
<p class="MsoNormal">2019-03-11 12:58:08.313459 [ERR] switch_ivr.c:904 Error sofia/local_eth0/XXXXXXXXXX@X.X.X.X:5060 too many stacked extensions<u></u><u></u></p>
<p class="MsoNormal">2019-03-11 12:58:08.333443 [ERR] switch_ivr.c:904 Error sofia/local_eth0/XXXXXXXXXX@X.X.X.X:5060 too many stacked extensions<u></u><u></u></p>
<p class="MsoNormal">2019-03-11 12:58:08.353456 [ERR] switch_ivr.c:904 Error sofia/local_eth0/XXXXXXXXXX@X.X.X.X:5060 too many stacked extensions<u></u><u></u></p>
<p class="MsoNormal">2019-03-11 12:58:08.373450 [ALERT] switch_core_session.c:1047 Send signal sofia/local_eth0/XXXXXXXXXX@X.X.X.X:5060 [BREAK]<u></u><u></u></p>
<p class="MsoNormal">2019-03-11 12:58:08.373450 [ERR] switch_ivr.c:904 Error sofia/local_eth0/XXXXXXXXXX@X.X.X.X:5060 too many stacked extensions<u></u><u></u></p>
<p class="MsoNormal">2019-03-11 12:58:08.373450 [ALERT] switch_core_state_machine.c:705 sofia/local_eth0/XXXXXXXXXX@X.X.X.X:5060 session thread wake state: CS_SOFT_EXECUTE!<u></u><u></u></p>
<p class="MsoNormal">2019-03-11 12:58:08.373450 [ERR] switch_ivr.c:904 Error sofia/local_eth0/XXXXXXXXXX@X.X.X.X:5060 too many stacked extensions<u></u><u></u></p>
<p class="MsoNormal">2019-03-11 12:58:08.373450 [ERR] switch_ivr.c:904 Error sofia/local_eth0/XXXXXXXXXX@X.X.X.X:5060 too many stacked extensions<u></u><u></u></p>
<p class="MsoNormal">2019-03-11 12:58:08.373450 [ALERT] switch_core_state_machine.c:701 sofia/local_eth0/XXXXXXXXXX@X.X.X.X:5060 session thread sleep state: CS_SOFT_EXECUTE!<u></u><u></u></p>
<p class="MsoNormal">2019-03-11 12:58:08.393440 [ERR] switch_ivr.c:904 Error sofia/local_eth0/XXXXXXXXXX@X.X.X.X:5060 too many stacked extensions<u></u><u></u></p>
<p class="MsoNormal">2019-03-11 12:58:08.413450 [ERR] switch_ivr.c:904 Error sofia/local_eth0/XXXXXXXXXX@X.X.X.X:5060 too many stacked extensions<u></u><u></u></p>
<p class="MsoNormal">2019-03-11 12:58:08.433452 [ERR] switch_ivr.c:904 Error sofia/local_eth0/XXXXXXXXXX@X.X.X.X:5060 too many stacked extensions<u></u><u></u></p>
<p class="MsoNormal">2019-03-11 12:58:08.453461 [ERR] switch_ivr.c:904 Error sofia/local_eth0/<a href="http://00393421615027@10.14.26.10:5060" target="_blank">00393421615027@10.14.26.10:5060</a> too many stacked extensions<u></u><u></u></p>
<p class="MsoNormal">2019-03-11 12:58:08.473474 [ALERT] switch_core_session.c:1047 Send signal sofia/local_eth0/XXXXXXXXXX@X.X.X.X:5060 [BREAK]<u></u><u></u></p>
<p class="MsoNormal">2019-03-11 12:58:08.473474 [ERR] switch_ivr.c:904 Error sofia/local_eth0/XXXXXXXXXX@X.X.X.X:5060 too many stacked extensions<u></u><u></u></p>
<p class="MsoNormal">2019-03-11 12:58:08.473474 [ALERT] switch_core_state_machine.c:705 sofia/local_eth0/XXXXXXXXXX@X.X.X.X:5060 session thread wake state: CS_SOFT_EXECUTE!<u></u><u></u></p>
<p class="MsoNormal">2019-03-11 12:58:08.473474 [ERR] switch_ivr.c:904 Error sofia/local_eth0/XXXXXXXXXX@X.X.X.X:5060 too many stacked extensions<u></u><u></u></p>
<p class="MsoNormal">2019-03-11 12:58:08.473474 [ERR] switch_ivr.c:904 Error sofia/local_eth0/XXXXXXXXXX@X.X.X.X:5060 too many stacked extensions<u></u><u></u></p>
<p class="MsoNormal">2019-03-11 12:58:08.473474 [ALERT] switch_core_state_machine.c:701 sofia/local_eth0/XXXXXXXXXX@X.X.X.X:5060 session thread sleep state: CS_SOFT_EXECUTE!<u></u><u></u></p>
<p class="MsoNormal">2019-03-11 12:58:08.493452 [ERR] switch_ivr.c:904 Error sofia/local_eth0/XXXXXXXXXX@X.X.X.X:5060 too many stacked extensions<u></u><u></u></p>
<p class="MsoNormal">2019-03-11 12:58:08.513447 [ALERT] switch_rtp.c:7695 sofia/local_eth0/XXXXXXXXXX@X.X.X.X:5060 audio timeout<u></u><u></u></p>
<p class="MsoNormal">2019-03-11 12:58:08.513447 [ALERT] switch_rtp.c:1584 sofia/local_eth0/XXXXXXXXXX@X.X.X.X:5060 audio stat 99.00 301/302 flaws: 1 mos: 4.49 v: 0.11 0.11/1.78<u></u><u></u></p>
<p class="MsoNormal">2019-03-11 12:58:08.513447 [ERR] switch_ivr.c:904 Error sofia/local_eth0/XXXXXXXXXX@X.X.X.X:5060 too many stacked extensions<u></u><u></u></p>
<p class="MsoNormal">2019-03-11 12:58:08.533439 [ALERT] switch_rtp.c:7695 sofia/local_eth0/XXXXXXXXXX@X.X.X.X:5060 audio timeout<u></u><u></u></p>
<p class="MsoNormal">2019-03-11 12:58:08.533439 [ALERT] switch_rtp.c:1565 sofia/local_eth0/XXXXXXXXXX@X.X.X.X:5060 audio 2 consecutive flaws, adding 2 flaw penalty<u></u><u></u></p>
<p class="MsoNormal">2019-03-11 12:58:08.533439 [ALERT] switch_rtp.c:1584 sofia/local_eth0/XXXXXXXXXX@X.X.X.X:5060 audio stat 98.00 298/302 flaws: 4 mos: 4.48 v: 0.11 0.11/1.78<u></u><u></u></p>
<p class="MsoNormal">2019-03-11 12:58:08.533439 [ERR] switch_ivr.c:904 Error sofia/local_eth0/XXXXXXXXXX@X.X.X.X:5060 too many stacked extensions<u></u><u></u></p>
<p class="MsoNormal">2019-03-11 12:58:08.553450 [ALERT] switch_rtp.c:7695 sofia/local_eth0/XXXXXXXXXX@X.X.X.X:5060 audio timeout<u></u><u></u></p>
<p class="MsoNormal">2019-03-11 12:58:08.553450 [ALERT] switch_rtp.c:1565 sofia/local_eth0/XXXXXXXXXX@X.X.X.X:5060 audio 3 consecutive flaws, adding 2 flaw penalty<u></u><u></u></p>
<p class="MsoNormal">2019-03-11 12:58:08.553450 [ALERT] switch_rtp.c:1584 sofia/local_eth0/XXXXXXXXXX@X.X.X.X:5060 audio stat 97.00 295/302 flaws: 7 mos: 4.47 v: 0.11 0.11/1.78<u></u><u></u></p>
<p class="MsoNormal">2019-03-11 12:58:08.553450 [ERR] switch_ivr.c:904 Error sofia/local_eth0/XXXXXXXXXX@X.X.X.X:5060 too many stacked extensions<u></u><u></u></p>
<p class="MsoNormal">2019-03-11 12:58:08.573441 [ALERT] switch_rtp.c:7695 sofia/local_eth0/XXXXXXXXXX@X.X.X.X:5060 audio timeout<u></u><u></u></p>
<p class="MsoNormal">2019-03-11 12:58:08.573441 [ALERT] switch_rtp.c:1565 sofia/local_eth0/XXXXXXXXXX@X.X.X.X:5060 audio 4 consecutive flaws, adding 2 flaw penalty<u></u><u></u></p>
<p class="MsoNormal">2019-03-11 12:58:08.573441 [ALERT] switch_rtp.c:1584 sofia/local_eth0/XXXXXXXXXX@X.X.X.X:5060 audio stat 96.00 292/302 flaws: 10 mos: 4.46 v: 0.11 0.11/1.78<u></u><u></u></p>
<p class="MsoNormal">2019-03-11 12:58:08.573441 [ERR] switch_ivr.c:904 Error sofia/local_eth0/XXXXXXXXXX@X.X.X.X:5060 too many stacked extensions<u></u><u></u></p>
<p class="MsoNormal">2019-03-11 12:58:08.593450 [ALERT] switch_rtp.c:7695 sofia/local_eth0/XXXXXXXXXX@X.X.X.X:5060 audio timeout<u></u><u></u></p>
<p class="MsoNormal">2019-03-11 12:58:08.593450 [ALERT] switch_rtp.c:1565 sofia/local_eth0/XXXXXXXXXX@X.X.X.X:5060 audio 5 consecutive flaws, adding 2 flaw penalty<u></u><u></u></p>
<p class="MsoNormal">2019-03-11 12:58:08.593450 [ALERT] switch_rtp.c:1584 sofia/local_eth0/XXXXXXXXXX@X.X.X.X:5060 audio stat 95.00 289/302 flaws: 13 mos: 4.44 v: 0.11 0.11/1.78<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Regards,<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Grant<u></u><u></u></p>
</div>
</div>

_________________________________________________________________________<br>
Professional FreeSWITCH Services<br>
<a href="mailto:sales@freeswitch.com" target="_blank">sales@freeswitch.com</a><br>
<a href="https://freeswitch.com" rel="noreferrer" target="_blank">https://freeswitch.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="https://freeswitch.com/oss" rel="noreferrer" target="_blank">https://freeswitch.com/oss</a><br>
<a href="https://freeswitch.org/confluence" rel="noreferrer" target="_blank">https://freeswitch.org/confluence</a><br>
<a href="https://cluecon.com" rel="noreferrer" target="_blank">https://cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="https://freeswitch.com" rel="noreferrer" target="_blank">https://freeswitch.com</a></blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div style="font-size:12.8px"><font color="#000000"><br></font></div><div style="font-size:12.8px"><p dir="ltr" style="font-size:12.8px;line-height:1.38;margin-top:0pt;margin-bottom:0pt;margin-left:4.5pt"><span style="font-size:8pt;font-family:Arial;background-color:transparent;vertical-align:baseline;white-space:pre-wrap"><font color="#000000">Brian West | Co-founder and Developer</font></span></p><p style="font-size:12.8px;line-height:1.38;margin-top:0pt;margin-bottom:0pt;margin-left:4.5pt"><span style="font-size:8pt;font-family:Arial;background-color:transparent;vertical-align:baseline;white-space:pre-wrap"><font color="#000000">Need Commercial support? email <a href="mailto:sales@freeswitch.com" target="_blank">sales@freeswitch.com</a> </font></span></p><p dir="ltr" style="font-size:12.8px;line-height:1.38;margin-top:0pt;margin-bottom:0pt;margin-left:4.5pt"><span style="font-size:8pt;font-family:Arial;background-color:transparent;vertical-align:baseline;white-space:pre-wrap"><font color="#000000">FreeSWITCH Solutions | <a href="https://maps.google.com/?q=17345+Civic+Drive+%232531+Brookfield,+WI+53045&entry=gmail&source=g" style="color:rgb(17,85,204)" target="_blank">17345 Civic Drive #2531 Brookfield, WI 53045</a></font></span></p><p dir="ltr" style="font-size:12.8px;line-height:1.38;margin-top:0pt;margin-bottom:0pt;margin-left:4.5pt"><font color="#000000"><span style="font-size:8pt;font-family:Arial;background-color:transparent;vertical-align:baseline;white-space:pre-wrap">Email: </span><span style="color:rgb(17,85,204);font-size:8pt;font-family:Arial;background-color:transparent;vertical-align:baseline;white-space:pre-wrap"><a href="mailto:brian@freeswitch.com" target="_blank">brian@freeswitch.com</a></span></font></p><p dir="ltr" style="font-size:12.8px;line-height:1.38;margin-top:0pt;margin-bottom:0pt;margin-left:4.5pt"><span style="font-size:8pt;font-family:Arial;background-color:transparent;vertical-align:baseline;white-space:pre-wrap"><font color="#000000">Mobile: <span title="Call with Google Voice">918-424-9378</span></font></span></p><p dir="ltr" style="font-size:12.8px;line-height:1.38;margin-top:0pt;margin-bottom:0pt;margin-left:4.5pt"><font color="#000000"><span style="font-size:8pt;font-family:Arial;background-color:transparent;vertical-align:baseline;white-space:pre-wrap">Website: </span><a href="https://www.freeswitch.com/" style="color:rgb(17,85,204)" target="_blank"><span style="font-size:8pt;font-family:Arial;background-color:transparent;vertical-align:baseline;white-space:pre-wrap">https://www.FreeSWITCH.com</span></a></font></p><p dir="ltr" style="font-size:12.8px;line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="background-color:transparent;font-size:9pt;font-family:Arial;color:rgb(0,0,0);vertical-align:baseline;white-space:pre-wrap"><a href="https://www.facebook.com/freeswitch" target="_blank"><img alt="https://www.facebook.com/signalwireinc?src=email" src="https://lh6.googleusercontent.com/AYfRoSNaDNtMPRMevPn_GqcVEMd5NDRFi0GlluGUWzV6I5TAY_3T2-Tt0IuIXeUtEdYsgNsM8DOYKRKhjmrG_-n2Ga-LCnoNk46sO8VyEma1sBFYdiGJcLRUvkrD1CYHN79qimeg" width="31" height="31" style="border: none;"></a> </span><span style="background-color:transparent;font-size:9pt;font-family:Tahoma;color:rgb(0,0,0);vertical-align:baseline;white-space:pre-wrap"><a href="https://twitter.com/freeswitch" target="_blank"><img alt="https://twitter.com/freeswitch" src="https://lh3.googleusercontent.com/W4SqXyybH2qdAozvtoKjcz736qOjk9LHDwldvs1ahc-WVU0putVMSsUH474KDrJ32jsqi6JDjyUWxqeEkN5I1xSlC5ShYrd1b8NIMUkDzDrtbWQfa6A_90UcygqesBtRLgeFirKa" width="31" height="31" style="border: none;"></a></span><br></p></div></div></div></div></div></div></div></div></div></div></div></div></div>