Re: [OpenSIPS-Users] cdr accounting on opensips restart

2011-12-19 Thread Jayesh Nambiar
Hi Razwan, This is the pastebin of logs after shutdown: http://pastebin.com/tvmrSqwB This is the pastebin of logs after start which is huge: http://pastebin.com/C6K4Jt5y --- Jayesh On Wed, Dec 7, 2011 at 5:46 PM, Razvan Crainea wrote: > Hi, Jayesh! > > I need the logs after opensips restarts.

Re: [OpenSIPS-Users] cdr accounting on opensips restart

2011-12-08 Thread Ryan Bullock
Awesome information. Dialogs seem to persist over a restart, however I am not sure if they are accounting. I will do a switch back to the defaults, better safe than sorry. Thanks, Ryan 2011/12/8 Razvan Crainea : > Hi, Ryan! > > Unfortunately it won't work. The problem is that the mysql library d

Re: [OpenSIPS-Users] cdr accounting on opensips restart

2011-12-08 Thread Razvan Crainea
Hi, Ryan! Unfortunately it won't work. The problem is that the mysql library detects both VARCHAR and VARBINARY as string types. Only BLOB and TEXT are mapped as binary objects. You can find more information here[1]. As far as I know, only the CDR accounting can generate binary data in dialog

Re: [OpenSIPS-Users] cdr accounting on opensips restart

2011-12-07 Thread Ryan Bullock
Could a VARBINARY be used here instead? We actually use a memory table for the dialog table to reduce load on our disk and it does not support BLOB or TEXT, so instead we changed it to a large VARCHAR. The mysql docs suggest you can treat a TEXT the same as a VARCHAR, but obviously there are diffe

Re: [OpenSIPS-Users] cdr accounting on opensips restart

2011-12-07 Thread Jayesh Nambiar
Hi Razvan, This actually solved the problem. Thank you very much. It was defined as VARCHAR instead of TEXT. Thank you very much for all the efforts. Really appreciate it. Need to get hold of my DB guy for the stupid mistake !! --- Jayesh On Wed, Dec 7, 2011 at 8:13 PM, Razvan Crainea wrote: > H

Re: [OpenSIPS-Users] cdr accounting on opensips restart

2011-12-07 Thread Razvan Crainea
Hi, Jayesh! Can you check in your mysql database if the vars column from the dialog table is declared as TEXT or BLOB and not CHAR? If not, please change your column into BLOB: ALTER TABLE dialog CHANGE vars vars BLOB; Regards, -- Răzvan Crainea OpenSIPS Developer On 12/07/2011 02:27 PM,

Re: [OpenSIPS-Users] cdr accounting on opensips restart

2011-12-07 Thread Razvan Crainea
Hi, Jayesh! I need the logs after opensips restarts. The result might also be pretty large. Regards, -- Răzvan Crainea OpenSIPS Developer On 12/07/2011 02:14 PM, Jayesh Nambiar wrote: Hi Razwan, I have applied the patch and made it working. Do you still only need the logs after opensips s

Re: [OpenSIPS-Users] cdr accounting on opensips restart

2011-12-07 Thread Jayesh Nambiar
Hi Razwan, I have applied the patch and made it working. Do you still only need the logs after opensips shutdown or also the logs after opensips restarts. --- Jayesh On Wed, Dec 7, 2011 at 4:35 PM, Razvan Crainea wrote: > Hi, Jayesh! > > It seems like the problem appears while parsing the strin

Re: [OpenSIPS-Users] cdr accounting on opensips restart

2011-12-07 Thread Razvan Crainea
Hi, Jayesh! It seems like the problem appears while parsing the string got from the database, so after opensips is restarted. The patch attached should give us more information about the error. Regards, -- Răzvan Crainea OpenSIPS Developer On 12/07/2011 12:37 PM, Jayesh Nambiar wrote: Thi

Re: [OpenSIPS-Users] cdr accounting on opensips restart

