RealTime Table Fields Ordering

Home » Asterisk Users » RealTime Table Fields Ordering
Asterisk Users 3 Comments


According to

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 wiki at: 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 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?



3 thoughts on - RealTime Table Fields Ordering

  • [snip]

    how about the line:
    `ipaddr` varchar(15) DEFAULT NULL,

    Wonder how they try to squeeze an IPv6 address in it… should be:
    `ipaddr` varchar(50) DEFAULT NULL,


  • That of course also implies contributions to review the files prior to release (which have release candidates). That directory contains data that was at one point contributed, and should really be reviewed by the community with any changes required submitted back upstream.