Re: [OpenSIPS-Users] cdr accounting on opensips restart
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 razvancrai...@opensips.orgwrote: 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 shutdown or also the logs after opensips restarts. --- Jayesh On Wed, Dec 7, 2011 at 4:35 PM, Razvan Crainea razvancrai...@opensips.org wrote: 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: 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 Well Aal Izz Well 1 3 1.2.3.4|accX_leg#|accX_core# INVITE/ 100eb870-9e3599cb-13c4-50029-3b71-60de50d0-3b71\# 97.208.30.751120+1+31850054+b8c0a68/ 100f7670-9e3599cb-13c4-50029-3b71-3c625412-3b71 200 O á=ÃN |accX_created#Ã=ÃN| --- Jayesh On Wed, Dec 7, 2011 at 4:00 PM, Razvan Crainea razvancrai...@opensips.org wrote: 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-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: accX_flags value: #026 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: compare char 22 - 0 - 11 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: compare char 0 - 1 - 12 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: compare char 0 - 2 - 13 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: compare char 0 - 3 - 14 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: Serialized string accX_flags##026 (16) Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: 0) char: a hex: 61 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: 1) char: c hex: 63 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: 2) char: c hex: 63 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: 3) char: X hex: 58 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: 4) char: _ hex: 5F Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: 5) char: f hex: 66 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: 6) char: l hex: 6C Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: 7) char: a hex: 61 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: 8) char: g hex: 67 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: 9) char: s hex: 73 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: 10) char: # hex: 23 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: 11) char: #026 hex: 16 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: 12) char: #000 hex: 00 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: 13) char: #000 hex: 00 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: 14) char: #000 hex: 00 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: 15) char: | hex: 7C Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: Dumping var name: accX_db value: ( Apart from this, I have pasted everything in syslog after opensips shutdown in the paste-bin here: http://pastebin.com/gx0ZxFLb Let me know if there is anything more to test. --- Jayesh On Wed, Dec 7, 2011 at 3:36 PM, Razvan Crainea razvancrai...@opensips.org wrote: 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 razvancrai...@opensips.org wrote: Hi, Jayesh ! The root of the problem is the accX_flags dialog
Re: [OpenSIPS-Users] cdr accounting on opensips restart
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 variables, so if you don't use this feature you can leave it as it is for now. But if you find any problems related to dialog persistence over restart I strongly advise you to change your columns type to the default ones. [1] http://dev.mysql.com/doc/refman/5.0/en/c-api-data-structures.html Regards, -- Răzvan Crainea OpenSIPS Developer On 12/07/2011 08:40 PM, Ryan Bullock wrote: 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 differences. Regards, Ryan On Wed, Dec 7, 2011 at 9:51 AM, Jayesh Nambiarjayesh.v...@gmail.com wrote: 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 Crainearazvancrai...@opensips.org wrote: 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, Jayesh Nambiar wrote: 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 ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] cdr accounting on opensips restart
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 razvancrai...@opensips.org: 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 variables, so if you don't use this feature you can leave it as it is for now. But if you find any problems related to dialog persistence over restart I strongly advise you to change your columns type to the default ones. [1] http://dev.mysql.com/doc/refman/5.0/en/c-api-data-structures.html Regards, -- Răzvan Crainea OpenSIPS Developer On 12/07/2011 08:40 PM, Ryan Bullock wrote: 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 differences. Regards, Ryan On Wed, Dec 7, 2011 at 9:51 AM, Jayesh Nambiar jayesh.v...@gmail.com wrote: 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 razvancrai...@opensips.org wrote: 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, Jayesh Nambiar wrote: 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 ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] cdr accounting on opensips restart
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 applied after the previous patch I've sent you, so you won't need another fresh checkout. This time there will be a lot of dumped info in the log, so I would really appreciate if you could send them over pastebin. The only part that I will be interested in is between these lines: DBG:dialog:write_pair: Dumping var name: accX_flags value: #026 and DBG:dialog:write_pair: Dumping var name: accX_db value: ( Thank you very much for testing! Regards, -- Răzvan Crainea OpenSIPS Developer On 12/06/2011 07:57 PM, Jayesh Nambiar wrote: 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/opensips[ 15700]: DBG:dialog:dialog_update_db: inserting new dialog 0x7f3d323bd5f8 Dec 6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_pair: Dumping var name: accX_flags value: #026 Dec 6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_pair: Serialized string accX_flags##026 (16) Dec 6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_pair: Dumping var name: accX_db value: ( Dec 6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_pair: Serialized string accX_db#( (263) Dec 6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_pair: Dumping var name: accX_leg value: Dec 6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_pair: Serialized string accX_leg# (14) Dec 6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_pair: Dumping var name: accX_core value: #006 Dec 6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_pair: escaping char 53 Dec 6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_pair: Serialized string accX_core##006 (165) Dec 6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_pair: Dumping var name: accX_created value: 95+ÃN Dec 6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_pair: Serialized string accX_created#95+ÃN (22) Dec 6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_dialog_vars: var string is accX_flags##026(480) Dec 6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_pair: Dumping var name: carrierChannels value: 1002 Dec 6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_pair: Serialized string carrierChannels#1002| (21) Dec 6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_pair: Dumping var name: carrierChannels value: 1003 Dec 6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_pair: Serialized string carrierChannels#1003| (21) Dec 6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_pair: Dumping var name: carrierChannels value: 1007 Dec 6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_pair: Serialized string carrierChannels#1007| (21) Dec 6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_dialog_profiles: profile string is carrierChannels#1002|carrierChannels#1003|carrierChannels#1007|(63) Dec 6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:db_mysql:has_stmt_ctx: ctx found for dialog Dec 6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:db_mysql:db_mysql_do_prepared_query: conn=0x810858 (tail=8454488) MC=0x8101b8 Dec 6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:db_mysql:db_mysql_do_prepared_query: set values for the statement run I hope this will help you figure out something more relevant. --- Jayesh On Tue, Dec 6, 2011 at 7:56 PM, Razvan Crainea razvancrai...@opensips.org mailto:razvancrai...@opensips.org wrote: Hi, Jayesh! Can you post your dlg_db_handler.c file on pastebin? I think you are using an old version of the dialog module, and that's why you have this problem. Regards, -- Răzvan Crainea OpenSIPS Developer ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] cdr accounting on opensips restart
Hi Razvan, I don't see the patch attached !! --- Jayesh On Wed, Dec 7, 2011 at 2:57 PM, Razvan Crainea razvancrai...@opensips.orgwrote: 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 applied after the previous patch I've sent you, so you won't need another fresh checkout. This time there will be a lot of dumped info in the log, so I would really appreciate if you could send them over pastebin. The only part that I will be interested in is between these lines: DBG:dialog:write_pair: Dumping var name: accX_flags value: #026 and DBG:dialog:write_pair: Dumping var name: accX_db value: ( Thank you very much for testing! Regards, -- Răzvan Crainea OpenSIPS Developer On 12/06/2011 07:57 PM, Jayesh Nambiar wrote: 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/opensips[ 15700]: DBG:dialog:dialog_update_db: inserting new dialog 0x7f3d323bd5f8 Dec 6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_pair: Dumping var name: accX_flags value: #026 Dec 6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_pair: Serialized string accX_flags##026 (16) Dec 6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_pair: Dumping var name: accX_db value: ( Dec 6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_pair: Serialized string accX_db#( (263) Dec 6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_pair: Dumping var name: accX_leg value: Dec 6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_pair: Serialized string accX_leg# (14) Dec 6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_pair: Dumping var name: accX_core value: #006 Dec 6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_pair: escaping char 53 Dec 6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_pair: Serialized string accX_core##006 (165) Dec 6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_pair: Dumping var name: accX_created value: 95+ÃN Dec 6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_pair: Serialized string accX_created#95+ÃN (22) Dec 6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_dialog_vars: var string is accX_flags##026(480) Dec 6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_pair: Dumping var name: carrierChannels value: 1002 Dec 6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_pair: Serialized string carrierChannels#1002| (21) Dec 6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_pair: Dumping var name: carrierChannels value: 1003 Dec 6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_pair: Serialized string carrierChannels#1003| (21) Dec 6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_pair: Dumping var name: carrierChannels value: 1007 Dec 6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_pair: Serialized string carrierChannels#1007| (21) Dec 6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_dialog_profiles: profile string is carrierChannels#1002|carrierChannels#1003|carrierChannels#1007|(63) Dec 6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:db_mysql:has_stmt_ctx: ctx found for dialog Dec 6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:db_mysql:db_mysql_do_prepared_query: conn=0x810858 (tail=8454488) MC=0x8101b8 Dec 6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:db_mysql:db_mysql_do_prepared_query: set values for the statement run I hope this will help you figure out something more relevant. --- Jayesh On Tue, Dec 6, 2011 at 7:56 PM, Razvan Crainea razvancrai...@opensips.org wrote: Hi, Jayesh! Can you post your dlg_db_handler.c file on pastebin? I think you are using an old version of the dialog module, and that's why you have this problem. Regards, -- Răzvan Crainea OpenSIPS Developer ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] cdr accounting on opensips restart
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 razvancrai...@opensips.org mailto:razvancrai...@opensips.org 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 extra debug as I can't figure out the problem there. So please apply this last patch and try again. It should be applied after the previous patch I've sent you, so you won't need another fresh checkout. This time there will be a lot of dumped info in the log, so I would really appreciate if you could send them over pastebin. The only part that I will be interested in is between these lines: DBG:dialog:write_pair: Dumping var name: accX_flags value: #026 and DBG:dialog:write_pair: Dumping var name: accX_db value: ( Thank you very much for testing! Regards, -- Răzvan Crainea OpenSIPS Developer On 12/06/2011 07:57 PM, Jayesh Nambiar wrote: 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/opensips[ 15700]: DBG:dialog:dialog_update_db: inserting new dialog 0x7f3d323bd5f8 Dec 6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_pair: Dumping var name: accX_flags value: #026 Dec 6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_pair: Serialized string accX_flags##026 (16) Dec 6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_pair: Dumping var name: accX_db value: ( Dec 6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_pair: Serialized string accX_db#( (263) Dec 6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_pair: Dumping var name: accX_leg value: Dec 6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_pair: Serialized string accX_leg# (14) Dec 6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_pair: Dumping var name: accX_core value: #006 Dec 6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_pair: escaping char 53 Dec 6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_pair: Serialized string accX_core##006 (165) Dec 6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_pair: Dumping var name: accX_created value: 95+ÃN Dec 6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_pair: Serialized string accX_created#95+ÃN (22) Dec 6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_dialog_vars: var string is accX_flags##026(480) Dec 6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_pair: Dumping var name: carrierChannels value: 1002 Dec 6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_pair: Serialized string carrierChannels#1002| (21) Dec 6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_pair: Dumping var name: carrierChannels value: 1003 Dec 6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_pair: Serialized string carrierChannels#1003| (21) Dec 6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_pair: Dumping var name: carrierChannels value: 1007 Dec 6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_pair: Serialized string carrierChannels#1007| (21) Dec 6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_dialog_profiles: profile string is carrierChannels#1002|carrierChannels#1003|carrierChannels#1007|(63) Dec 6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:db_mysql:has_stmt_ctx: ctx found for dialog Dec 6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:db_mysql:db_mysql_do_prepared_query: conn=0x810858 (tail=8454488) MC=0x8101b8 Dec 6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:db_mysql:db_mysql_do_prepared_query: set values for the statement run I hope this will help you figure out something more relevant. --- Jayesh On Tue, Dec 6, 2011 at 7:56 PM, Razvan Crainea razvancrai...@opensips.org mailto:razvancrai...@opensips.org wrote: Hi, Jayesh! Can you post your dlg_db_handler.c file on pastebin? I think you are using an old version of the dialog module, and that's why you have this problem. Regards, -- Răzvan Crainea OpenSIPS Developer --- modules/dialog/dlg_db_handler.c 2011-12-06
Re: [OpenSIPS-Users] cdr accounting on opensips restart
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: accX_flags value: #026 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: compare char 22 - 0 - 11 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: compare char 0 - 1 - 12 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: compare char 0 - 2 - 13 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: compare char 0 - 3 - 14 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: Serialized string accX_flags##026 (16) Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: 0) char: a hex: 61 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: 1) char: c hex: 63 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: 2) char: c hex: 63 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: 3) char: X hex: 58 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: 4) char: _ hex: 5F Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: 5) char: f hex: 66 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: 6) char: l hex: 6C Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: 7) char: a hex: 61 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: 8) char: g hex: 67 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: 9) char: s hex: 73 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: 10) char: # hex: 23 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: 11) char: #026 hex: 16 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: 12) char: #000 hex: 00 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: 13) char: #000 hex: 00 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: 14) char: #000 hex: 00 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: 15) char: | hex: 7C Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: Dumping var name: accX_db value: ( Apart from this, I have pasted everything in syslog after opensips shutdown in the paste-bin here: http://pastebin.com/gx0ZxFLb Let me know if there is anything more to test. --- Jayesh On Wed, Dec 7, 2011 at 3:36 PM, Razvan Crainea razvancrai...@opensips.orgwrote: 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 razvancrai...@opensips.org 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 extra debug as I can't figure out the problem there. So please apply this last patch and try again. It should be applied after the previous patch I've sent you, so you won't need another fresh checkout. This time there will be a lot of dumped info in the log, so I would really appreciate if you could send them over pastebin. The only part that I will be interested in is between these lines: DBG:dialog:write_pair: Dumping var name: accX_flags value: #026 and DBG:dialog:write_pair: Dumping var name: accX_db value: ( Thank you very much for testing! Regards, -- Răzvan Crainea OpenSIPS Developer On 12/06/2011 07:57 PM, Jayesh Nambiar wrote: 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/opensips[ 15700]: DBG:dialog:dialog_update_db: inserting new dialog 0x7f3d323bd5f8 Dec 6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_pair: Dumping var name: accX_flags value: #026 Dec 6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_pair: Serialized string accX_flags##026 (16) Dec 6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_pair: Dumping var name: accX_db value: ( Dec 6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_pair: Serialized string accX_db#( (263) Dec 6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_pair: Dumping var name: accX_leg value: Dec 6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_pair: Serialized string accX_leg# (14) Dec 6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_pair: Dumping var name: accX_core value: #006 Dec 6 20:20:13 dev
Re: [OpenSIPS-Users] cdr accounting on opensips restart
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-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: accX_flags value: #026 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: compare char 22 - 0 - 11 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: compare char 0 - 1 - 12 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: compare char 0 - 2 - 13 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: compare char 0 - 3 - 14 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: Serialized string accX_flags##026 (16) Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: 0) char: a hex: 61 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: 1) char: c hex: 63 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: 2) char: c hex: 63 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: 3) char: X hex: 58 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: 4) char: _ hex: 5F Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: 5) char: f hex: 66 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: 6) char: l hex: 6C Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: 7) char: a hex: 61 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: 8) char: g hex: 67 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: 9) char: s hex: 73 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: 10) char: # hex: 23 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: 11) char: #026 hex: 16 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: 12) char: #000 hex: 00 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: 13) char: #000 hex: 00 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: 14) char: #000 hex: 00 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: 15) char: | hex: 7C Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: Dumping var name: accX_db value: ( Apart from this, I have pasted everything in syslog after opensips shutdown in the paste-bin here: http://pastebin.com/gx0ZxFLb Let me know if there is anything more to test. --- Jayesh On Wed, Dec 7, 2011 at 3:36 PM, Razvan Crainea razvancrai...@opensips.org mailto:razvancrai...@opensips.org wrote: 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 razvancrai...@opensips.org mailto:razvancrai...@opensips.org 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 extra debug as I can't figure out the problem there. So please apply this last patch and try again. It should be applied after the previous patch I've sent you, so you won't need another fresh checkout. This time there will be a lot of dumped info in the log, so I would really appreciate if you could send them over pastebin. The only part that I will be interested in is between these lines: DBG:dialog:write_pair: Dumping var name: accX_flags value: #026 and DBG:dialog:write_pair: Dumping var name: accX_db value: ( Thank you very much for testing! Regards, -- Răzvan Crainea OpenSIPS Developer On 12/06/2011 07:57 PM, Jayesh Nambiar wrote: 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/opensips[ 15700]: DBG:dialog:dialog_update_db: inserting new dialog 0x7f3d323bd5f8 Dec 6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_pair: Dumping var name: accX_flags value: #026 Dec 6 20:20:13 dev /usr/local/sbin/opensips[15700]:
Re: [OpenSIPS-Users] cdr accounting on opensips restart
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 Well Aal Izz Well 1 3 1.2.3.4|accX_leg#|accX_core# INVITE/ 100eb870-9e3599cb-13c4-50029-3b71-60de50d0-3b71\# 97.208.30.751120+1+31850054+b8c0a68/ 100f7670-9e3599cb-13c4-50029-3b71-3c625412-3b71 200 O á=ÃN |accX_created#Ã=ÃN| --- Jayesh On Wed, Dec 7, 2011 at 4:00 PM, Razvan Crainea razvancrai...@opensips.orgwrote: 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-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: accX_flags value: #026 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: compare char 22 - 0 - 11 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: compare char 0 - 1 - 12 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: compare char 0 - 2 - 13 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: compare char 0 - 3 - 14 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: Serialized string accX_flags##026 (16) Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: 0) char: a hex: 61 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: 1) char: c hex: 63 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: 2) char: c hex: 63 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: 3) char: X hex: 58 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: 4) char: _ hex: 5F Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: 5) char: f hex: 66 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: 6) char: l hex: 6C Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: 7) char: a hex: 61 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: 8) char: g hex: 67 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: 9) char: s hex: 73 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: 10) char: # hex: 23 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: 11) char: #026 hex: 16 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: 12) char: #000 hex: 00 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: 13) char: #000 hex: 00 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: 14) char: #000 hex: 00 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: 15) char: | hex: 7C Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: Dumping var name: accX_db value: ( Apart from this, I have pasted everything in syslog after opensips shutdown in the paste-bin here: http://pastebin.com/gx0ZxFLb Let me know if there is anything more to test. --- Jayesh On Wed, Dec 7, 2011 at 3:36 PM, Razvan Crainea razvancrai...@opensips.org wrote: 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 razvancrai...@opensips.org 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 extra debug as I can't figure out the problem there. So please apply this last patch and try again. It should be applied after the previous patch I've sent you, so you won't need another fresh checkout. This time there will be a lot of dumped info in the log, so I would really appreciate if you could send them over pastebin. The only part that I will be interested in is between these lines: DBG:dialog:write_pair: Dumping var name: accX_flags value: #026 and DBG:dialog:write_pair: Dumping var name: accX_db value: ( Thank you very much for testing! Regards, -- Răzvan Crainea OpenSIPS Developer On 12/06/2011 07:57 PM, Jayesh Nambiar wrote: 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
Re: [OpenSIPS-Users] cdr accounting on opensips restart
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: 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 Well Aal Izz Well 1 3 1.2.3.4|accX_leg#|accX_core# INVITE/ 100eb870-9e3599cb-13c4-50029-3b71-60de50d0-3b71\# 97.208.30.751120+1+31850054+b8c0a68/ 100f7670-9e3599cb-13c4-50029-3b71-3c625412-3b71 200 O á=ÃN |accX_created#Ã=ÃN| --- Jayesh On Wed, Dec 7, 2011 at 4:00 PM, Razvan Crainea razvancrai...@opensips.org mailto:razvancrai...@opensips.org wrote: 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-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: accX_flags value: #026 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: compare char 22 - 0 - 11 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: compare char 0 - 1 - 12 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: compare char 0 - 2 - 13 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: compare char 0 - 3 - 14 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: Serialized string accX_flags##026 (16) Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: 0) char: a hex: 61 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: 1) char: c hex: 63 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: 2) char: c hex: 63 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: 3) char: X hex: 58 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: 4) char: _ hex: 5F Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: 5) char: f hex: 66 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: 6) char: l hex: 6C Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: 7) char: a hex: 61 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: 8) char: g hex: 67 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: 9) char: s hex: 73 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: 10) char: # hex: 23 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: 11) char: #026 hex: 16 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: 12) char: #000 hex: 00 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: 13) char: #000 hex: 00 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: 14) char: #000 hex: 00 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: 15) char: | hex: 7C Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: Dumping var name: accX_db value: ( Apart from this, I have pasted everything in syslog after opensips shutdown in the paste-bin here: http://pastebin.com/gx0ZxFLb Let me know if there is anything more to test. --- Jayesh On Wed, Dec 7, 2011 at 3:36 PM, Razvan Crainea razvancrai...@opensips.org mailto:razvancrai...@opensips.org wrote: 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 razvancrai...@opensips.org mailto:razvancrai...@opensips.org 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 extra debug as I can't figure out the problem there. So please apply this last patch and try again. It should be applied after the previous patch I've sent
Re: [OpenSIPS-Users] cdr accounting on opensips restart
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 razvancrai...@opensips.orgwrote: 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: 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 Well Aal Izz Well 1 3 1.2.3.4|accX_leg#|accX_core# INVITE/ 100eb870-9e3599cb-13c4-50029-3b71-60de50d0-3b71\# 97.208.30.751120+1+31850054+b8c0a68/ 100f7670-9e3599cb-13c4-50029-3b71-3c625412-3b71 200 O á=ÃN |accX_created#Ã=ÃN| --- Jayesh On Wed, Dec 7, 2011 at 4:00 PM, Razvan Crainea razvancrai...@opensips.org wrote: 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-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: accX_flags value: #026 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: compare char 22 - 0 - 11 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: compare char 0 - 1 - 12 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: compare char 0 - 2 - 13 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: compare char 0 - 3 - 14 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: Serialized string accX_flags##026 (16) Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: 0) char: a hex: 61 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: 1) char: c hex: 63 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: 2) char: c hex: 63 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: 3) char: X hex: 58 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: 4) char: _ hex: 5F Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: 5) char: f hex: 66 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: 6) char: l hex: 6C Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: 7) char: a hex: 61 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: 8) char: g hex: 67 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: 9) char: s hex: 73 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: 10) char: # hex: 23 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: 11) char: #026 hex: 16 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: 12) char: #000 hex: 00 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: 13) char: #000 hex: 00 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: 14) char: #000 hex: 00 Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: 15) char: | hex: 7C Dec 7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair: Dumping var name: accX_db value: ( Apart from this, I have pasted everything in syslog after opensips shutdown in the paste-bin here: http://pastebin.com/gx0ZxFLb Let me know if there is anything more to test. --- Jayesh On Wed, Dec 7, 2011 at 3:36 PM, Razvan Crainea razvancrai...@opensips.org wrote: 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 razvancrai...@opensips.org 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 extra debug as I can't figure out the problem there. So please apply this last patch and try again. It should be applied after the previous patch I've sent you, so you won't need another fresh checkout. This time there will be a lot of dumped info in the log, so I would really appreciate if you could send them over pastebin. The only part that I will be
Re: [OpenSIPS-Users] cdr accounting on opensips restart
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 shutdown or also the logs after opensips restarts. --- Jayesh ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] cdr accounting on opensips restart
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, Jayesh Nambiar wrote: 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 ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] cdr accounting on opensips restart
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 razvancrai...@opensips.orgwrote: 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, Jayesh Nambiar wrote: 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 ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] cdr accounting on opensips restart
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 differences. Regards, Ryan On Wed, Dec 7, 2011 at 9:51 AM, Jayesh Nambiar jayesh.v...@gmail.com wrote: 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 razvancrai...@opensips.org wrote: 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, Jayesh Nambiar wrote: 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 ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] cdr accounting on opensips restart
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 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); route(default_relay); exit; } } But it is just that the cdr insert does not take place after the restart !! My debug level was at 3. Do you want more detailed logs to check?? Thanks, --- Jayesh On Mon, Dec 5, 2011 at 7:12 PM, Razvan Crainea razvancrai...@opensips.org mailto:razvancrai...@opensips.org wrote: 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, -- Ră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. 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 AM, Jayesh Nambiar jayesh.v...@gmail.com mailto:jayesh.v...@gmail.com wrote: 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=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535 poll method support: poll, epoll_lt, epoll_et, sigio_rt, select. svnrevision: unknown @(#) $Id: main.c 8537 2011-11-08 17:02:11Z bogdan_iancu $ main.c compiled on 16:59:52 Dec 1 2011 with gcc 4.4.5 The CDR does not survive a restart. Anything else to be enabled or added in the script or to be looked at? Thanks, --- Jayesh On Thu, Dec 1, 2011 at 10:35 PM, Bogdan-Andrei Iancu bog...@opensips.org mailto:bog...@opensips.org wrote: 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: 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 dialog module so that it dumps all the dialogs while shutdown and on start it fetches the dialog from the DB. This method makes sure the dialog is matched when BYE comes after the restart but the CDR record is not entered. Is there any flag or dialog variable that I should set to insert that value in the table for all dialogs when opensips shuts off so that opensips knows that the CDR flag was set for this dialog when started again and it has to insert the record? Do let me know for any pointers or ideas to get this done. Thanks in advance. --- Jayesh ___ Users mailing list Users@lists.opensips.org mailto:Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users -- Bogdan-Andrei Iancu OpenSIPS Founder and Developer OpenSIPS solutions and know-how -- Bogdan-Andrei Iancu OpenSIPS Founder and Developer OpenSIPS solutions and know-how ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] cdr accounting on opensips restart
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: accX_flags value: #026 Dec 6 17:24:13 dev /usr/local/sbin/opensips[1958]: DBG:dialog:write_pair: Dumping var name: accX_db value: ( Dec 6 17:24:13 dev /usr/local/sbin/opensips[1958]: DBG:dialog:write_pair: Dumping var name: accX_leg value: Dec 6 17:24:13 dev /usr/local/sbin/opensips[1958]: DBG:dialog:write_pair: Dumping var name: accX_core value: #006 Dec 6 17:24:13 dev /usr/local/sbin/opensips[1958]: DBG:dialog:write_pair: Dumping var name: accX_created value: G#002ÃN Dec 6 17:24:13 dev /usr/local/sbin/opensips[1958]: DBG:dialog:write_dialog_vars: var string is accX_flags##026(481) Dec 6 17:24:13 dev /usr/local/sbin/opensips[1958]: DBG:dialog:write_pair: Dumping var name: carrierChannels value: 1002 Dec 6 17:24:13 dev /usr/local/sbin/opensips[1958]: DBG:dialog:write_pair: Dumping var name: carrierChannels value: 1003 Dec 6 17:24:13 dev /usr/local/sbin/opensips[1958]: DBG:dialog:write_pair: Dumping var name: carrierChannels value: 1007 Let me know if this helps. Thanks, --- Jayesh On Tue, Dec 6, 2011 at 4:32 PM, Razvan Crainea razvancrai...@opensips.orgwrote: Hi, Jayesh! Can you please apply the patch I've attached? And then mail me back the log, but this time taken just after OpenSIPS shuts down with an active dialog. The log should contain the following strings: Dumping var name: and var string is They should appear before OpenSIPS stops with an active dialog, so -- Răzvan Crainea OpenSIPS Developer On 12/06/2011 12:13 PM, Jayesh Nambiar wrote: Hi Razvan, The logs with debug level 9 are pasted here: After restarting I disconnected the call, the dialog matched perfectly but no CDR record. --- Jayesh On Tue, Dec 6, 2011 at 2:50 PM, Razvan Crainea razvancrai...@opensips.org wrote: 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 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); route(default_relay); exit; } } But it is just that the cdr insert does not take place after the restart !! My debug level was at 3. Do you want more detailed logs to check?? Thanks, --- Jayesh On Mon, Dec 5, 2011 at 7:12 PM, Razvan Crainea razvancrai...@opensips.org wrote: 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, -- Ră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. 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 AM, Jayesh Nambiar jayesh.v...@gmail.comwrote: 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=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535 poll method support: poll, epoll_lt, epoll_et, sigio_rt, select. svnrevision: unknown @(#) $Id: main.c 8537 2011-11-08 17:02:11Z bogdan_iancu $ main.c compiled on 16:59:52 Dec 1 2011 with gcc 4.4.5 The CDR does not survive a restart. Anything else to be enabled or added in the script or to be looked at? Thanks, --- Jayesh On Thu, Dec 1, 2011 at 10:35 PM, Bogdan-Andrei Iancu bog...@opensips.org wrote: 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: 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 dialog module so that it dumps all the dialogs while shutdown and on
Re: [OpenSIPS-Users] cdr accounting on opensips restart
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: 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: accX_flags value: #026 Dec 6 17:24:13 dev /usr/local/sbin/opensips[1958]: DBG:dialog:write_pair: Dumping var name: accX_db value: ( Dec 6 17:24:13 dev /usr/local/sbin/opensips[1958]: DBG:dialog:write_pair: Dumping var name: accX_leg value: Dec 6 17:24:13 dev /usr/local/sbin/opensips[1958]: DBG:dialog:write_pair: Dumping var name: accX_core value: #006 Dec 6 17:24:13 dev /usr/local/sbin/opensips[1958]: DBG:dialog:write_pair: Dumping var name: accX_created value: G#002ÃN Dec 6 17:24:13 dev /usr/local/sbin/opensips[1958]: DBG:dialog:write_dialog_vars: var string is accX_flags##026(481) Dec 6 17:24:13 dev /usr/local/sbin/opensips[1958]: DBG:dialog:write_pair: Dumping var name: carrierChannels value: 1002 Dec 6 17:24:13 dev /usr/local/sbin/opensips[1958]: DBG:dialog:write_pair: Dumping var name: carrierChannels value: 1003 Dec 6 17:24:13 dev /usr/local/sbin/opensips[1958]: DBG:dialog:write_pair: Dumping var name: carrierChannels value: 1007 Let me know if this helps. Thanks, --- Jayesh On Tue, Dec 6, 2011 at 4:32 PM, Razvan Crainea razvancrai...@opensips.org mailto:razvancrai...@opensips.org wrote: Hi, Jayesh! Can you please apply the patch I've attached? And then mail me back the log, but this time taken just after OpenSIPS shuts down with an active dialog. The log should contain the following strings: Dumping var name: and var string is They should appear before OpenSIPS stops with an active dialog, so -- Răzvan Crainea OpenSIPS Developer On 12/06/2011 12:13 PM, Jayesh Nambiar wrote: Hi Razvan, The logs with debug level 9 are pasted here: After restarting I disconnected the call, the dialog matched perfectly but no CDR record. --- Jayesh On Tue, Dec 6, 2011 at 2:50 PM, Razvan Crainea razvancrai...@opensips.org mailto:razvancrai...@opensips.org wrote: 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 http://pastebin.com Regards, -- Răzvan Crainea OpenSIPS Developer On 12/06/2011 08:13 AM, Jayesh Nambiar wrote: 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); route(default_relay); exit; } } But it is just that the cdr insert does not take place after the restart !! My debug level was at 3. Do you want more detailed logs to check?? Thanks, --- Jayesh On Mon, Dec 5, 2011 at 7:12 PM, Razvan Crainea razvancrai...@opensips.org mailto:razvancrai...@opensips.org wrote: 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, -- Ră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. 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 AM, Jayesh Nambiar jayesh.v...@gmail.com mailto:jayesh.v...@gmail.com wrote: 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=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535 poll
Re: [OpenSIPS-Users] cdr accounting on opensips restart
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_db_handler.c(working copy) @@ -789,6 +789,9 @@ { int i,j; + LM_DBG(Dumping var name: %.*s value: %.*s\n, + name-len, name-s, val-len, val-s); + for( i=0,j=0 ; iname-len ; i++) { if (name-s[i]=='|' || name-s[i]=='#' || name-s[i]=='\\') b[j++] = '\\'; I must admit that earlier also I was not able to patch properly but looking at the patch file I just added the line: LM_DBG(Dumping var name: %.*s value: %.*s\n, name-len, name-s, val-len, val-s); after int i,j at line 790 in file dlg_db_handler.c and then recompiled. Anything else I can do for the patch to work properly. --- Jayesh On Tue, Dec 6, 2011 at 7:19 PM, Razvan Crainea razvancrai...@opensips.orgwrote: 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: 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: accX_flags value: #026 Dec 6 17:24:13 dev /usr/local/sbin/opensips[1958]: DBG:dialog:write_pair: Dumping var name: accX_db value: ( Dec 6 17:24:13 dev /usr/local/sbin/opensips[1958]: DBG:dialog:write_pair: Dumping var name: accX_leg value: Dec 6 17:24:13 dev /usr/local/sbin/opensips[1958]: DBG:dialog:write_pair: Dumping var name: accX_core value: #006 Dec 6 17:24:13 dev /usr/local/sbin/opensips[1958]: DBG:dialog:write_pair: Dumping var name: accX_created value: G#002ÃN Dec 6 17:24:13 dev /usr/local/sbin/opensips[1958]: DBG:dialog:write_dialog_vars: var string is accX_flags##026(481) Dec 6 17:24:13 dev /usr/local/sbin/opensips[1958]: DBG:dialog:write_pair: Dumping var name: carrierChannels value: 1002 Dec 6 17:24:13 dev /usr/local/sbin/opensips[1958]: DBG:dialog:write_pair: Dumping var name: carrierChannels value: 1003 Dec 6 17:24:13 dev /usr/local/sbin/opensips[1958]: DBG:dialog:write_pair: Dumping var name: carrierChannels value: 1007 Let me know if this helps. Thanks, --- Jayesh On Tue, Dec 6, 2011 at 4:32 PM, Razvan Crainea razvancrai...@opensips.org wrote: Hi, Jayesh! Can you please apply the patch I've attached? And then mail me back the log, but this time taken just after OpenSIPS shuts down with an active dialog. The log should contain the following strings: Dumping var name: and var string is They should appear before OpenSIPS stops with an active dialog, so -- Răzvan Crainea OpenSIPS Developer On 12/06/2011 12:13 PM, Jayesh Nambiar wrote: Hi Razvan, The logs with debug level 9 are pasted here: After restarting I disconnected the call, the dialog matched perfectly but no CDR record. --- Jayesh On Tue, Dec 6, 2011 at 2:50 PM, Razvan Crainea razvancrai...@opensips.org wrote: 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 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); route(default_relay); exit; } } But it is just that the cdr insert does not take place after the restart !! My debug level was at 3. Do you want more detailed logs to check?? Thanks, --- Jayesh On Mon, Dec 5, 2011 at 7:12 PM, Razvan Crainea razvancrai...@opensips.org wrote: 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, -- Ră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. 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 AM, Jayesh Nambiar jayesh.v...@gmail.comwrote: Hi Bogdan, The exact version used is 1.7.1 stable release compiled from src. Output of opensips -V is: version:
[OpenSIPS-Users] cdr accounting on opensips restart
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/opensips[ 15700]: DBG:dialog:dialog_update_db: inserting new dialog 0x7f3d323bd5f8 Dec 6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_pair: Dumping var name: accX_flags value: #026 Dec 6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_pair: Serialized string accX_flags##026 (16) Dec 6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_pair: Dumping var name: accX_db value: ( Dec 6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_pair: Serialized string accX_db#( (263) Dec 6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_pair: Dumping var name: accX_leg value: Dec 6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_pair: Serialized string accX_leg# (14) Dec 6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_pair: Dumping var name: accX_core value: #006 Dec 6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_pair: escaping char 53 Dec 6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_pair: Serialized string accX_core##006 (165) Dec 6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_pair: Dumping var name: accX_created value: 95+ÃN Dec 6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_pair: Serialized string accX_created#95+ÃN (22) Dec 6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_dialog_vars: var string is accX_flags##026(480) Dec 6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_pair: Dumping var name: carrierChannels value: 1002 Dec 6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_pair: Serialized string carrierChannels#1002| (21) Dec 6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_pair: Dumping var name: carrierChannels value: 1003 Dec 6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_pair: Serialized string carrierChannels#1003| (21) Dec 6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_pair: Dumping var name: carrierChannels value: 1007 Dec 6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_pair: Serialized string carrierChannels#1007| (21) Dec 6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_dialog_profiles: profile string is carrierChannels#1002|carrierChannels#1003|carrierChannels#1007|(63) Dec 6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:db_mysql:has_stmt_ctx: ctx found for dialog Dec 6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:db_mysql:db_mysql_do_prepared_query: conn=0x810858 (tail=8454488) MC=0x8101b8 Dec 6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:db_mysql:db_mysql_do_prepared_query: set values for the statement run I hope this will help you figure out something more relevant. --- Jayesh On Tue, Dec 6, 2011 at 7:56 PM, Razvan Crainea razvancrai...@opensips.orgwrote: Hi, Jayesh! Can you post your dlg_db_handler.c file on pastebin? I think you are using an old version of the dialog module, and that's why you have this problem. Regards, -- Răzvan Crainea OpenSIPS Developer ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] cdr accounting on opensips restart
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 AM, Jayesh Nambiar jayesh.v...@gmail.com mailto:jayesh.v...@gmail.com wrote: 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=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535 poll method support: poll, epoll_lt, epoll_et, sigio_rt, select. svnrevision: unknown @(#) $Id: main.c 8537 2011-11-08 17:02:11Z bogdan_iancu $ main.c compiled on 16:59:52 Dec 1 2011 with gcc 4.4.5 The CDR does not survive a restart. Anything else to be enabled or added in the script or to be looked at? Thanks, --- Jayesh On Thu, Dec 1, 2011 at 10:35 PM, Bogdan-Andrei Iancu bog...@opensips.org mailto:bog...@opensips.org wrote: 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: 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 dialog module so that it dumps all the dialogs while shutdown and on start it fetches the dialog from the DB. This method makes sure the dialog is matched when BYE comes after the restart but the CDR record is not entered. Is there any flag or dialog variable that I should set to insert that value in the table for all dialogs when opensips shuts off so that opensips knows that the CDR flag was set for this dialog when started again and it has to insert the record? Do let me know for any pointers or ideas to get this done. Thanks in advance. --- Jayesh ___ Users mailing list Users@lists.opensips.org mailto:Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users -- Bogdan-Andrei Iancu OpenSIPS Founder and Developer OpenSIPS solutions and know-how -- Bogdan-Andrei Iancu OpenSIPS Founder and Developer OpenSIPS solutions and know-how ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] cdr accounting on opensips restart
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. 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 AM, Jayesh Nambiar jayesh.v...@gmail.com mailto:jayesh.v...@gmail.com wrote: 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=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535 poll method support: poll, epoll_lt, epoll_et, sigio_rt, select. svnrevision: unknown @(#) $Id: main.c 8537 2011-11-08 17:02:11Z bogdan_iancu $ main.c compiled on 16:59:52 Dec 1 2011 with gcc 4.4.5 The CDR does not survive a restart. Anything else to be enabled or added in the script or to be looked at? Thanks, --- Jayesh On Thu, Dec 1, 2011 at 10:35 PM, Bogdan-Andrei Iancu bog...@opensips.org mailto:bog...@opensips.org wrote: 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: 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 dialog module so that it dumps all the dialogs while shutdown and on start it fetches the dialog from the DB. This method makes sure the dialog is matched when BYE comes after the restart but the CDR record is not entered. Is there any flag or dialog variable that I should set to insert that value in the table for all dialogs when opensips shuts off so that opensips knows that the CDR flag was set for this dialog when started again and it has to insert the record? Do let me know for any pointers or ideas to get this done. Thanks in advance. --- Jayesh ___ Users mailing list Users@lists.opensips.org mailto:Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users -- Bogdan-Andrei Iancu OpenSIPS Founder and Developer OpenSIPS solutions and know-how -- Bogdan-Andrei Iancu OpenSIPS Founder and Developer OpenSIPS solutions and know-how ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] cdr accounting on opensips restart
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); route(default_relay); exit; } } But it is just that the cdr insert does not take place after the restart !! My debug level was at 3. Do you want more detailed logs to check?? Thanks, --- Jayesh On Mon, Dec 5, 2011 at 7:12 PM, Razvan Crainea razvancrai...@opensips.orgwrote: 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, -- Ră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. 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 AM, Jayesh Nambiar jayesh.v...@gmail.comwrote: 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=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535 poll method support: poll, epoll_lt, epoll_et, sigio_rt, select. svnrevision: unknown @(#) $Id: main.c 8537 2011-11-08 17:02:11Z bogdan_iancu $ main.c compiled on 16:59:52 Dec 1 2011 with gcc 4.4.5 The CDR does not survive a restart. Anything else to be enabled or added in the script or to be looked at? Thanks, --- Jayesh On Thu, Dec 1, 2011 at 10:35 PM, Bogdan-Andrei Iancu bog...@opensips.org wrote: 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: 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 dialog module so that it dumps all the dialogs while shutdown and on start it fetches the dialog from the DB. This method makes sure the dialog is matched when BYE comes after the restart but the CDR record is not entered. Is there any flag or dialog variable that I should set to insert that value in the table for all dialogs when opensips shuts off so that opensips knows that the CDR flag was set for this dialog when started again and it has to insert the record? Do let me know for any pointers or ideas to get this done. Thanks in advance. --- Jayesh ___ Users mailing listUsers@lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users -- Bogdan-Andrei Iancu OpenSIPS Founder and Developer OpenSIPS solutions and know-how -- Bogdan-Andrei Iancu OpenSIPS Founder and Developer OpenSIPS solutions and know-how ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] cdr accounting on opensips restart
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 jayesh.v...@gmail.comwrote: 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=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535 poll method support: poll, epoll_lt, epoll_et, sigio_rt, select. svnrevision: unknown @(#) $Id: main.c 8537 2011-11-08 17:02:11Z bogdan_iancu $ main.c compiled on 16:59:52 Dec 1 2011 with gcc 4.4.5 The CDR does not survive a restart. Anything else to be enabled or added in the script or to be looked at? Thanks, --- Jayesh On Thu, Dec 1, 2011 at 10:35 PM, Bogdan-Andrei Iancu bog...@opensips.orgwrote: ** 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: 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 dialog module so that it dumps all the dialogs while shutdown and on start it fetches the dialog from the DB. This method makes sure the dialog is matched when BYE comes after the restart but the CDR record is not entered. Is there any flag or dialog variable that I should set to insert that value in the table for all dialogs when opensips shuts off so that opensips knows that the CDR flag was set for this dialog when started again and it has to insert the record? Do let me know for any pointers or ideas to get this done. Thanks in advance. --- Jayesh ___ Users mailing listUsers@lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users -- Bogdan-Andrei Iancu OpenSIPS Founder and Developer OpenSIPS solutions and know-how ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
[OpenSIPS-Users] cdr accounting on opensips restart
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 dialog module so that it dumps all the dialogs while shutdown and on start it fetches the dialog from the DB. This method makes sure the dialog is matched when BYE comes after the restart but the CDR record is not entered. Is there any flag or dialog variable that I should set to insert that value in the table for all dialogs when opensips shuts off so that opensips knows that the CDR flag was set for this dialog when started again and it has to insert the record? Do let me know for any pointers or ideas to get this done. Thanks in advance. --- Jayesh ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] cdr accounting on opensips restart
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: 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 dialog module so that it dumps all the dialogs while shutdown and on start it fetches the dialog from the DB. This method makes sure the dialog is matched when BYE comes after the restart but the CDR record is not entered. Is there any flag or dialog variable that I should set to insert that value in the table for all dialogs when opensips shuts off so that opensips knows that the CDR flag was set for this dialog when started again and it has to insert the record? Do let me know for any pointers or ideas to get this done. Thanks in advance. --- Jayesh ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users -- Bogdan-Andrei Iancu OpenSIPS Founder and Developer OpenSIPS solutions and know-how ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] cdr accounting on opensips restart
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=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535 poll method support: poll, epoll_lt, epoll_et, sigio_rt, select. svnrevision: unknown @(#) $Id: main.c 8537 2011-11-08 17:02:11Z bogdan_iancu $ main.c compiled on 16:59:52 Dec 1 2011 with gcc 4.4.5 The CDR does not survive a restart. Anything else to be enabled or added in the script or to be looked at? Thanks, --- Jayesh On Thu, Dec 1, 2011 at 10:35 PM, Bogdan-Andrei Iancu bog...@opensips.orgwrote: ** 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: 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 dialog module so that it dumps all the dialogs while shutdown and on start it fetches the dialog from the DB. This method makes sure the dialog is matched when BYE comes after the restart but the CDR record is not entered. Is there any flag or dialog variable that I should set to insert that value in the table for all dialogs when opensips shuts off so that opensips knows that the CDR flag was set for this dialog when started again and it has to insert the record? Do let me know for any pointers or ideas to get this done. Thanks in advance. --- Jayesh ___ Users mailing listUsers@lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users -- Bogdan-Andrei Iancu OpenSIPS Founder and Developer OpenSIPS solutions and know-how ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] CDR Accounting not working from this provider
Hi James, The dialog module does not see the BYE, so the dialog is counted as still ongoing so no CDR is generated. Now, about the BYE - by default dialog module exclusively uses a cookie (the did param in the RR/Route header) to do the matching. As you can see in the trace, because you do RR for re-INVITE (you shouldn't, but normally useless), the cookie is lost - and the device sending the BYE is brain-dead enough to refresh its route set during the reINVITE - even if the RFC says clear that the route set is learned only when the dialog is established. Bottom line, because of the combination of un-nesessary RR and broken UA, the cookie gets lost and it does not appear in BYE, so it does not match. A fast fix you can try is to set the matching mode of dialog mode to FALLBACK from did based matching to SIP-wise matching, so the dialog matching will match the BYE against the dialog even if the cookie is missing. Regards, Bogdan On 04/23/2011 07:54 AM, jam...@vicidial.com wrote: I have a new provider that I am evaluating and the built-in CDR functionality of the acc module is not working for them. I have tested with a second provider and it works fine. I can only assume that something somewhere in the SIP dialog is causing it to loose track of it. Here is the SIP dialog: interface: any filter: (ip) and ( port 5060 ) # U 2011/04/22 23:06:09.857893 208.38.149.190:5060 - 208.38.149.182:5060 INVITE sip:18633939336@208.38.149.182;cpd=on SIP/2.0 Via: SIP/2.0/UDP 208.38.149.190:5060;branch=z9hG4bK745a7a33;rport From: James P. sip:8633939330@208.38.149.190;tag=as791c05d3 To: sip:18633939336@208.38.149.182;cpd=on Contact: sip:8633939330@208.38.149.190 Call-ID: 38b57ce271946530476aea3909a8de2b@208.38.149.190 CSeq: 102 INVITE User-Agent: Asterisk PBX Max-Forwards: 70 Remote-Party-ID: James P. sip:8633939330@208.38.149.190;privacy=off;screen=no Date: Sat, 23 Apr 2011 03:12:17 GMT Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO Supported: replaces Content-Type: application/sdp Content-Length: 264 v=0 o=root 23976 23976 IN IP4 208.38.149.190 s=session c=IN IP4 208.38.149.190 t=0 0 m=audio 13872 RTP/AVP 18 0 101 a=rtpmap:18 G729/8000 a=fmtp:18 annexb=no a=rtpmap:0 PCMU/8000 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-16 a=ptime:20 a=sendrecv # U 2011/04/22 23:06:09.858211 208.38.149.182:5060 - 208.38.149.190:5060 SIP/2.0 100 Trying Via: SIP/2.0/UDP 208.38.149.190:5060;branch=z9hG4bK745a7a33;rport=5060 From: James P. sip:8633939330@208.38.149.190;tag=as791c05d3 To: sip:18633939336@208.38.149.182;cpd=on Call-ID: 38b57ce271946530476aea3909a8de2b@208.38.149.190 CSeq: 102 INVITE Content-Length: 0 # U 2011/04/22 23:06:09.859762 208.38.149.182:5060 - 69.30.55.34:5060 INVITE sip:18633939336@69.30.55.34;cpd=on SIP/2.0 Record-Route: sip:208.38.149.182;lr;ftag=as791c05d3;did=4c6.e8830ff Via: SIP/2.0/UDP 208.38.149.182;branch=z9hG4bK4956.b46847f.0 Via: SIP/2.0/UDP 208.38.149.190:5060;received=208.38.149.190;branch=z9hG4bK745a7a33;rport=5060 From: James P. sip:8633939330@208.38.149.190;tag=as791c05d3 To: sip:18633939336@208.38.149.182;cpd=on Contact: sip:8633939330@208.38.149.190 Call-ID: 38b57ce271946530476aea3909a8de2b@208.38.149.190 CSeq: 102 INVITE User-Agent: Asterisk PBX Max-Forwards: 69 Remote-Party-ID: James P. sip:8633939330@208.38.149.190;privacy=off;screen=no Date: Sat, 23 Apr 2011 03:12:17 GMT Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO Supported: replaces Content-Type: application/sdp Content-Length: 264 v=0 o=root 23976 23976 IN IP4 208.38.149.190 s=session c=IN IP4 208.38.149.190 t=0 0 m=audio 13872 RTP/AVP 18 0 101 a=rtpmap:18 G729/8000 a=fmtp:18 annexb=no a=rtpmap:0 PCMU/8000 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-16 a=ptime:20 a=sendrecv # U 2011/04/22 23:06:09.931832 69.30.55.34:5060 - 208.38.149.182:5060 SIP/2.0 100 Giving a try Via: SIP/2.0/UDP 208.38.149.182;branch=z9hG4bK4956.b46847f.0 Via: SIP/2.0/UDP 208.38.149.190:5060;received=208.38.149.190;branch=z9hG4bK745a7a33;rport=5060 From: James P. sip:8633939330@208.38.149.190;tag=as791c05d3 To: sip:18633939336@208.38.149.182;cpd=on Call-ID: 38b57ce271946530476aea3909a8de2b@208.38.149.190 CSeq: 102 INVITE Server: OpenSIPS (1.6.2-notls (i386/linux)) Content-Length: 0 # U 2011/04/22 23:06:10.974003 69.30.55.34:5060 - 208.38.149.182:5060 SIP/2.0 183 Session Progress Via: SIP/2.0/UDP 208.38.149.182;branch=z9hG4bK4956.b46847f.0 Via: SIP/2.0/UDP 208.38.149.190:5060;received=208.38.149.190;branch=z9hG4bK745a7a33;rport=5060 Record-Route: sip:69.30.55.34;lr;ftag=as791c05d3 Record-Route: sip:208.38.149.182;lr;ftag=as791c05d3;did=4c6.e8830ff From: James P. sip:8633939330@208.38.149.190;tag=as791c05d3 To: sip:18633939336@208.38.149.182;cpd=on;tag=as7abc238a Call-ID: 38b57ce271946530476aea3909a8de2b@208.38.149.190 CSeq: 102 INVITE User-Agent: SIP SWITCH Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY Supported: replaces Contact:
[OpenSIPS-Users] CDR Accounting not working from this provider
I have a new provider that I am evaluating and the built-in CDR functionality of the acc module is not working for them. I have tested with a second provider and it works fine. I can only assume that something somewhere in the SIP dialog is causing it to loose track of it. Here is the SIP dialog: interface: any filter: (ip) and ( port 5060 ) # U 2011/04/22 23:06:09.857893 208.38.149.190:5060 - 208.38.149.182:5060 INVITE sip:18633939336@208.38.149.182;cpd=on SIP/2.0 Via: SIP/2.0/UDP 208.38.149.190:5060;branch=z9hG4bK745a7a33;rport From: James P. ;tag=as791c05d3 To: Contact: Call-ID: 38b57ce271946530476aea3909a8de2b@208.38.149.190 CSeq: 102 INVITE User-Agent: Asterisk PBX Max-Forwards: 70 Remote-Party-ID: James P. ;privacy=off;screen=no Date: Sat, 23 Apr 2011 03:12:17 GMT Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO Supported: replaces Content-Type: application/sdp Content-Length: 264 v=0 o=root 23976 23976 IN IP4 208.38.149.190 s=session c=IN IP4 208.38.149.190 t=0 0 m=audio 13872 RTP/AVP 18 0 101 a=rtpmap:18 G729/8000 a=fmtp:18 annexb=no a=rtpmap:0 PCMU/8000 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-16 a=ptime:20 a=sendrecv # U 2011/04/22 23:06:09.858211 208.38.149.182:5060 - 208.38.149.190:5060 SIP/2.0 100 Trying Via: SIP/2.0/UDP 208.38.149.190:5060;branch=z9hG4bK745a7a33;rport=5060 From: James P. ;tag=as791c05d3 To: Call-ID: 38b57ce271946530476aea3909a8de2b@208.38.149.190 CSeq: 102 INVITE Content-Length: 0 # U 2011/04/22 23:06:09.859762 208.38.149.182:5060 - 69.30.55.34:5060 INVITE sip:18633939336@69.30.55.34;cpd=on SIP/2.0 Record-Route: Via: SIP/2.0/UDP 208.38.149.182;branch=z9hG4bK4956.b46847f.0 Via: SIP/2.0/UDP 208.38.149.190:5060;received=208.38.149.190;branch=z9hG4bK745a7a33;rport=5060 From: James P. ;tag=as791c05d3 To: Contact: Call-ID: 38b57ce271946530476aea3909a8de2b@208.38.149.190 CSeq: 102 INVITE User-Agent: Asterisk PBX Max-Forwards: 69 Remote-Party-ID: James P. ;privacy=off;screen=no Date: Sat, 23 Apr 2011 03:12:17 GMT Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO Supported: replaces Content-Type: application/sdp Content-Length: 264 v=0 o=root 23976 23976 IN IP4 208.38.149.190 s=session c=IN IP4 208.38.149.190 t=0 0 m=audio 13872 RTP/AVP 18 0 101 a=rtpmap:18 G729/8000 a=fmtp:18 annexb=no a=rtpmap:0 PCMU/8000 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-16 a=ptime:20 a=sendrecv # U 2011/04/22 23:06:09.931832 69.30.55.34:5060 - 208.38.149.182:5060 SIP/2.0 100 Giving a try Via: SIP/2.0/UDP 208.38.149.182;branch=z9hG4bK4956.b46847f.0 Via: SIP/2.0/UDP 208.38.149.190:5060;received=208.38.149.190;branch=z9hG4bK745a7a33;rport=5060 From: James P. ;tag=as791c05d3 To: Call-ID: 38b57ce271946530476aea3909a8de2b@208.38.149.190 CSeq: 102 INVITE Server: OpenSIPS (1.6.2-notls (i386/linux)) Content-Length: 0 # U 2011/04/22 23:06:10.974003 69.30.55.34:5060 - 208.38.149.182:5060 SIP/2.0 183 Session Progress Via: SIP/2.0/UDP 208.38.149.182;branch=z9hG4bK4956.b46847f.0 Via: SIP/2.0/UDP 208.38.149.190:5060;received=208.38.149.190;branch=z9hG4bK745a7a33;rport=5060 Record-Route: Record-Route: From: James P. ;tag=as791c05d3 To: ;tag=as7abc238a Call-ID: 38b57ce271946530476aea3909a8de2b@208.38.149.190 CSeq: 102 INVITE User-Agent: SIP SWITCH Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY Supported: replaces Contact: Content-Type: application/sdp Content-Length: 238 v=0 o=root 8881 8881 IN IP4 74.120.95.55 s=session c=IN IP4 74.120.95.55 t=0 0 m=audio 23416 RTP/AVP 0 101 a=rtpmap:0 PCMU/8000 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-16 a=silenceSupp:off - - - - a=ptime:20 a=sendrecv # U 2011/04/22 23:06:10.974350 208.38.149.182:5060 - 208.38.149.190:5060 SIP/2.0 183 Session Progress Via: SIP/2.0/UDP 208.38.149.190:5060;received=208.38.149.190;branch=z9hG4bK745a7a33;rport=5060 Record-Route: Record-Route: From: James P. ;tag=as791c05d3 To: ;tag=as7abc238a Call-ID: 38b57ce271946530476aea3909a8de2b@208.38.149.190 CSeq: 102 INVITE User-Agent: SIP SWITCH Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY Supported: replaces Contact: Content-Type: application/sdp Content-Length: 238 v=0 o=root 8881 8881 IN IP4 74.120.95.55 s=session c=IN IP4 74.120.95.55 t=0 0 m=audio 23416 RTP/AVP 0 101 a=rtpmap:0 PCMU/8000 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-16 a=silenceSupp:off - - - - a=ptime:20 a=sendrecv # U 2011/04/22 23:06:19.628116 69.30.55.34:5060 - 208.38.149.182:5060 SIP/2.0 200 OK Via: SIP/2.0/UDP 208.38.149.182;branch=z9hG4bK4956.b46847f.0 Via: SIP/2.0/UDP 208.38.149.190:5060;received=208.38.149.190;branch=z9hG4bK745a7a33;rport=5060 Record-Route: Record-Route: From: James P. ;tag=as791c05d3 To: ;tag=as7abc238a Call-ID: 38b57ce271946530476aea3909a8de2b@208.38.149.190 CSeq: 102 INVITE User-Agent: SIP SWITCH Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY Supported: replaces Contact: Content-Type: application/sdp Content-Length: 238 v=0 o=root 8881 8882 IN IP4 74.120.95.55
Re: [OpenSIPS-Users] CDR Accounting
Hi Dave. So just to be sure I'm clear on this. $Ts rounds down ( truncates ) the current second. So using $avp(s:start_time) = $Ts.$Tsm; would give something like 12343253.543233 and always be accurate? You should understand that $Ts.$Tsm is two independent calls to the system time function. So actually $Tsm isn't microseconds of $Ts. P.S. Could you please use any brackets to mark original letter or send your answer in the plain text fromat? Thanks for that clarification! So just to be sure I'm clear on this. $Ts rounds down ( truncates ) the current second. So using $avp(s:start_time) = $Ts.$Tsm; would give something like 12343253.543233 and always be accurate? Further (standard ACC [without dialog]) you could just put $Tsm in the db_extras as an extra column and then use the tool you are using to created cdrs from the acc table to take the column with the $Tsm value into account when calculating duration, ringtime, etc. To get these numbers with the new CDR feature, you would have to store a dialog variable like $dlg_val(start) = $Ts.$Tsm at start and $dlg_val(answered) = $Ts.$Tsm at answer and at the end of the call add them db_extras along with $Ts.$Tsm for the end of the call. You would then want to go off of those numbers rather than what the acc module automatically put in the db. The disadvantage would be having duplicate columns for start/answer/end times but you would still have the benefit of not having to have an external process building cdrs from acc table matching up BYEs to INVITES, etc. Calculating the durations in opensips would be tricky since it does not work with non integers. But you could do that easily with a sql trigger on the record insert. Does this sound right? Thanks Dave On Thu, Jan 20, 2011 at 4:54 AM, Anca Vamanu a...@opensips.org wrote: On 01/19/2011 09:31 PM, a.zagors...@oyster-telecom.ru wrote: It was my conversation, and I told about 1) $Tsm is MICROseconds (6 digits) 2) It is microseconds of a current second. Yes, that's true. I fixed it in documentation also. -- Anca Vamanu www.voice-system.ro ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] CDR Accounting
Why do you need microseconds in accounting? All database queries, round trip time to the database on the LAN, radius requests, all add up times impossible to measure. What is the point of accounting microseconds for a process that itself takes unknown amount of time but several order of magnitude higher than your accounting resolution? Adrian On Jan 24, 2011, at 9:47 PM, Dave Singer wrote: Thanks for that clarification! So just to be sure I'm clear on this. $Ts rounds down ( truncates ) the current second. So using $avp(s:start_time) = $Ts.$Tsm; would give something like 12343253.543233 and always be accurate? Further (standard ACC [without dialog]) you could just put $Tsm in the db_extras as an extra column and then use the tool you are using to created cdrs from the acc table to take the column with the $Tsm value into account when calculating duration, ringtime, etc. To get these numbers with the new CDR feature, you would have to store a dialog variable like $dlg_val(start) = $Ts.$Tsm at start and $dlg_val(answered) = $Ts.$Tsm at answer and at the end of the call add them db_extras along with $Ts.$Tsm for the end of the call. You would then want to go off of those numbers rather than what the acc module automatically put in the db. The disadvantage would be having duplicate columns for start/answer/end times but you would still have the benefit of not having to have an external process building cdrs from acc table matching up BYEs to INVITES, etc. Calculating the durations in opensips would be tricky since it does not work with non integers. But you could do that easily with a sql trigger on the record insert. Does this sound right? Thanks Dave On Thu, Jan 20, 2011 at 4:54 AM, Anca Vamanu a...@opensips.org wrote: On 01/19/2011 09:31 PM, a.zagors...@oyster-telecom.ru wrote: It was my conversation, and I told about 1) $Tsm is MICROseconds (6 digits) 2) It is microseconds of a current second. Yes, that's true. I fixed it in documentation also. -- Anca Vamanu www.voice-system.ro ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] CDR Accounting
Thanks for that clarification! So just to be sure I'm clear on this. $Ts rounds down ( truncates ) the current second. So using $avp(s:start_time) = $Ts.$Tsm; would give something like 12343253.543233 and always be accurate? Further (standard ACC [without dialog]) you could just put $Tsm in the db_extras as an extra column and then use the tool you are using to created cdrs from the acc table to take the column with the $Tsm value into account when calculating duration, ringtime, etc. To get these numbers with the new CDR feature, you would have to store a dialog variable like $dlg_val(start) = $Ts.$Tsm at start and $dlg_val(answered) = $Ts.$Tsm at answer and at the end of the call add them db_extras along with $Ts.$Tsm for the end of the call. You would then want to go off of those numbers rather than what the acc module automatically put in the db. The disadvantage would be having duplicate columns for start/answer/end times but you would still have the benefit of not having to have an external process building cdrs from acc table matching up BYEs to INVITES, etc. Calculating the durations in opensips would be tricky since it does not work with non integers. But you could do that easily with a sql trigger on the record insert. Does this sound right? Thanks Dave On Thu, Jan 20, 2011 at 4:54 AM, Anca Vamanu a...@opensips.org wrote: On 01/19/2011 09:31 PM, a.zagors...@oyster-telecom.ru wrote: It was my conversation, and I told about 1) $Tsm is MICROseconds (6 digits) 2) It is microseconds of a current second. Yes, that's true. I fixed it in documentation also. -- Anca Vamanu www.voice-system.ro ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
[OpenSIPS-Users] CDR Accounting
Hi All, Managed to finally get this working, mainly my stupidity in the end. Just one more question if anyone can tell me. Is it possible to have a better reflection on the duration? At present my system is only showing whole seconds and not milliseconds and this would be helpful. Thanks again in advance. ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] CDR Accounting
Hi, Andrew. Maybe I'm wrong, but using only acc module it is impossible. I'm using dialog module and manually store start and end time of a duration. WBR, Anton Zagorskiy VoIP Developer, Oyster Telecom Phone.: +7 812 601-0666 Fax: +7 812 601-0593 a.zagors...@oyster-telecom.ru www.oyster-telecom.ru From: users-boun...@lists.opensips.org [mailto:users-boun...@lists.opensips.org] On Behalf Of Andrew Philp Sent: Wednesday, January 19, 2011 2:12 PM To: OpenSIPS users mailling list Subject: [OpenSIPS-Users] CDR Accounting Hi All, Managed to finally get this working, mainly my stupidity in the end. Just one more question if anyone can tell me. Is it possible to have a better reflection on the duration? At present my system is only showing whole seconds and not milliseconds and this would be helpful. Thanks again in advance. ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] CDR Accounting
It is the new feature of 1.6.4 that I am trying to get working. Thanks for your comments Hi, Andrew. Maybe I'm wrong, but using only acc module it is impossible. I'm using dialog module and manually store start and end time of a duration. WBR, Anton Zagorskiy VoIP Developer, Oyster Telecom Phone.: +7 812 601-0666 Fax: +7 812 601-0593 a.zagors...@oyster-telecom.ru www.oyster-telecom.ru From: users-boun...@lists.opensips.org [mailto:users-boun...@lists.opensips.org] On Behalf Of Andrew Philp Sent: Wednesday, January 19, 2011 2:12 PM To: OpenSIPS users mailling list Subject: [OpenSIPS-Users] CDR Accounting Hi All, Managed to finally get this working, mainly my stupidity in the end. Just one more question if anyone can tell me. Is it possible to have a better reflection on the duration? At present my system is only showing whole seconds and not milliseconds and this would be helpful. Thanks again in advance. ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] CDR Accounting
On Wed, Jan 19, 2011 at 5:11 AM, Andrew Philp andrew.ph...@just-tek.comwrote: Just one more question if anyone can tell me. Is it possible to have a better reflection on the duration? At present my system is only showing whole seconds and not milliseconds and this would be helpful. I don't believe that is possible at this time. I'm not sure why milliseconds would be useful. Perhaps if you can tell us what you are trying to do with that, there may be another way to do what you are trying to do (for example, measuring ringtime or PDD). -Brett ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] CDR Accounting
On Wed, Jan 19, 2011 at 8:32 AM, Andrew Philp andrew.ph...@just-tek.comwrote: We are looking to use this for billing directly and for most of our customers are billed on a hundredth of a second. Does this make sense? Sure it does, but I've never heard of sub second billing. The ACC module is probably not going to help you for this need presently. I believe $Tsm returns milliseconds. You may be able to manually account for the calls with that. -Brett ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] CDR Accounting
Be careful when using $Tsm. I read a thread the other day that was just talking about it and that it returns milliseconds since midnight, not epoch. So if that is true you will need to somehow handle calls that cross midnight for duration at least and start/answer/end of call if including the precision in those timestamps. I'd be interested to see what you find. What I've seen with sub second accounting is for rounding purposes where for example billing in 6 second increments and it is always rounded up. So a call 6.001 seconds would be charged for 12 seconds. Dave On Wed, Jan 19, 2011 at 6:35 AM, Brett Nemeroff br...@nemeroff.com wrote: On Wed, Jan 19, 2011 at 8:32 AM, Andrew Philp andrew.ph...@just-tek.comwrote: We are looking to use this for billing directly and for most of our customers are billed on a hundredth of a second. Does this make sense? Sure it does, but I've never heard of sub second billing. The ACC module is probably not going to help you for this need presently. I believe $Tsm returns milliseconds. You may be able to manually account for the calls with that. -Brett ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] CDR Accounting
It was my conversation, and I told about 1) $Tsm is MICROseconds (6 digits) 2) It is microseconds of a current second. On Wed, 19 Jan 2011 09:29:28 -0800 Dave Singer dave.sin...@wideideas.com wrote: Be careful when using $Tsm. I read a thread the other day that was just talking about it and that it returns milliseconds since midnight, not epoch. So if that is true you will need to somehow handle calls that cross midnight for duration at least and start/answer/end of call if including the precision in those timestamps. I'd be interested to see what you find. What I've seen with sub second accounting is for rounding purposes where for example billing in 6 second increments and it is always rounded up. So a call 6.001 seconds would be charged for 12 seconds. Dave On Wed, Jan 19, 2011 at 6:35 AM, Brett Nemeroff br...@nemeroff.com wrote: On Wed, Jan 19, 2011 at 8:32 AM, Andrew Philp andrew.ph...@just-tek.comwrote: We are looking to use this for billing directly and for most of our customers are billed on a hundredth of a second. Does this make sense? Sure it does, but I've never heard of sub second billing. The ACC module is probably not going to help you for this need presently. I believe $Tsm returns milliseconds. You may be able to manually account for the calls with that. -Brett ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] CDR Accounting Example
thanks! From: Anton Zagorskiy a.zagors...@oyster-telecom.ru To: andrew.ph...@just-tek.com; OpenSIPS users mailling list users@lists.opensips.org Sent: Tue, January 18, 2011 3:29:29 AM Subject: Re: [OpenSIPS-Users] CDR Accounting Example Hi Andrew. modparam(acc, db_extra, src=$(dlg_val(from.uri){uri.user});dst=$(dlg_val(request.uri){uri.user});ch annel=$dlg_val(channel);dstchannel=$dlg_val(dchannel)) modparam(acc, db_flag, 10) modparam(acc, db_url, mysql://login:pass@host/db) modparam(acc, cdr_flag, 2) ... Later in the script setflag(2); setflag(10); $dlg_val(..) I'm setting up during the script. WBR, Anton Zagorskiy VoIP Developer, Oyster Telecom Phone.: +7 812 601-0666 Fax: +7 812 601-0593 a.zagors...@oyster-telecom.ru www.oyster-telecom.ru From: users-boun...@lists.opensips.org [mailto:users-boun...@lists.opensips.org] On Behalf Of Andrew Philp Sent: Tuesday, January 18, 2011 2:00 PM To: OpenSIPS users mailling list Subject: [OpenSIPS-Users] CDR Accounting Example Hi All, Has anyone got a working example of the CDR accounting working with mysql. I have tried to get this sorted but I feel I am missing something. Thanks in adavnce ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
[OpenSIPS-Users] CDR Accounting Example
Hi All, Has anyone got a working example of the CDR accounting working with mysql. I have tried to get this sorted but I feel I am missing something. Thanks in adavnce ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] CDR Accounting Example
Hi Andrew. modparam(acc, db_extra, src=$(dlg_val(from.uri){uri.user});dst=$(dlg_val(request.uri){uri.user});ch annel=$dlg_val(channel);dstchannel=$dlg_val(dchannel)) modparam(acc, db_flag, 10) modparam(acc, db_url, mysql://login:pass@host/db) modparam(acc, cdr_flag, 2) ... Later in the script setflag(2); setflag(10); $dlg_val(..) I'm setting up during the script. WBR, Anton Zagorskiy VoIP Developer, Oyster Telecom Phone.: +7 812 601-0666 Fax: +7 812 601-0593 a.zagors...@oyster-telecom.ru www.oyster-telecom.ru From: users-boun...@lists.opensips.org [mailto:users-boun...@lists.opensips.org] On Behalf Of Andrew Philp Sent: Tuesday, January 18, 2011 2:00 PM To: OpenSIPS users mailling list Subject: [OpenSIPS-Users] CDR Accounting Example Hi All, Has anyone got a working example of the CDR accounting working with mysql. I have tried to get this sorted but I feel I am missing something. Thanks in adavnce ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users