before I explain my problem, I assure you that I searched all over the forum a solution, but I were not able to find one. More precisely, I found a lot of post and articles about this matter, but no one has been useful for me.
I am developing an application which, basically, triggers a phone call to a specific number and, once the connection has been established, it send a numeric code using DTMF tones. If this operation would perform by a human being, we could describe it a following:
- Trigger call
- Wait for connection
- Press the keys in order to send the DTMF tones
I did not face any problem with the part of the application which triggers the phone call. The problem comes after this activity, in other word, once the communication channel has been established, the telephone does not send the DTMF tones. Below the application code.
N.B.: In this code, between the phone call and the send of DTMF tones there are 20 seconds. The function which sends the DTMF tones after the establishing of the communication channel, has not yet been implemented.
It is important to stress up that if I use my mobile phyton console with the following code:
from key_codes import *
def tono1():keypress.simulate_key(EKey1, EScancode1)
def tono2():keypress.simulate_key(EKey2, EScancode2)
>>> import keypress
>>> from key_codes import *
>>> keypress.simulate_key(EKey5, EScancode5)
This result means (if I am not wrong) that everything is working fine concerning the keypress simulation.
Can someone help me solving this problem?