CLI core show channel question


*CLI> help core show channel
Usage: core show channel <channel>
       Shows lots of information about the specified channel.
*CLI> core show channels
Channel              Location             State   Application(Data)             
PJSIP/flowroute-0000 1xxxxxxxxxx@from-tru Up      Read(digit,custom/no-solicitor
1 active channel
1 active call
11 calls processed

*CLI> core show channel PJSIP/flowroute-0000
PJSIP/flowroute-0000 is not a known channel

*CLI> core show channel PJSIP/flowroute
PJSIP/flowroute is not a known channel

*CLI> core show channel PJSIP
PJSIP is not a known channel

*CLI> core show channel flowroute
flowroute is not a known channel

*CLI> core show channel 0000
0000 is not a known channel

*CLI> core show channel flowroute-0000
flowroute-0000 is not a known channel

The channel displays as “PJSIP/flowroute-0000”
How do I get the channel detail?

[ Corrected: verbose won’t work, either ]

I think you will need to use “core show channels concise” to get the full channel name. There are more than four digits in the suffix.

The official 18.4 has a 20 character limit for the simple command:

whereas the concise version has no limit, and is designed for machine use:

or use the latest version, which has a 64 limit:

You can also use tab completion to get the full channel name for the command.

1 Like
*CLI> core show channels concise

*CLI> core show channel PJSIP/flowroute-00000018
*..detail provided via console, as expected...*

core show channels concise worked!

It also says “concise” is depreciated which I am sure you know.

Thank you very much!

Tested and verified.

Thank you for the tip!

to view command , you can type some and TAB, asterisk will suggest you what to enter next

in your case, command is " core show channel PJSIP/flowroute-0000 "

Is core show channels concise really being deprecated?!? Pity, because it is handy for returning channel details in an easily parseable format. Here is a Python function for creating a list of dicts, each containing the info for one currently existing channel:

    async def get_channels(self) :
        "gets information on all currently-existing channels."
        result = []
        fields = \
        response = await self.do_command("core show channels concise").split("\012")
        for line in response :
            line = line.split("!")
            if len(line) >= len(fields) :
                result.append(dict(zip(fields, line)))
            #end if
        #end for
        return result
    #end get_channels

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