[asterisk-dev] Close IAX2 channel when there has been a silence
Steven S. Critchfield
critch at basesys.com
Wed Feb 4 06:39:14 CST 2009
----- "Chandrakant Solanki" <solanki.chandrakant at gmail.com> wrote:
> *Hi*
>
> I am new to asterisk
>
> **
>
> *I would like to change IAX2 code...* and close the channel when there
> are
> no received or transmitted packages processed for x number of
> minutes.
> How can i do this what necessary changes i have to do ..
What you want to do is not really specific to the channel you are working
with. While you may only want it for IAX right now, it is best for it to
be a non channel specific implementation.
So, you may want to look at the bridging area. There you have the audio
stream and can detect silence. In fact, there is already code around for
detecting silence you could use. Then you could determine when to tear
down the bridge and that would end the call no matter what channel you
have. Then you just need to give your code a way to be activated. Maybe
part of a dial command or via channel variables. This way you can set
it on just the IAX channels you are concerned with.
I am pretty sure the channel agnostic way is your best bet on getting
your changes merged into the main code repository and therefore maintained.
--
Steven Critchfield critch at basesys.com
More information about the asterisk-dev
mailing list