From: DomDom <Bes...@ne...> - 2006-10-25 07:00:16
|
Hello, I am new to Asterisk and relatively new to Python (I write some small = programs). I am sorry that my questions may seem stupid to some but answers will = help me a lot. =20 I would like to generate automatic calls from a python program (let's = call it myprog.py), play a sound file and retrieve the digit pressed by = the callee into the initial program (myprog.py). I used the pyst package (through a small python programm that we can = call automatic.py) to test generation of calls with Originate and read = the sound file. It works well !! Thanks to Michael Fletcher for his work. 1) Could somebody explain me what python function I can use to run the = automatic.py program from myprog.py ? It seems that the os.exec function is not the good one. Right ? I suppose that I will have to use sys.arg to pass the tel number from = myprog.py to automatic.py. 2) How can I retrieve the digit pressed by the callee into myprog.py ? Should I use the Read Asterisk function and how ? I wonder if I have to run automatic.py in a thread from myprog.py. 3) Just for info, I would like to understand the line ' variables =3D = {'WaitTime':'45'}, ' in the example provided by Michael in his site = http://blog.vrplumber.com/1274. I would appreciate answers since I can't go forward. I will post a small tutorial once I manage to do what I want, to help = others like me. Thank you in advance Dominique |