According to http://www.voip-info.org/wiki/view/Asterisk+RealTime+Sip:
If you place “ipaddr” before “host” (in the case of dynamic), you will never load the public IP address of your sip device, as it will be overwritten when “host” is encountered. UnQuote.
From the latest Asterisk source tarball, the ‘contrib’ directory contains several realtime MySQL table definitions. The sippeers table has column ‘ipaddr’ before column ‘host’. Also, ‘permit’ comes before ‘deny’. Same for allow/disallow. Shouldn’t the correct RealTime column/field order be: deny, permit and disallow, allow and host, ipaddr?
As a side note, the iaxfriends RealTime MySQL table definition in the ‘contrib’ directory lacks the deny/permit fields which are quite important. However, the iaxfriends table does have the ‘ipaddr’ field after the ‘host’ field and the ‘allow’ field after ‘disallow’.
Furthermore, the asterisk.org wiki at:
https://wiki.asterisk.org/wiki/display/AST/SIP+Realtime%2C+MySQL+table+structure shows the same “disorder” in deny/permit, allow/disallow and host/ipaddr (MySQL example for RealTime).
So it seems that the contrib directory and the asterisk.org wiki are inconsistent and incomplete. Of course I understand that these are ‘contributed’ files but they should be proof-read by the Digium devs before packing them up into the official source tarball. Or am I wrong about my observations concerning field order and field omissions?