This was seen as a lot of dialogs being created then immediately destroyed at reload/restart of the SIP channel.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@63748
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
struct sip_pvt *p;
int newmsgs, oldmsgs;
+ /* Do we have an IP address? If not, skip this peer */
+ if (!peer->addr.sin_addr.s_addr && !peer->defaddr.sin_addr.s_addr)
+ return 0;
+
/* Check for messages */
ast_app_messagecount(peer->mailbox, &newmsgs, &oldmsgs);