2011-12-07 Thread Jayesh Nambiar
This is the string what I see when I query the dialog table for vars: accX_flags# |accX_db#( 2 1 11 1002 12013386166 919833171405 0 203.153.53.158 203.153.53.136 0 17 0 2 IP India - Mobile 919 9198 2 1 2 4 0.0150 0.0130 0 0. 0.0226 1. 6 1 6 1 1 2 2 2 Aal Izz

Re: [OpenSIPS-Users] cdr accounting on opensips restart

2011-12-07 Thread Razvan Crainea
Hi, Jayesh! And what is the string in the database? You can see it in the database after you kill opensips with the following command: select vars from dialog; Regards, -- Răzvan Crainea OpenSIPS Developer On 12/07/2011 12:24 PM, Jayesh Nambiar wrote: Hi Razvan, Applied the patch and re-t

Re: [OpenSIPS-Users] cdr accounting on opensips restart

2011-12-07 Thread Jayesh Nambiar
Hi Razvan, Applied the patch and re-tested it. Here the logs that you are interested in specifically: Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: Dumping var name: value: <#026> Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: compare char

Re: [OpenSIPS-Users] cdr accounting on opensips restart

2011-12-07 Thread Razvan Crainea
Sorr, I forgot to attach it. Here it is. Regards, -- Răzvan Crainea OpenSIPS Developer On 12/07/2011 11:59 AM, Jayesh Nambiar wrote: Hi Razvan, I don't see the patch attached !! --- Jayesh On Wed, Dec 7, 2011 at 2:57 PM, Razvan Crainea mailto:razvancrai...@opensips.org>> wrote: Hi, J

Re: [OpenSIPS-Users] cdr accounting on opensips restart

2011-12-07 Thread Jayesh Nambiar
Hi Razvan, I don't see the patch attached !! --- Jayesh On Wed, Dec 7, 2011 at 2:57 PM, Razvan Crainea wrote: > Hi, Jayesh ! > > The root of the problem is the accX_flags dialog variable isn't properly > serialized. What I'm trying to find out is why this happens, that's why I > will need some

Re: [OpenSIPS-Users] cdr accounting on opensips restart

2011-12-07 Thread Razvan Crainea
Hi, Jayesh ! The root of the problem is the accX_flags dialog variable isn't properly serialized. What I'm trying to find out is why this happens, that's why I will need some extra debug as I can't figure out the problem there. So please apply this last patch and try again. It should be applie

[OpenSIPS-Users] cdr accounting on opensips restart

2011-12-06 Thread Jayesh Nambiar
Hi Razvan, I just did a fresh download from http://opensips.org/pub/opensips/latest/src/. I did apply the patch successfully and I still have the problem of CDR not being recorded after restart. Here is the syslog pasted after opensips was being shut down: Dec 6 20:20:13 dev /usr/local/sbin/opens

Re: [OpenSIPS-Users] cdr accounting on opensips restart

2011-12-06 Thread Jayesh Nambiar
Hi Razvan, I am not able to patch. I get the following: patching file dlg_db_handler.c Hunk #1 FAILED at 789. Hunk #2 FAILED at 796. 2 out of 2 hunks FAILED -- saving rejects to file dlg_db_handler.c.rej. This is what I see in dlg_db_handler.c.rej: --- dlg_db_handler.c(revision 8586) +++ dlg_d

Re: [OpenSIPS-Users] cdr accounting on opensips restart

2011-12-06 Thread Razvan Crainea
Hi, Jayesh! Something is really weird there. I've attached attached a new patch done against a fresh copy. Can you please try this one? Thanks and regards! -- Răzvan Crainea OpenSIPS Developer On 12/06/2011 01:52 PM, Jayesh Nambiar wrote: Hi Razvan, Here are the logs with Dumping var name:

Re: [OpenSIPS-Users] cdr accounting on opensips restart

