Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[Freeswitch-users] multiple commands in execute_on_answer


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users
View previous topic :: View next topic  
Author Message
regs at kinetix.gr
Guest





PostPosted: Wed Jul 29, 2009 2:26 am    Post subject: [Freeswitch-users] multiple commands in execute_on_answer Reply with quote

Hi,

Is there a way to execute more than 1 commands in the execute_on_answer
variable? I want to execute both a python script AND the sched_hangup
application.


--
-------------------------------------------
Apostolos Pantsiopoulos
Kinetix Tele.com R & D
email: regs@kinetix.gr
-------------------------------------------

_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
Back to top
mattdfong at gmail.com
Guest





PostPosted: Wed Jul 29, 2009 2:33 am    Post subject: [Freeswitch-users] multiple commands in execute_on_answer Reply with quote

can't you just have your python script execute the sched_hangup command, and then finish the remainder of the python script?

On Wed, Jul 29, 2009 at 12:15 AM, Apostolos Pantsiopoulos <regs@kinetix.gr (regs@kinetix.gr)> wrote:
Quote:
Hi,

Is there a way to execute more than 1 commands in the execute_on_answer
variable? I want to execute both a python script AND the sched_hangup
application.


--
-------------------------------------------
Apostolos Pantsiopoulos
Kinetix Tele.com R & D
email: regs@kinetix.gr (regs@kinetix.gr)
-------------------------------------------

_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (FreeSWITCH-users@lists.freeswitch.org)
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
Back to top
regs at kinetix.gr
Guest





PostPosted: Wed Jul 29, 2009 3:06 am    Post subject: [Freeswitch-users] multiple commands in execute_on_answer Reply with quote

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.

Matthew Fong wrote:
Quote:
can't you just have your python script execute the sched_hangup command,
and then finish the remainder of the python script?

On Wed, Jul 29, 2009 at 12:15 AM, Apostolos Pantsiopoulos
<regs@kinetix.gr <mailto:regs@kinetix.gr>> wrote:

Hi,

Is there a way to execute more than 1 commands in the execute_on_answer
variable? I want to execute both a python script AND the sched_hangup
application.


--
-------------------------------------------
Apostolos Pantsiopoulos
Kinetix Tele.com R & D
email: regs@kinetix.gr <mailto:regs@kinetix.gr>
-------------------------------------------

_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
<mailto:FreeSWITCH-users@lists.freeswitch.org>
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org



------------------------------------------------------------------------

_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org


--
-------------------------------------------
Apostolos Pantsiopoulos
Kinetix Tele.com R & D
email: regs@kinetix.gr
-------------------------------------------

_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
Back to top
msc at freeswitch.org
Guest





PostPosted: Wed Jul 29, 2009 11:34 am    Post subject: [Freeswitch-users] multiple commands in execute_on_answer Reply with quote

On Wed, Jul 29, 2009 at 12:59 AM, Apostolos Pantsiopoulos <regs@kinetix.gr (regs@kinetix.gr)> wrote:
Quote:
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
Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services