How To Get Current Calls Details
In order to know the current call details you can follow one of the following suggestions that were discussed on the Asterisk Users mailing list:
Parse the output of “core show channels verbose”. Remember that the field “Channel” should be unique, in you see two lines per call. Then you can store the output on a file or DB for later use.
You can issue the previous command from outside Asterisk’s CLI,so you can manage the output better. Example:
If you take a closer look at the output. The link between the 2 can be found by matching channel==dstchannel for all channels.
You could also consider using the Asterisk Manager Interface in order to get more details about the call.
For a deeper understanding about Asterisk commands and the AMI interface, I recommend you to read the following book:
Thanks to Thorsten G. ( tg@DELETETHISovm-group.com ) and Daniel Tryba ( daniel@DELETETHISTOOtryba.nl ) for their valuable feedback.