How can I get call duration during the call via AMI? something like Status() or CoreShowChannels() but seconds needs to be after Answering call
Asked
Active
Viewed 2,430 times
1 Answers
2
You have following options:
1)You can collect "Link" events and store info about calls start in your application. AMI is not designed to got call info. This one is CORRECT way.
2) issue command http://www.voip-info.org/wiki/view/Asterisk+Manager+API+Action+Command with "core show channel CHANNEL_NAME_HERE" It will have info about duration
3)Other option is get variable CDR(billsec)
http://www.voip-info.org/wiki/view/Asterisk+Manager+API+Action+GetVar

arheops
- 15,544
- 1
- 21
- 27