Core show [calls|channels] input/output question

Hello community,

I was trying to figure out what is the data that is being collected from the Asterisk CLI for:

Asterisk -rvx ‘show {calls|channels}’

For the “active calls” final output

After a lot of tests, i found out (I hope) that the input data being collected is
Status: Up
App: Dial

But im not really sure about it

I’ve reading a lot of topics and i couldn’t find a final answer. . .

Why i need to know this?

  • I need a way to see the active calls per channel (using grep), so i can make dashboard with beautiful graphs :smile:

What do i have now:

Client calls
watch "asterisk -vvvvvrx 'core show channels' | egrep \"(^SIP/**TRUNK**)\" |egrep -Ec \"(Dial\(SIP)\""

Calls sent
watch "asterisk -vvvvvrx 'core show channels' | egrep \"(^SIP)\" |egrep -Ec \"(Dial\(SIP/**TRUNK**)\""

Best regards!

Instead of:

core show channels

Try:

core show channels verbose

Thanks for your reply @penguinpbx

But that doesn’t not solve my question

Im 99% sure that the input data of the shown calls is:

Status: Up + Ring
Application: Dial(SIP | chnnl /etc/etc)

CLI output is mostly intended for direct human consumption. For machine processing you would normally use AMI.

You don’t seem to be using “channel” in hte accepted Asterisk sense.

@david551

Thanks for your reply, but maybe i didn’t explain myself clearly enough

What i want to know, is, which data is being retrieved for the command:

asterisk -rvx ‘core show calls’

I know, when you use core show channels, it shows you the states of every call

Ring
Ringing
Dial
AppDial
Etc . . .

And the origin and destination channels

So i want to know, which is the data input of ‘core show calls’ when i see the output:
Active Calls

Looking at a rather old bit of source code, core show calls appears to show the number of channels currently executing dialplan and the total number of times the dialplan has started being run across the whole of Asterisk.

However, as I already said, the output of most CLI commands is not intended for machine processing.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.