<div dir="ltr"><div><div><div><div>Hello,<br><br></div>I want to make a program, that makes a call to the user and calls my script when it ends. <br><br></div>I run the following script: <br><br>dialA = &quot;{origination_caller_id_number=&quot;..telephone_from..&quot;,ignore_early_media=true}sofia/gateway/iskratel/&quot;..telephone_to<br><br>                              <br>while(legA:ready() and dispoA ~= &quot;ANSWER&quot;) do<br>  dispoA = legA:getVariable(&quot;endpoint_disposition&quot;)<br>  freeswitch.consoleLog(&quot;INFO&quot;,&quot;Leg A disposition is &#39;&quot; .. dispoA .. &quot;&#39;\n&quot;)<br>  legA:execute(&quot;set&quot;, &quot;api_hangup_hook=luarun autoinform_cleanup.lua&quot;);<br>  legA:execute(&quot;set&quot;, &quot;session_in_hangup_hook=true&quot;);<br>  legA:execute(&quot;playback&quot;, &quot;/usr/local/freeswitch/sounds/alert.wav&quot;);<br>  legA:execute(&quot;hangup&quot;);<br>end<br><br></div><div>and simple log of autoinform_cleanup.lua<br><br>dat = env:serialize()            <br>freeswitch.consoleLog(&quot;INFO&quot;,&quot;Here&#39;s everything:\n&quot; .. dat .. &quot;\n&quot;)<br><br></div><div><br></div>It makes a call, but when autoinform_cleanup.lua is called<br></div>I see this in console<br><br>/usr/local/freeswitch/scripts/autoinform_cleanup.lua:1: attempt to index global &#39;env&#39; (a nil value)<br><div><br><div><div><div><div><div><div><div><div><div><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Kamil Nigmatullin<br>Tel: 77272323748<br>mob: 7 (707) 2517003<br>Skype: kamil.nigmatullin</div></div>
</div></div></div></div></div></div></div></div></div></div></div>