2011-12-06 Thread Jayesh Nambiar
Hi Razvan, Here are the logs with Dumping var name: Dec 6 17:24:13 dev /usr/local/sbin/opensips[1958]: DBG:dialog:dialog_update_db: inserting new dialog 0x7fa29f2d0708 Dec 6 17:24:13 dev /usr/local/sbin/opensips[1958]: DBG:dialog:write_pair: Dumping var name: value: <#026> Dec 6 17:24:13 dev /

Re: [OpenSIPS-Users] cdr accounting on opensips restart

2011-12-06 Thread Razvan Crainea
Hi, Jayesh! Yes, I will need extra debugging to see what's happening. Can you send[1] the log in full debugging, taken after OpenSIPS is restarted? [1] pastebin.com Regards, -- Răzvan Crainea OpenSIPS Developer On 12/06/2011 08:13 AM, Jayesh Nambiar wrote: Hi Razvan, The dialogs are defin

Re: [OpenSIPS-Users] cdr accounting on opensips restart

2011-12-05 Thread Jayesh Nambiar
Hi Razvan, The dialogs are definitely loaded on startup and it also matches with existing dialog. I use this to make sure the dialog is matched in my script. So even after a restart, I see the Dialog Matched in my syslog. if(has_totag()) { if(match_dialog()) { log(1, "Dialog Matched

Re: [OpenSIPS-Users] cdr accounting on opensips restart

2011-12-05 Thread Razvan Crainea
Hi Jayesh, Can you please check if the dialogs are loaded back after a restart. Also, do you see any errors in your log? Regards, -- Ra(zvan Crainea OpenSIPS Developer On 12/05/2011 02:31 PM, Bogdan-Andrei Iancu wrote: Hi Jayesh, Razvan is checking the code for you and running some tests.

Re: [OpenSIPS-Users] cdr accounting on opensips restart

2011-12-05 Thread Bogdan-Andrei Iancu
Hi Jayesh, Razvan is checking the code for you and running some tests. Regards, Bogdan On 12/03/2011 02:49 PM, Jayesh Nambiar wrote: Hi Bogdan, Just writing to ask if you got a chance to check if this is a bug or some error in my config !! Thanks, --- Jayesh On Fri, Dec 2, 2011 at 11:23 A

Re: [OpenSIPS-Users] cdr accounting on opensips restart

2011-12-03 Thread Jayesh Nambiar
Hi Bogdan, Just writing to ask if you got a chance to check if this is a bug or some error in my config !! Thanks, --- Jayesh On Fri, Dec 2, 2011 at 11:23 AM, Jayesh Nambiar wrote: > Hi Bogdan, > The exact version used is 1.7.1 stable release compiled from src. Output > of opensips -V is: > ver

Re: [OpenSIPS-Users] cdr accounting on opensips restart

2011-12-01 Thread Jayesh Nambiar
Hi Bogdan, The exact version used is 1.7.1 stable release compiled from src. Output of opensips -V is: version: opensips 1.7.1-notls (x86_64/linux) flags: STATS: Off, USE_IPV6, USE_TCP, DISABLE_NAGLE, USE_MCAST, SHM_MEM, SHM_MMAP, PKG_MALLOC, F_MALLOC, FAST_LOCK-ADAPTIVE_WAIT ADAPTIVE_WAIT_LOOPS=10

Re: [OpenSIPS-Users] cdr accounting on opensips restart

2011-12-01 Thread Bogdan-Andrei Iancu
Hi Jayesh, If dialog module has restart persistence ( db modes 1, 2 and 3) the CDRs should survive across a restart. If this is not the case for you, let me know the exact version of opensips you are running (do "opensips -V"). Regards, Bogdan On 12/01/2011 12:28 PM, Jayesh Nambiar wrote: H

[OpenSIPS-Users] cdr accounting on opensips restart

2011-12-01 Thread Jayesh Nambiar
Hello All, I am planning to use CDR accounting in my script starting from version 1.7 and it looks fine and working as expected. Although I had one doubt, how do I make sure the CDR accounting still happens if the opensips is restarted and BYE comes after the restart. I have tried db_mode 3 for dia