[asterisk-dev] When should a channel be locked?

Justin Tunney jtunney at gmail.com
Tue Aug 22 14:35:29 MST 2006


Hi,

One thing about Asterisk development that I've always seemed to wonder
is, when exactly is it appropriate to lock, or not lock a channel?
Each channel has its own mutex and it seems to rarely be used outside
of channel.c and pbx.c

The reason I ask is because I'm rewriting my voice changer application
which acts as a simple Dial() replacement that manually bridges two
calls on a single thread.  I want to make sure I know when to lock
channels so I don't get any wacky errors.

- Justin



More information about the asterisk-dev mailing list