[Home]

Summary:ASTERISK-02300: [patch] Poke peer when we have IP
Reporter:Olle Johansson (oej)Labels:
Date Opened:2004-08-31 02:20:11Date Closed:2008-01-15 15:06:57.000-0600
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Channels/chan_sip/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) sippoke.txt
Description:Minor patch to poke peers when we have parsed the IP when restarting asterisk
Comments:By: Mark Spencer (markster) 2004-08-31 09:46:00

Fixed in CVS

By: Brian West (bkw918) 2004-09-05 20:41:29

Breaks qualify on polycom

By: bfranks (bfranks) 2004-09-05 20:44:47

Mark,

Just drove 3 hours to provide you feedback for Bug 2324, and when I upgraded CVS I get this error message when starting:

002     -- SIP Seeding '2120' at 2120@10.10.60.2:5060 for 3600
003 Sep  5 21:01:05 WARNING[1076208256]: chan_sip.c:595 __sip_xmit: sip_xmit of 0x811250c (len 412) to 10.10.60.2 returned -1: Bad file descriptor
004     -- SIP Seeding '2121' at 2121@10.10.40.21:5060 for 3600
005     -- SIP Seeding '2122' at 2122@10.10.60.1:5060 for 3600
006     -- SIP Seeding '2123' at 2123@10.10.60.13:5060 for 3600
007     -- SIP Seeding '2124' at 2124@10.10.60.11:5060 for 3600
008     -- SIP Seeding '2125' at 2125@10.10.60.17:5060 for 3600
009 Sep  5 21:01:05 WARNING[1076208256]: chan_sip.c:595 __sip_xmit: sip_xmit of 0x8119a84 (len 414) to 10.10.60.17 returned -1: Bad file descriptor
010     -- SIP Seeding '2126' at 2126@10.10.60.14:5060 for 3600
011     -- SIP Seeding '2127' at 2127@10.10.60.12:5060 for 3600
012     -- SIP Seeding '2128' at 2128@10.10.60.15:5060 for 3600
013 Sep  5 21:01:05 WARNING[1076208256]: chan_sip.c:595 __sip_xmit: sip_xmit of 0x811ff34 (len 414) to 10.10.60.15 returned -1: Bad file descriptor
014     -- SIP Seeding '2129' at 2129@10.10.60.3:5060 for 3600
015     -- SIP Seeding '2130' at 2130@10.10.60.16:5060 for 3600
016     -- SIP Seeding '2131' at 2131@10.10.60.4:5060 for 3600
017     -- SIP Seeding '2132' at 2132@10.10.60.10:5060 for 3600
018     -- SIP Seeding '2133' at 2133@10.10.60.9:5060 for 3600
019 Sep  5 21:01:05 WARNING[1076208256]: chan_sip.c:595 __sip_xmit: sip_xmit of 0x812752c (len 412) to 10.10.60.9 returned -1: Bad file descriptor
020     -- SIP Seeding '2134' at 2134@10.10.60.8:5060 for 3600
021   == SIP Listening on 10.10.10.1:5060


After investigation, found out that the only difference was that those peers had qualify=yes.  Tried Qualify=200, 300, etc all with the same result.  Set qualify=no, problem went away.

Looking through CVS, i changed chan_sip.c back to:

ast_verbose(VERBOSE_PREFIX_3 "SIP Seeding '%s' at %s@%s:%d for %d\n", p->name,
                                               p->username, ast_inet_ntoa(iabuf, sizeof(iabuf), in), atoi(c), atoi(d));
                                       sip_poke_peer(p);
                                       expiry = atoi(d);
                                       memset(&p->addr, 0, sizeof(p->addr));
                                       p->addr.sin_family = AF_INET;
                                       p->addr.sin_addr = in;
                                       p->addr.sin_port = htons(atoi(c));
                                       if (p->expire > -1)

and set qualify=yes for the same phones, and the error is no longer reported.

Polycom IP 500's.

By: Olle Johansson (oej) 2004-09-06 00:56:39

Seems like we have a new problem.

bkw918: How does it break qualify on polycom?
bfranks: Are those peers behind NAT? DO you have NAT=yes as well?

By: Mark Spencer (markster) 2004-09-06 02:03:08

Only way to get an invalid fd would be if the file descriptor was closed somehow.  I find that very hard to believe.

By: bfranks (bfranks) 2004-09-06 13:15:05

This error occured with Polycom IP 500's that are all on the same LAN (10.10.0.0/255.255.0.0) network.  They are not NAT'd or hidden from * by a firewall.

It looks like the qualify still works fine, however that error message is reported when starting asterisk with peers set to qualify=yes.  Moving the poke statement back to it's original place, recompiling, causes the error messages to go away.

So it is definitly a result of the change of placement of where poke lies.

- B

By: Mark Spencer (markster) 2004-09-07 10:38:34

Okay fixed it so we don't qualify until we have a valid file descriptor.

By: Digium Subversion (svnbot) 2008-01-15 15:06:16.000-0600

Repository: asterisk
Revision: 3690

U   trunk/channels/chan_sip.c

------------------------------------------------------------------------
r3690 | markster | 2008-01-15 15:06:16 -0600 (Tue, 15 Jan 2008) | 2 lines

Minor SIP cleanup for poking on startup (bug ASTERISK-2300)

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=3690

By: Digium Subversion (svnbot) 2008-01-15 15:06:57.000-0600

Repository: asterisk
Revision: 3740

U   trunk/channels/chan_sip.c

------------------------------------------------------------------------
r3740 | markster | 2008-01-15 15:06:57 -0600 (Tue, 15 Jan 2008) | 2 lines

Don't attempt to qualify before we have a socket (bug ASTERISK-2300)

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=3740