keywords: ip pbx voip gateway gsm gateway

× Questions about A-100P One Port Analog Interface Card

Detect Silence .....

11 years 11 months ago #6574 by Denins.Den
If you don't want any third-party call, just close this function. in chan_dahdi.conf,
set " threewaycalling=no "
11 years 11 months ago #6575 by miaolin
hookflash detect is done by DAHDI,
If you need detect silence, now the only method is write your own AGI module, please reference this
11 years 11 months ago #6578 by DanStrong
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?
11 years 11 months ago #6579 by DanStrong
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.
Have you experienced with the similar issue like this? Could you share some please?
Thank you!
11 years 11 months ago #6581 by miaolin
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.
Time to create page: 0.045 seconds
Powered by Kunena Forum