[asterisk-dev] phone_read and phone_write not working on subchannels

Richard Mudgett rmudgett at digium.com
Tue Nov 23 11:15:20 CST 2010



----- Original Message -----
> In continuation to my earlier post below i am giving some more details
> about the problem.
> I Created three subchannels one for normal call (SUB_REAL -0),second
> for callwaiting (SUB_CALLWAIT - 1), and third one for 3-way conference
> (SUB_THREEWAY - 2).
> 
> 
> So i used SUB_REAL For normal call and set device FD using
> ast_channel_set_FD() function.
> after this my deviceXYZ_read() and deviceXYZ_write() api are getting
> polled by asterisk
> but when i set the same FD for call waiting scenario by keeping
> SUB_REAL Channel on hold,
> deviceXYZ_write() and deviceXYZ_read() for subchannel SUB_CALLWAIT is
> not polled by asterisk.
> 
> 
> I would like to know procedure how to use Same FD to make callwaiting
> or 3-wAY conference
> work?
> I also saw the swap_subs() in some of the channel driver
> implementation.Does this do any mixing?? what is the purpose of this
> function?
> 
In chan_dahdi/sig_analog, the purpose of this function is to swap the specified channels around.
Since only one channel can access a FD and be "active" at a time, the channels must be swapped to the REAL subchannel.  The CALLWAIT and THREEWAY subchannels use their own pseudo channel FD since they are on hold.

In the case of a call waiting call, the active call is in the REAL subchannel, the waiting call is in the CALLWAIT subchannel.  When you flash hook to switch to the waiting call, the subchannels are swapped.

Richard



More information about the asterisk-dev mailing list