[Asterisk-Dev] Asterisk channel variable access: a proposal

Holger Schurig hs4233 at mail.mn-solutions.de
Wed Aug 18 00:15:06 MST 2004


> The "rings" element is part of ast_channel structure. I do not know how
> it is used, but its there.

I have not looked at this part of the source, but maybe "rings" is only 
used for zaptel FXS devices. Because then you know how often it ringed. 
For many other channels, the number of rings is out of your control, here 
only a the duration of the ringing state could be used statistically.


> Maybe its not so hard to add the information to astdb, but it 'might'
> have performance issues. And then you have to perform some kind of
> garbage collection to clean old channel data.

Putting it into astdb would be fine, because it's simply there. However, 
John made a comparison to /proc in Linux, and the data there isn't there, 
except when you ask for it. There is no garbage collection there, because 
the info is always generated on the fly.

That brings me to the idea of an app_chanstat, where an application

  GetChanStat(temp, "reversedialed")

(or whatever field from struct ast_channel) would return a field from the 
channel into the variable "temp").

That should be easy to code.




More information about the asterisk-dev mailing list