[Freeswitch-users] multiple commands in execute_on_answer
Michael Collins
msc at freeswitch.org
Wed Jul 29 09:11:20 PDT 2009
On Wed, Jul 29, 2009 at 12:59 AM, Apostolos Pantsiopoulos
<regs at kinetix.gr>wrote:
> Yes, I could do that but the logic of the python script is
> not dialplan oriented and I hate mixing different things. I just
> found a workaround though. I am executing the python script on the
> b leg and the sched_hangup on the a leg (with the help of nolocal:)
> Thanx for the help anyway.
>
You can also do something like this:
<action application="set" data="execute_on_answer=execute_extension
HANDLE_ANSWER"/>
And then define your answer handler extension:
<extension name="Handle Answered Calls">
<condition field="destination_number" expression="^HANDLE_ANSWER$"/>
<action application="python" data="/path/to/my/python/script.py"/>
<action application="sched_hangup" data="+300 TIMED_OUT"/>
<action application="log" data="INFO You can do all sorts of stuff"/>
<!-- If this extension was called with 'execute_extension' then it will
go back to the calling extension when done... -->
</condition>
</extension>
Just a thought...
-MC
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20090729/14a1ab81/attachment-0002.html
More information about the FreeSWITCH-users
mailing list