<br><br><div class="gmail_quote">On Wed, Jul 29, 2009 at 12:59 AM, Apostolos Pantsiopoulos <span dir="ltr"><<a href="mailto:regs@kinetix.gr">regs@kinetix.gr</a>></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><action application="set" data="execute_on_answer=execute_extension HANDLE_ANSWER"/><br><br>And then define your answer handler extension:<br>
<extension name="Handle Answered Calls"><br> <condition field="destination_number" expression="^HANDLE_ANSWER$"/><br> <action application="python" data="/path/to/my/python/script.py"/><br>
<action application="sched_hangup" data="+300 TIMED_OUT"/><br> <action application="log" data="INFO You can do all sorts of stuff"/><br> <!-- If this extension was called with 'execute_extension' then it will go back to the calling extension when done... --><br>
</condition><br></extension><br><br>Just a thought...<br>-MC<br></div></div><br>