sounds like there is some come missing to tell python we are entering into a long running c function.  Let&#39;s move this to jira and i&#39;ll take a look in the morning.  This is the kind of info i needed to help track down why python might be blocking.  I&#39;ll see if i&#39;m right on my suspicion tomorrow<span></span><div><div><br>On Friday, October 7, 2016, Андрей Асташов &lt;<a href="mailto:astashov.andrey@gmail.com">astashov.andrey@gmail.com</a>&gt; wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Guys.<div><br></div><div>From Dialplan run scripts in Python, from which I perform freeswitch.session(&quot;......&quot;). That is, create a new session. And if I do not get an answer for a long time from the gateway, the execution of other scripts in Python is delayed until such time as the session will not be installed.<br></div><div><br></div><div>Please tell me how you can create a new session, and do not block completely mod_python. I understand that once had to be done through ESL, but now everything has already been written by the script from the dialplan. And it works, if it does not create a new session.<br></div><div><br></div><div><div>freeswitch@Test-Environment&gt; </div><div>#</div><div># Execute python script from fs_cli(in dialer mode): </div><div>#   fs_cli --retry --batchmode --interrupt --execute=&quot;python python_test_script&quot;</div><div>#</div><div>2016-10-07 17:55:29.970991 [NOTICE] mod_python.c:212 Invoking py module: python_test_script</div><div>2016-10-07 17:55:30.119989 [NOTICE] switch_cpp.cpp:1360 --&gt;(489d5441-701d-4a98-80ca-<wbr>3389b00fa98a) Create a new session through freeswitch.Session(&quot;sofia/<wbr>gateway/Goip_One/+<a href="http://71234567890@192.168.100.28:5060" target="_blank">71234567890@<wbr>192.168.100.28:5060</a>&quot;)</div><div>2016-10-07 17:55:30.119989 [NOTICE] switch_channel.c:1104 New Channel sofia/external-g-eth0.nostun.<wbr>noauth/%<a href="http://2B71234567890@192.168.100.28:5060" target="_blank">2B71234567890@192.168.<wbr>100.28:5060</a> [489d5441-701d-4a98-80ca-<wbr>3389b00fa98a]</div><div>freeswitch@Test-Environment&gt; </div><div>#</div><div># New incoming call</div><div>#</div><div>2016-10-07 17:55:33.920114 [NOTICE] switch_channel.c:1104 New Channel sofia/external-g-eth0.stun.<wbr>auth/<a href="javascript:_e(%7B%7D,&#39;cvml&#39;,&#39;384851@1.2.3.4&#39;);" target="_blank">384851@1.2.3.4</a> [e11d39b8-0479-4d4b-bd8b-<wbr>28634f0a970a]</div><div>2016-10-07 17:55:33.920114 [INFO] mod_dialplan_xml.c:637 Processing 384851 &lt;384851&gt;-&gt;318386 in context hive-context</div><div>#</div><div># Execute second python script from dialplan: </div><div>#</div><div>2016-10-07 17:55:33.920114 [NOTICE] mod_python.c:212 Invoking py module: python_test_script</div><div>freeswitch@Test-Environment&gt; </div><div>#</div><div># 12 seconds of silence during which any python script will not be executed and will be expected to complete</div><div>#</div><div>freeswitch@Test-Environment&gt; </div><div>2016-10-07 17:55:45.140231 [NOTICE] sofia.c:8078 Hangup sofia/external-g-eth0.nostun.<wbr>noauth/%<a href="http://2B71234567890@192.168.100.28:5060" target="_blank">2B71234567890@192.168.<wbr>100.28:5060</a> [CS_CONSUME_MEDIA] [UNALLOCATED_NUMBER]</div><div>2016-10-07 17:55:45.160086 [NOTICE] switch_cpp.cpp:1360 --&gt;(489d5441-701d-4a98-80ca-<wbr>3389b00fa98a) After Create a new session through freeswitch.Session</div><div>2016-10-07 17:55:45.160086 [NOTICE] switch_core_session.c:1665 Session 15 (sofia/external-g-eth0.nostun.<wbr>noauth/%<a href="http://2B71234567890@192.168.100.28:5060" target="_blank">2B71234567890@192.168.<wbr>100.28:5060</a>) Ended</div><div>2016-10-07 17:55:45.160086 [NOTICE] switch_core_session.c:1669 Close Channel sofia/external-g-eth0.nostun.<wbr>noauth/%<a href="http://2B71234567890@192.168.100.28:5060" target="_blank">2B71234567890@192.168.<wbr>100.28:5060</a> [CS_DESTROY]</div><div>#</div><div># Continue executing second python script(from 2016-10-07 17:55:33.920114) after any answer from first python new freeswitch.Session</div><div>#</div><div>2016-10-07 17:55:45.160086 [ALERT] switch_cpp.cpp:1360 (mtid:3656): Traceback 280920161717(e11d39b8-0479-<wbr>4d4b-bd8b-28634f0a970a): --&gt; 12 &lt;--; now: 1475841345; python_start_time:1475841333; </div></div><div><br></div></div>
</blockquote></div></div>