<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp; I'm sorry, I have forgot to say the version of asterisk I pay attention to is 1.2.x. Not the 1.4.x one. I know that when I use 1.4.x,in ast_rtp_bridge() function, there are two differences p2p bridge,one is ture native bridge named bridge_native_loop(),in bridge_native_loop() function we also need ast_read() and ast_write(),I think this one is similar to ast_generic_bridge().The other p2p bridge is bridge_p2p_loop(),this one look like a single thread bridge, because if two same type channnels (eg. SIP channel) come into this bridge, will set voice rtp socket's fd to -1, and set a callback function, so the bridge will block by polling fd (except pipe fd),and callback function:p2p_rtp_callback() will be invoked by ast_io_wait in do_monitor function,then they can use only socket fd to send or recieve rtp.</DIV>
<DIV>So, I want to ask ,why not use a only one thread to do this thing instead of do_monitor, and make this thread in the core of asterisk, and make it deal with difference kinds of channel? I think this can enhance the concurrency of asterisk more better.&nbsp; </DIV>
<DIV>------------------&nbsp;&nbsp;&nbsp;&nbsp; <BR>serva<BR>2007-11-22</DIV>
<DIV>-------------------------------------------------------------<BR>From£ºRussell Bryant<BR>Date£º2007-11-22 23:13:27<BR>Subject£ºRe: [asterisk-dev] asterisk's bridge</DIV>
<DIV>truename wrote:<BR>&gt; Hi, I found that if I set mixmonitor or spy options, that asteriosk will<BR>&gt; choose ast_generic_bridge() function in channel.c , but ast_rtp_bridge()<BR>&gt; in rtp.c can also deal with monitor and spy because monitor or spy is<BR>&gt; only doing in ast_read() and ast_write() function using<BR>&gt; queue_frame_to_spies(). So can anyone tell me , why asterisk<BR>&gt; choose&nbsp; ast_generic_bridge() instead of ast_rtp_bridge() ?</DIV>
<DIV>Asterisk must be able to intercept every single audio frame.&nbsp; In the case of an<BR>RTP bridge, the audio may not be flowing through Asterisk anymore.</DIV>
<DIV>-- <BR>Russell Bryant<BR>Senior Software Engineer<BR>Open Source Team Lead<BR>Digium, Inc.</DIV>
<DIV><BR>_______________________________________________<BR>--Bandwidth and Colocation Provided by <A href="http://www.api-digital.com">http://www.api-digital.com</A>--</DIV>
<DIV>asterisk-dev mailing list<BR>To UNSUBSCRIBE or update options visit:<BR>&nbsp;&nbsp; <A href="http://lists.digium.com/mailman/listinfo/asterisk-dev">http://lists.digium.com/mailman/listinfo/asterisk-dev</A></DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>