[Freeswitch-users] Timers/DTMFs During a Call
Michael Collins
msc at freeswitch.org
Wed Aug 26 13:28:17 PDT 2009
Do you actually need Python for the IVR, or is it that you're comfortable
using a scripting lang for an IVR? I like using XML for IVRs, but using
scripting langs does give you a bit more power & flexibility at the cost of
some resources.
For the record, you can do this in the dialplan using XML and sched_api
without touching a scripting language. Checkout the sched_api channel
variable on the wiki - it may give you the functionality you need.
-MC
On Wed, Aug 26, 2009 at 7:59 AM, delianSPAM <delianspam at gmail.com> wrote:
> Hello Everybody!
>
>
>
> 1. Scenario.
>
> I am writing an IVR in Python that gets a destination from the calling
> party (party A) and then connects to the destination (party B).
>
> When the call is CONNECTED, I want to:
>
> - Receive DTMFs
>
> - Have a timer that can call a certain function in my script. The
> script will have to play a message to party A.
>
> - Have a timer that can call a certain function in my script. The
> script will have to drop the call.
>
> Please notice that I want to do the things after the two parties are
> connected, and not after I send the Invite to party B.
>
>
>
> 2. Problem.
>
> I will be happy to receive help on:
>
> - Which methods should I look for to implement this.
>
>
>
> 3. Details
>
> Here is how I connect the call currently:
>
> session.execute("bridge",”sofia/internal/" + destination_number + "@
> domain.com”)
>
>
>
> I have tried to create a timer callback function “my_method()” using:
>
> ivr_timer =threading.Timer(30,my_method)
>
> This never called the function “my_method()”.
>
>
>
> Maybe I am wrong in using threading.Timer and the “bridge” application?
> Maybe I need to create a new thread and a new timer using the API of
> freeswitch, plus to use the “session.setInputCallback”, plus use a
> conference rather than a bridge? Can you please provide any suggestions or
> examples?
>
>
>
> Thank you!
>
> Best Regards, Delian Tashev
>
> _______________________________________________
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20090826/c10a9876/attachment-0002.html
More information about the FreeSWITCH-users
mailing list