Sample of Asterisk CSV input file for TNG

Moderators: Leon van Heerden, Luanda_Junzi, Belinda Frick, Lee Hendricks

Sample of Asterisk CSV input file for TNG

Postby Belinda Frick » Mon Nov 15, 2010 2:33 pm

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)}"


Please note: all date fields must have a value.

"${CDR(start)}", == "2009-06-12 10:33:42",
"${CDR(answer)}", == "2009-06-12 10:33:50",
"${CDR(end)}", == "2009-06-12 10:33:50",

Else you will get an error:

The tng log :
Code: Select all
2009-06-12 11:15:38:737 [1.0.6.3] - AMI Exception:ParseCDRRecordToTNGFormat
(- [""Broadreach" <0215148300>","0215148300","0399742095","from-internal","SIP/8358-b6e455d0","Zap/1-1","ResetCDR',"w","2009-06-12
10:33:42","","2009-06-12 10:33:50","8","0","NO ANSWER","DOCUMENTATION","","1244795622.73626",""[10]]):
'' is not a valid date and time


NB!! - Also note the field "ResetCDR', is not in double quotes. This will also cause problems
as the double quote marks the beginning and end of a field.


Call Sample:

Outgoing Normal (From exten 5006 to 0861114351 on Zap g1)
Code: Select all
""0215924033" <5006>","5006","0861114351","default-alldtxout","SIP/5006-b7d11ad0","Zap/1-1","Dial","Zap/g1/0861114351|60","2007-11-01 11:05:26","2007-11-01 11:05:36","2007-11-01 11:05:40","14","4","ANSWERED","DOCUMENTATION","5006","1193907926.2265","" 


Outgoing Unanswered (From exten 5006 to 0861114351 on Zap g1)
Code: Select all
""0215924033" <5006>","5006","0861114351","default-alldtxout","SIP/5006-098c5540","Zap/1-1","Dial","Zap/g1/0861114351|60","2007-11-01 11:07:20","2007-11-01 11:07:34","2007-11-01 11:07:34","14","0","NO ANSWER","DOCUMENTATION","5006","1193908040.2273",""

Outgoing Internal (from exten 5006 to exten 8888 (internal))
Code: Select all
""switchboard" <5006>","5006","8888","default-alldtxout","SIP/5006-b7d04cc0","SIP/8888-0858e0f8","Dial","SIP/8888|20|tkKM(all-tapi^1193911264.99)|","2007-11-01 12:01:04","2007-11-01 12:01:12","2007-11-01 12:01:15","11","3","ANSWERED","DOCUMENTATION","5006","1193911264.99",""

Outgoing Forward (from cellphone 0844045791 to office no. 0117972021 to exten 5006 diverted to cell 0861114351)
Code: Select all
""0215924033" <0000000000>","0000000000","0861114351","default-alldtxout","Local/0861114351@default-alldtxout-f713,2","Zap/2-1","Dial","Zap/g1/0861114351|60","2007-11-01 12:21:40","2007-11-01 12:21:50","2007-11-01 12:21:50","10","0","ANSWERED","DOCUMENTATION","","1193912500.206",""
"0000000000","0000000000","s","all-hangup","Zap/1-1","Local/0861114351@default-alldtxout-f713,1","Dial","SIP/5006|60","2007-11-01 12:21:40","2007-11-01 12:21:40","2007-11-01 12:21:52","12","12","ANSWERED","DOCUMENTATION","","1193912500.203","2021"


Outgoing Transferred (from test exten 8888 to office no. 011 797 2021 when answered transferred to exten 5000)
Code: Select all
""0215924033" <8888>","8888","0117972021","default-alldtxout","SIP/8888-093af708","Zap/1-1","Dial","Zap/g1/0117972021|60","2007-11-01 12:26:55","2007-11-01 12:26:59","2007-11-01 12:27:23","28","24","ANSWERED","DOCUMENTATION","8888","1193912815.15",""
"0000000000","0000000000","5000","default-alldtxout","Zap/2-1","SIP/5000-093c4180","Dial","SIP/5000|30|tkKM(all-tapi^1193912819.17)|","2007-11-01 12:26:59","2007-11-01 12:26:59","2007-11-01 12:27:23","24","24","ANSWERED","DOCUMENTATION","","1193912819.17","2021"


Outgoing transferred unanswered (from test exten 8888 to office no. 011 797 2021 when answered transferred to internal exten 5009 then not answered)
Code: Select all
""0215924033" <8888>","8888","0117972021","default-alldtxout","SIP/8888-09404d60","Zap/1-1","Dial","Zap/g1/0117972021|60","2007-11-01 12:34:21","2007-11-01 12:34:25","2007-11-01 12:34:35","14","10","ANSWERED","DOCUMENTATION","8888","1193913261.62",""
"0000000000","0000000000","5009","default-alldtxout","Zap/2-1","SIP/5009-093bc300","Dial","SIP/5009|20|tkKM(all-tapi^1193913265.64)|","2007-11-01 12:34:25","2007-11-01 12:34:25","2007-11-01 12:34:35","10","10","ANSWERED","DOCUMENTATION","","1193913265.64","2021"

Incoming Normal (from 0844045791 to 0117972021 (exten 5006))
Code: Select all
"0000000000","0000000000","s","all-hangup","Zap/1-1","SIP/5006-091feb88","Dial","SIP/5006|60","2007-11-09 11:24:32","2007-11-09 11:24:32","2007-11-09 11:24:35","3","3","ANSWERED","DOCUMENTATION","","1194600272.3176","2021"


Incoming Unanswered (from cell 0844045791 to office no. 011 797 2021 then unanswered)
Code: Select all
"0000000000","0000000000","s","all-hangup","Zap/1-1","SIP/5006-093746b0","Dial","SIP/5006|60","2007-11-01 12:39:57","2007-11-01 12:39:57","2007-11-01 12:40:06","9","9","ANSWERED","DOCUMENTATION","","1193913597.88","2021"


Incoming Transferred (called from 0845077641 to office no. 0117972021 then transferred to exten 5010 and answered)
Code: Select all
"0000000000","0000000000","5010","default-alldtxout","Zap/1-1","SIP/5010-09544e80","Dial","SIP/5010|40|tkKM(all-tapi^1193921140.175)|","2007-11-01 14:45:40","2007-11-01 14:45:40","2007-11-01 14:46:00","20","20","ANSWERED","DOCUMENTATION","","1193921140.175","2021"


Incoming transferred unanswered (called from 0845077641 to office no. 0117972021 then transferred to exten 5003, not answered)
Code: Select all
"0000000000","0000000000","5003","default-alldtxout","Zap/1-1","SIP/5003-09544e80","Dial","SIP/5003|15|tkKM(all-tapi^1193921366.180)|","2007-11-01 14:49:26","2007-11-01 14:49:26","2007-11-01 14:49:36","10","10","ANSWERED","DOCUMENTATION","","1193921366.180","2021"


Incoming DISA (dialed office no. 0117972021 from test exten 8888, followed auto attendant prompts, option 1, goes to exten 5006)
Code: Select all
""0215924033" <8888>","8888","0117972021","default-alldtxout","SIP/8888-095e3fc0","Zap/1-1","Dial","Zap/g1/0117972021|60","2007-11-01 15:05:58","2007-11-01 15:06:02","2007-11-01 15:06:08","10","6","ANSWERED","DOCUMENTATION","8888","1193922358.278",""
"0000000000","0000000000","s","all-hangup","Zap/2-1","SIP/5006-09515778","Dial","SIP/5006|60|o","2007-11-01 15:06:02","2007-11-01 15:06:02","2007-11-01 15:06:08","6","6","ANSWERED","DOCUMENTATION","","1193922362.280","2021"

Incoming Internal (called from exten 5006 to 5003 answered)
Code: Select all
""switchboard" <5006>","5006","5003","default-alldtxout","SIP/5006-b7d1fba0","SIP/5003-095d4910","Dial","SIP/5003|15|tkKM(all-tapi^1193922525.292)|","2007-11-01 15:08:45","2007-11-01 15:08:50","2007-11-01 15:09:06","21","16","ANSWERED","DOCUMENTATION","5006","1193922525.292",""

Incoming internal unanswered (called from exten 5006 to exen 5003, unanswered)
Code: Select all
""switchboard" <5006>","5006","5003","default-alldtxout","SIP/5006-b7d0cb60","SIP/5003-095d4910","Dial","SIP/5003|15|tkKM(all-tapi^1193922624.294)|","2007-11-01 15:10:24","","2007-11-01 15:10:25","1","0","NO ANSWER","DOCUMENTATION","5006","1193922624.294",""
Belinda Frick
 
Posts: 3808
Joined: Fri Nov 12, 2010 4:25 pm

Return to Support Archive's (TNG)

Who is online

Users browsing this forum: No registered users and 1 guest