[Home]

Summary:ASTERISK-03264: SIP phones cannot register after 01/09/2005 CVS (Realtime)
Reporter:raiden (raiden)Labels:
Date Opened:2005-01-13 07:28:06.000-0600Date Closed:2008-01-15 15:21:34.000-0600
Priority:BlockerRegression?No
Status:Closed/CompleteComponents:Channels/chan_sip/Subscriptions
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) chan_sip.diff
( 1) chan_sip.diff.txt
Description:I have a bunch of SIP phones that register to my asterisk system (Grandstream, Sipuras) using the ODBC realtime SIP registration. Since 01/10/2005 cvs, My SIP clients cannot register to my system. If I CVS back to 01/09/2005, Everything works correctly. I tried setting "sip debug" and nothing is being shown on the screen when a client tries to register. I even tried setting verbose to a high number to see whats going on and it gives no clues.


After doing some more debugging, I have deleted all my clients in my database and all of I sudden I can see SIP clients failing to register. Thats a good sign. I went to the next step and add a client. When it tries to register, Nothing is shown on the screen that it has tried to register. (even with debugging). The same thing that happened when I had all my SIP phones entered in my database. The last test was to clear the database, and add only one of my clients to my list. I have the first 2 phones (that are not entered in my database) and I see the 2 clients fail registration on my console. Then I have the SIP phone this is entered in my database register and nothing shows on the screen. I try to get my 2 other phones to try and register again hoping to see the registration fails and now nothing shows. Ever since the first client that was entered in the database and tried to register, any other clients that try to register doesn't show anything on the screen.


After reading a few messages on the bug tracker, I am assuming it might be a change in chan_sip.c that has changed within that day? (An Assumption of course)
Comments:By: amzaka (amzaka) 2005-01-13 07:35:08.000-0600

Well this is the same bug as 0003307 the one I got.

By: Mark Spencer (markster) 2005-01-13 08:43:20.000-0600

It sounds like some sort of a deadlock.  Please rebuild with "make clean ; make valgrind ; make install" and then get it in the "stuck state" where the non-realtime registrations don't work and attach gdb and produce a full backtrace.  That will give us a good start.  Thanks!

By: () 2005-01-13 09:37:45.000-0600

Try this patch. Disclaimer submitted.

edited on: 01-13-05 09:41

By: guddha (guddha) 2005-01-13 10:00:00.000-0600

the patch of brian23 should be:
               if (strcasecmp(tmp->name, "type")){
+                       tmp = tmp->next;
                       continue;
}

or what i have uploaded

By: () 2005-01-13 10:10:40.000-0600

isn't that what I put? not trying to be difficult :)

By: guddha (guddha) 2005-01-13 10:32:15.000-0600

writing:
               if (strcasecmp(tmp->name, "type"))
                      tmp = tmp->next;
                       continue;

first: tmp  is assigned tmp->next only when tmp_>name differ by "type";
second: continue is executed without any condition
this is not you were willing to do, i suppose

By: () 2005-01-13 10:54:46.000-0600

Oh, oops. Slight oversight. You're correct

By: raiden (raiden) 2005-01-13 12:18:24.000-0600

The patch (chan_sip.diff) did work and my SIP clients can now register. Thank you. How do we get this in CVS head?

By: Mark Spencer (markster) 2005-01-13 14:23:45.000-0600

The attached patch didn't apply but I did make the fix in CVS head both for the sip users and sip peers.  It does not appear to have involved chan_iax2.

By: Digium Subversion (svnbot) 2008-01-15 15:21:34.000-0600

Repository: asterisk
Revision: 4783

U   trunk/channels/chan_sip.c

------------------------------------------------------------------------
r4783 | markster | 2008-01-15 15:21:33 -0600 (Tue, 15 Jan 2008) | 2 lines

Fix realtime in SIP (bug ASTERISK-3264)

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

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