Page 1 of 3

Duplicate records in reports when using Speed dials

PostPosted: Fri Jul 27, 2012 4:46 pm
by ray007mond
Hi,

This is my setup/configuration.

Datatex running on the PABX/Asterisk server
Datatex version: 1.0.6.6
Operating system: Suse Linux enterprise server 10
Asterisk version: 1.4.24.1

Users are using speed dials to dial a list of external numbers. We have set up number masking in TNG.
We have set up the following plugin rule to try and resolve issue with duplicates:

2=LINE|STARTS|Local|<DELETE RECORD>|TRUE

Attached is an example of a duplicated entry in TNG report.
It seems the call that has been costed is associated with no user. We need the costed (single entry) to associated with the correct user and not "no user/empty"

Re: Duplicate records in reports when using Speed dials

PostPosted: Wed Aug 01, 2012 11:03 am
by Belinda Frick
For TNG with Asterisk and speeddials, please refer to forum post:
TNG Asterisk and speeddials

Re: Duplicate records in reports when using Speed dials

PostPosted: Thu Aug 02, 2012 5:47 pm
by ray007mond
Hi,

I believe I have followed that document correctly yet I am still having problems.
My original post did mention the things I have configured.

Re: Duplicate records in reports when using Speed dials

PostPosted: Fri Aug 03, 2012 3:33 pm
by Belinda Frick
Does you plugin rules file have the 'internal=1' entry as per rules example in post referred to?

If so, can you please attach the rawdata strings for these 2 calls(master.csv)? In the post there is an example of how the plugin rule is applied to remove the duplicate entry. We need to trace why it does not apply.

Also attached the 2 strings from the rawdata file (you will need to set log rawdata to permanent to capture this).

There is an example of both strings in the post.

To attach the files to the post you will need to rar it.

Re: Duplicate records in reports when using Speed dials

PostPosted: Mon Aug 06, 2012 10:03 am
by ray007mond
Hi,

rules.ini does have "Internal=1" set.

Here is the example of a duplicate call from master.csv:

"","7570","*010","from-internal","""Security"" <7570>","SIP/7570-bc13be50","Local/0834026008@from-internal-496b,1","Dial","Local/0834026008@from-internal/n|","2012-08-05 15:22:24","2012-08-05 15:22:24","2012-08-05 15:22:48",24,24,"ANSWERED","DOCUMENTATION","1344180144.75694",""

"6868","7570","0834026008","from-internal","""Security"" <7570>","Local/0834026008@from-internal-496b,2","mISDN/5-u69952","Dial","mISDN/g:telkom/0834026008|300|","2012-08-05 15:22:28","2012-08-05 15:22:37","2012-08-05 15:22:48",20,11,"ANSWERED","DOCUMENTATION","1344180144.75696",""

Re: Duplicate records in reports when using Speed dials

PostPosted: Mon Aug 13, 2012 12:29 pm
by ray007mond
Hi,

What do I need to do to fix this?

Re: Duplicate records in reports when using Speed dials

PostPosted: Thu Aug 23, 2012 4:36 pm
by Belinda Frick
I 'aligned' the comma delimited fields (fields separated by ",") to compared your 2 master csv strings with the standard Asterisk from our forum post: TNG Asterisk and speeddials

The format for your strings and the standard example has differences. Please see screen shot:
tng-asterisk-speeddial-compare.jpg
I marked the differences in the duplicate line with red and the call data string that should update to TNG in green. Note differences for both.

Please refer to forum post below to ensure that your master.csv format is correct and that you are using the CSV file input format option:
TNG 4 Asterisk CSV Import Interface.

For more details about required format, please see:
TNG: Asterisk output configuration required

Re: Duplicate records in reports when using Speed dials

PostPosted: Thu Aug 23, 2012 7:05 pm
by ray007mond
Hi,

I do not believe my problem is due to the CDR data not being formatted correctly.

My mappings in cdr_custom is as per requirements detailed in "TNG 4 Asterisk CSV Import Interface" forum post. (viewtopic.php?f=24&t=51&start=0&#p51):

[mappings]
Master.csv => "${CDR(clid)}","${CDR(src)}","${CDR(dst)}","${CDR(dcontext)}","${CDR(channel)}","${CDR(dstchannel)}","${CDR(lastapp)}","${CDR(lastdata)}","${CDR(start)}","${CDR(answer)}","${CDR(end)}","${CDR(duration)}","${CDR(billsec)}","${CDR(disposition)}","${CDR(amaflags)}","${CDR(accountcode)}","${CDR(uniqueid)}","${CDR(userfield)}"




Below is another extract from CDR data which is identical to the CDR exatract you post in the
"TNG Asterisk and speeddials" forum post. (viewtopic.php?f=24&t=165&=165&):


""Piet" <7535>" ,"7535" ,"*006" ,"from-internal" ,"SIP/7535-b58dcfe0" ,"Local/0823773570@from-internal-a96e,1" ,"Dial" ,"Local/0823773570@from-internal/n|" ,"2012-08-23 15:33:00" ,"2012-08-23 15:33:00" ,"2012-08-23 15:33:42" ,"42" ,"42" ,"ANSWERED" ,"DOCUMENTATION" ,"" ,"1345728780.4786" ,""

""Piet" <7535>" ,"7535" ,"0823773570" ,"from-internal" ,"Local/0823773570@from-internal-a96e,2" ,"mISDN/1-u4862" ,"Dial" ,"mISDN/g:telkom/0823773570|300|" ,"2012-08-23 15:33:03" ,"2012-08-23 15:33:11" ,"2012-08-23 15:33:42" ,"39" ,"31" ,"ANSWERED" ,"DOCUMENTATION" ,"2603" ,"1345728780.4788" ,""



...yet the TNG report reflect two separate calls.

Re: Duplicate records in reports when using Speed dials

PostPosted: Fri Aug 24, 2012 9:47 am
by Belinda Frick
The master csv string is translated to a pip delimited string. The fields in the string will be used to execute the plugin rule. I suggest finding the pip string (enable log rawdata to raw.txt). You can then check if the trunk/line is given off as a value starting with 'local', as this is the criteria to execute the plugin rule.

For example of what I refer to and how to trace a call see forum post: TNG Asterisk and speeddials

In the example the trunk/line sometimes had a space in front of the 'local'. Therefore 2 plugin rules was used. One with a space in front and one without.

For me to check this, I will need:
  • master.csv strings.
  • pip delimited strings in raw.txt file.
  • example of TNG report with call details.
  • rules.ini file from the plugins folder.

Re: Duplicate records in reports when using Speed dials

PostPosted: Mon Aug 27, 2012 4:50 pm
by ray007mond
Please find required information attached in Files.rar