Re: [OpenSIPS-Users] SIPTRACE sequence issue
Hi Mohammed, This is more or less a limitation ; as opensips is doing parallel processing , you may have concurrent DB access (like inserting the siptrace record for 200OK and the one for ACK)...Also the DB ops (requiring locks) may change the sequence of the ops ( the order of the queries and the order of the actual db ops). There is no way to guarantee the order of the package in DB. Regards, Bogdan MohammedShehzad wrote: Hello everybody, I am facing an issue in sip message sequence while I log the siptrace using siptrace module. The issue is random, means, generally it is fine, but sometimes the SIP messages are out of sequence i.e. ACK get logged before 200OK, even sometimes INVITE comes after 100 Trying or 180 ringing. I found that, when CDRTool list siptrace of call, the SIP messages are ordered by ID, which is auto increment field. So it seems that the siptraces are not being inserted properly in sequence from siptrace module itself. My Opensips Version : opensips-1.5.3-notls MySQL database is used, and is on remote system. Is there anything I should try to resolve this issue? Or is this bug/limitation of siptrace module itself? Regards, MohammedShehzad ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users -- Bogdan-Andrei Iancu OpenSIPS Bootcamp 15 - 19 November 2010, Edison, New Jersey, USA www.voice-system.ro ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] SIPTRACE sequence issue
I would rather say: 1) make opensips to insert in the time_stamp col the time when the message was received and not the time when the insertion in done (this will preserve the order of the packages) 2) probably a time stamp (sec only) is not eough and some microsecs needs to be added..(to order packages in the same sec). What do you thing? Regards, Bogdan MohammedShehzad wrote: I added a field microsec in database and a little change in the CDRTool - instead of ordering siptrace by id, it order by time_stamp and microsec. Though the trick did not worked. This changes were done in siptrace module. May be it could have worked if the time_stamp and microsec is being picked up from original location where function of the siptrace module is being called. As It requires modification in one level up (may be include multiple other db and sip messages related modules) I thought it would leave the code unstable. So currently not looking into code more yet. Would like to check if get more insight. Regards, MohammedShehzad What is the idea you are trying to hack ? maybe to brains are better than one ;) Regards, Bogdan MohammedShehzad wrote: On Thu, Nov 11, 2010 at 10:53 AM, MohammedShehzad wrote: Hi Bogdan, Thanks for your prompt response. I was hacking into the code of siptrace module but no success yet. Anyway something is better than nothing. Regards, MohammedShehzad Hi Mohammed, This is more or less a limitation ; as opensips is doing parallel processing , you may have concurrent DB access (like inserting the siptrace record for 200OK and the one for ACK)...Also the DB ops (requiring locks) may change the sequence of the ops ( the order of the queries and the order of the actual db ops). There is no way to guarantee the order of the package in DB. Regards, Bogdan MohammedShehzad wrote: Hello everybody, I am facing an issue in sip message sequence while I log the siptrace using siptrace module. The issue is random, means, generally it is fine, but sometimes the SIP messages are out of sequence i.e. ACK get logged before 200OK, even sometimes INVITE comes after 100 Trying or 180 ringing. I found that, when CDRTool list siptrace of call, the SIP messages are ordered by ID, which is auto increment field. So it seems that the siptraces are not being inserted properly in sequence from siptrace module itself. My Opensips Version : opensips-1.5.3-notls MySQL database is used, and is on remote system. Is there anything I should try to resolve this issue? Or is this bug/limitation of siptrace module itself? Regards, MohammedShehzad ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users -- Bogdan-Andrei Iancu OpenSIPS Bootcamp 15 - 19 November 2010, Edison, New Jersey, USA www.voice-system.ro ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] SIPTRACE sequence issue
I added a field microsec in database and a little change in the CDRTool - instead of ordering siptrace by id, it order by time_stamp and microsec. Though the trick did not worked. This changes were done in siptrace module. May be it could have worked if the time_stamp and microsec is being picked up from original location where function of the siptrace module is being called. As It requires modification in one level up (may be include multiple other db and sip messages related modules) I thought it would leave the code unstable. So currently not looking into code more yet. Would like to check if get more insight. Regards, MohammedShehzad > What is the idea you are trying to hack ? maybe to brains are better > than one ;) > > Regards, > Bogdan > > MohammedShehzad wrote: > > On Thu, Nov 11, 2010 at 10:53 AM, MohammedShehzad wrote: > > Hi Bogdan, > > > > Thanks for your prompt response. I was hacking into the code of > > siptrace module but no success yet. Anyway something is better than > > nothing. > > > > Regards, > > MohammedShehzad > > > > > >> Hi Mohammed, > >> > >> This is more or less a limitation ; as opensips is doing parallel > >> processing , you may have concurrent DB access (like inserting the > >> siptrace record for 200OK and the one for ACK)...Also the DB ops > >> (requiring locks) may change the sequence of the ops ( the order of the > >> queries and the order of the actual db ops). > >> > >> There is no way to guarantee the order of the package in DB. > >> > >> Regards, > >> Bogdan > >> > >> MohammedShehzad wrote: > >> > Hello everybody, > >> > > >> > I am facing an issue in sip message sequence while I log the siptrace > >> > using siptrace module. > >> > The issue is random, means, generally it is fine, but sometimes the > >> > SIP messages are out of sequence i.e. ACK get logged before 200OK, > >> > even sometimes INVITE comes after 100 Trying or 180 ringing. > >> > > >> > I found that, when CDRTool list siptrace of call, the SIP messages are > >> > ordered by ID, which is auto increment field. So it seems that the > >> > siptraces are not being inserted properly in sequence from siptrace > >> > module itself. > >> > My Opensips Version : opensips-1.5.3-notls > >> > MySQL database is used, and is on remote system. > >> > > >> > Is there anything I should try to resolve this issue? Or is this > >> > bug/limitation of siptrace module itself? > >> > Regards, > >> > MohammedShehzad > > ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] SIPTRACE sequence issue
What is the idea you are trying to hack ? maybe to brains are better than one ;) Regards, Bogdan MohammedShehzad wrote: Hi Bogdan, Thanks for your prompt response. I was hacking into the code of siptrace module but no success yet. Anyway something is better than nothing. Regards, MohammedShehzad Hi Mohammed, This is more or less a limitation ; as opensips is doing parallel processing , you may have concurrent DB access (like inserting the siptrace record for 200OK and the one for ACK)...Also the DB ops (requiring locks) may change the sequence of the ops ( the order of the queries and the order of the actual db ops). There is no way to guarantee the order of the package in DB. Regards, Bogdan MohammedShehzad wrote: Hello everybody, I am facing an issue in sip message sequence while I log the siptrace using siptrace module. The issue is random, means, generally it is fine, but sometimes the SIP messages are out of sequence i.e. ACK get logged before 200OK, even sometimes INVITE comes after 100 Trying or 180 ringing. I found that, when CDRTool list siptrace of call, the SIP messages are ordered by ID, which is auto increment field. So it seems that the siptraces are not being inserted properly in sequence from siptrace module itself. My Opensips Version : opensips-1.5.3-notls MySQL database is used, and is on remote system. Is there anything I should try to resolve this issue? Or is this bug/limitation of siptrace module itself? Regards, MohammedShehzad ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users -- Bogdan-Andrei Iancu OpenSIPS Bootcamp 15 - 19 November 2010, Edison, New Jersey, USA www.voice-system.ro ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] SIPTRACE sequence issue
Hi Bogdan, Thanks for your prompt response. I was hacking into the code of siptrace module but no success yet. Anyway something is better than nothing. Regards, MohammedShehzad > Hi Mohammed, > > This is more or less a limitation ; as opensips is doing parallel > processing , you may have concurrent DB access (like inserting the > siptrace record for 200OK and the one for ACK)...Also the DB ops > (requiring locks) may change the sequence of the ops ( the order of the > queries and the order of the actual db ops). > > There is no way to guarantee the order of the package in DB. > > Regards, > Bogdan > > MohammedShehzad wrote: > > Hello everybody, > > > > I am facing an issue in sip message sequence while I log the siptrace > > using siptrace module. > > The issue is random, means, generally it is fine, but sometimes the > > SIP messages are out of sequence i.e. ACK get logged before 200OK, > > even sometimes INVITE comes after 100 Trying or 180 ringing. > > > > I found that, when CDRTool list siptrace of call, the SIP messages are > > ordered by ID, which is auto increment field. So it seems that the > > siptraces are not being inserted properly in sequence from siptrace > > module itself. > > My Opensips Version : opensips-1.5.3-notls > > MySQL database is used, and is on remote system. > > > > Is there anything I should try to resolve this issue? Or is this > > bug/limitation of siptrace module itself? > > Regards, > > MohammedShehzad ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
[OpenSIPS-Users] SIPTRACE sequence issue
Hello everybody, I am facing an issue in sip message sequence while I log the siptrace using siptrace module. The issue is random, means, generally it is fine, but sometimes the SIP messages are out of sequence i.e. ACK get logged before 200OK, even sometimes INVITE comes after 100 Trying or 180 ringing. I found that, when CDRTool list siptrace of call, the SIP messages are ordered by ID, which is auto increment field. So it seems that the siptraces are not being inserted properly in sequence from siptrace module itself. My Opensips Version : opensips-1.5.3-notls MySQL database is used, and is on remote system. Is there anything I should try to resolve this issue? Or is this bug/limitation of siptrace module itself? Regards, MohammedShehzad ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users