[asterisk-dev] Read dtmf after ast_bridge_call
Joshua Colp
jcolp at digium.com
Mon Aug 4 05:28:45 CDT 2014
vassilux . wrote:
> Thank for the information about the frame hook.
> I understand that both functions can be called by different threads
> because lock/unlock used internally.
If you are referring to ast_waitfor and ast_read those functions are NOT
safe to be called form separate threads simultaneously, even with
locking internally. It won't work as you expect/want as only a single
thread can service a channel. You would essentially end up with two
threads fighting over the frames, with some going to one thread and some
going to the other.
--
Joshua Colp
Digium, Inc. | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US
Check us out at: www.digium.com & www.asterisk.org
More information about the asterisk-dev
mailing list