<br><br><div class="gmail_quote">On Wed, Jul 29, 2009 at 12:59 AM, Apostolos Pantsiopoulos <span dir="ltr">&lt;<a href="mailto:regs@kinetix.gr">regs@kinetix.gr</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Yes, I could do that but the logic of the python script is<br>
not dialplan oriented and I hate mixing different things. I just<br>
found a workaround though. I am executing the python script on the<br>
b leg and the sched_hangup on the a leg (with the help of nolocal:)<br>
Thanx for the help anyway.<br>
<div class="im"></div></blockquote><div><br>You can also do something like this:<br>&lt;action application=&quot;set&quot; data=&quot;execute_on_answer=execute_extension HANDLE_ANSWER&quot;/&gt;<br><br>And then define your answer handler extension:<br>
&lt;extension name=&quot;Handle Answered Calls&quot;&gt;<br>  &lt;condition field=&quot;destination_number&quot; expression=&quot;^HANDLE_ANSWER$&quot;/&gt;<br>    &lt;action application=&quot;python&quot; data=&quot;/path/to/my/python/script.py&quot;/&gt;<br>
    &lt;action application=&quot;sched_hangup&quot; data=&quot;+300 TIMED_OUT&quot;/&gt;<br>    &lt;action application=&quot;log&quot; data=&quot;INFO You can do all sorts of stuff&quot;/&gt;<br>    &lt;!-- If this extension was called with &#39;execute_extension&#39; then it will go back to the calling extension when done... --&gt;<br>
  &lt;/condition&gt;<br>&lt;/extension&gt;<br><br>Just a thought...<br>-MC<br></div></div><br>