[asterisk-dev] AMI headers

jg webaccounts at jgoettgens.de
Fri Oct 4 10:03:18 CDT 2013


Hi!

While working on an Asterisk Manager Interface project, I was wondering whether this is some 
interest in having a word list of header keys. Instead of doing string comparisons at various 
places in the code, a lookup gives a unique id that can be used from there on. This is probably 
more useful for the client than the server side.

Whenever I come across a new header, the key gets stored in a database. Then all the the 
distinct keys get exported into a table from which gperf generates a nice hashtable. Currently 
there are 578 different keys in the table and I haven't yet covered all of the core Asterisk 11 
events and actions. The key names are exported in alphabetical order, which also allows for easy 
detection of similar names (the potential of reducing the number headers is smaller than one 
would think given almost 600 names).

If you feel you could use these tables yourself, please indicate this. If there is any interest 
I would publish the hash tables and the associated files and keep them updated for a while.

jg



More information about the asterisk-dev mailing list