stasis_channels: Don't give preference to ANI info in channel snapshots

When publishing channel snapshots, we currently compute the caller ID name and
number by giving preference first to ani.{name|number}, then to
id.{name|number}. However, when a channel driver (such as chan_sip) updates the
caller ID, it typically only updates the caller ID stored in id.{name|number}.
This means that we are currently giving preference to stale information.

When looking at the rest of the code base, the only other place where we appear
to use this same logic is in app_amd. Everywhere else, we treat the party
information in ani as being separate to the party information in id.

This patch publishes only the caller ID name and number in the snapshot field
for caller_name and caller_num. Note that the information in ANI is still
available in caller_ani.

Review: https://reviewboard.asterisk.org/r/2992/
........

Merged revisions 402501 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: http://svn.asterisk.org/svn/asterisk/trunk@402502 f38db490-d61c-443f-a65b-d21fe96a405b
netsock2: Define AST_AF_* enum constants to their AF_* equivalents

This patch explicitly defines AST_AF_* enum constants to their sys/socket.h
defined equivalents. It is certainly unclear why these constants actually have
to exist, given that netsock2.h includes sys/socket.h; however, since the code
base is already liberally sprinkled with the usage of AST_AF_* (as well as with
direct calls to AF_*), this will at least keep the semantics consistent between
their usage across systems.
........

Merged revisions 402503 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: http://svn.asterisk.org/svn/asterisk/trunk@402504 f38db490-d61c-443f-a65b-d21fe96a405b