That's right. If all addresses are in a list of avps, i can use avp_check to check 'ne' to verify.
one more thing - you should check dst_uri and not RURI - RURI may be the private addr when the dst_uri is the public IP.
I have better understanding of dst_uri and ruri learned from another email thread. So for natted UA, dst_uri and ruri are in pairs. Would it be useful to save and load both in functions avp_write and avp_pushto? That's the problem I ran into at http://mail.iptel.org/pipermail/serdev/2005-August/005339.html. I tried to send a call to two users by loading both their locations. I first change ruri to user 1, lookup, avp_write to save it. Then I change ruri to user 2, lookup, avp_write to the same avp. At this time, the avp has both users' location. But when I avp_pushto the avp, it only load the ruri, not dst_uri. So the natted UA can't receive the call. This problem can be solved if avp_write and avp_pushto save/load both dst_uri and ruri.
Thanks, Richard