Thank Dennis,
The setting threewaycalling=no is in Asterisk and it works only with local Asterisk extensions. What if the call is outside the Asterisk server. That means one of the Asterisk extension is talking with the other PSTN extension. If the PSTN extension was in silence or pressed a hook flash, then how can the Asterisk server detect that?
Thanks
Thank Miaolin,
Can you show me how to setup a hook flash in Dahdi? I have checked some files but I got no luck.
I also read your link about AGI but I didn't see any AGI function to detect silence.
Miaolin,
Have you experienced with the similar issue like this? Could you share some please?
Thank you!
1. for the hook flash detect, DAHDI will report a flash event or wink event to asterisk when user have a hookflash action, but asterisk usually handle this event automaticly, could you tell me what kind of action you want to do when hookflash event happened?
2. silence detection actually is a energy detect algorithm, the energy of digitialized voice can be calculated by this fomular:
energy = sum( abs(sample1), abs(sample2),....abs(sampleN) )/N
in AGI, you can get all the incoming voice data, the voice data is presented by a array of short int, each short int is a sample. thus you can calculate the energy of incoming voice, if you find the energy low than a certain value, that means silence detected.