<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
On 02/11/2011 01:21 PM, Alok Prasad wrote:
<blockquote
cite="mid:AANLkTikqHEkcTwdB0Rn5y6_CTpOkBzci5TdADrOth2Hq@mail.gmail.com"
type="cite">I am trying to Make a Channel Driver for my custom
hardware,But facing problem in polling of FD.
<div><br>
</div>
<div>i have few doubts.</div>
<div>1.What is "which" in ast_channel_set_fd(),i.e second
parameter of this function.</div>
</blockquote>
<br>
<tt>It's the index into the channel's array of file descriptors. So
if "which" is 3, then<br>
channel->fds[3] would be set to the fd you pass in as the "fd"
parameter.<br>
</tt><br>
<blockquote
cite="mid:AANLkTikqHEkcTwdB0Rn5y6_CTpOkBzci5TdADrOth2Hq@mail.gmail.com"
type="cite">
<div>2.AST_MAX_FDS is 20 so that this means that ,if allocate a FD
whose value is greater than 20 polling </div>
<div>of read/write wont work.</div>
</blockquote>
<br>
<tt>No. It just means a channel is limited to polling 20 file
descriptors. This has nothing to do with the file descriptors'
values.</tt><br>
<br>
<blockquote
cite="mid:AANLkTikqHEkcTwdB0Rn5y6_CTpOkBzci5TdADrOth2Hq@mail.gmail.com"
type="cite">
<div>3.if i use ast_channel_set_fd(temp,0,1)
or ast_channel_set_fd(temp,0,2) , i am not able to hear audio
from SIP Phone to my hardware,but if i use greater than 10 in
field of FD its working fine,</div>
<div>but then All wait related function of dialplan never
timeouts..eg Waitmusichold().</div>
<div><br>
</div>
<div>In short What fd values should i use for ast_channel_set_fd()
and what is the use of "which" fiedl in this function.</div>
</blockquote>
<br>
<tt>It shouldn't matter what fd values you use. In most Asterisk
channels, the channel fds are socket fds over which signaling
pertaining to the channel may occur. So with SIP, you'll usually
have the SIP socket fd and RTP and RTCP fds for media. </tt><br>
<br>
<blockquote
cite="mid:AANLkTikqHEkcTwdB0Rn5y6_CTpOkBzci5TdADrOth2Hq@mail.gmail.com"
type="cite">
<div><br>
</div>
<div>Thanks in advance</div>
<div><br>
</div>
<div>Alok</div>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by <a class="moz-txt-link-freetext" href="http://www.api-digital.com">http://www.api-digital.com</a> --
asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
<a class="moz-txt-link-freetext" href="http://lists.digium.com/mailman/listinfo/asterisk-dev">http://lists.digium.com/mailman/listinfo/asterisk-dev</a></pre>
</blockquote>
<br>
</body>
</html>