[Asterisk-Dev] Need help to get into the code
Kevin P. Fleming
kpfleming at digium.com
Mon May 16 08:47:50 MST 2005
Bob Goddard wrote:
> Looking at callerid_read, I would assume from the name that it would
> read the callerid from the channel. To get what it actually does, I
> would have to read the piece of code which calls it. I cannot see
> what the /cmd/ variable is supposed to be used for as it is never
> accessed in that function.
Why do you need to read the code that calls it? It's clearly a dialplan
function (as is everything in that directory, as stated in the header at
the top of the file). All dialplan functions are designed to provide
read and write methods, which return information to the dialplan. Are
you suggesting that this information about how dialplan functions work
be replicated in every single function source file?
Also, the 'cmd' parameter is not used because this function does not
need it... that is part of the interface between the dialplan and the
functions themselves, and if documented anywhere it should be in the
function that calls these dialplan functions, not the other way around.
With the basic knowledge of what a dialplan function is supposed to
accomplish, I personally think that func_callerid.c is adequately
commented (i.e. very little).
More information about the asterisk-dev
mailing list