As we get everything in AMI events but are not able to get the duration of a call from AMI hangup event when using call file and especially both the call legs duration via AMI and do not want from the CDR table
Like we are getting only 1 leg’s answeredtime on the VarSet Event
{ event: ‘VarSet’,
privilege: ‘dialplan,all’,
channel: ‘Local/9958@internal-local-calltest-000001b0;2’,
channelstate: ‘6’,
channelstatedesc: ‘Up’,
calleridnum: ‘13232’,
calleridname: ‘’,
connectedlinenum: ‘’,
connectedlinename: ‘’,
language: ‘en’,
accountcode: TEST-CC’,
context: ‘internal-local-calltest’,
exten: ‘9958’,
priority: ‘9’,
uniqueid: ‘1560232281.950204’,
linkedid: ‘1560232281.950203’,
variable: { answeredtime: ‘’ },
value: ‘4’ }