[Freeswitch-users] Timers/DTMFs During a Call
delianSPAM
delianspam at gmail.com
Wed Aug 26 07:59:08 PDT 2009
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20090826/0cb77201/attachment-0002.html
More information about the FreeSWITCH-users
mailing list