[asterisk-users] From the CLI, how can I hangup a channel name that includes a space character?

Dan Cropp dan at amtelco.com
Thu Jan 16 13:17:44 CST 2020

Thanks Doug.

Turns out if using hangup request does not work with the escaped character
CLI> hangup request PJSIP/1003\ a-00000007
Usage: channel request hangup <channel>|<all>
       Request that a channel be hung up. The hangup takes effect
       the next time the driver reads or writes from the channel.
       If 'all' is specified instead of a channel name, all channels
       will see the hangup request.

However, channel request hangup ... does support the escaped character.
CLI> channel request hangup PJSIP/1003\ a-00000007
Requested Hangup on channel 'PJSIP/1003 a-00000007'

Thank you for the help.


-----Original Message-----
From: asterisk-users <asterisk-users-bounces at lists.digium.com> On Behalf Of Doug Lytle
Sent: Thursday, January 16, 2020 12:22 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion <asterisk-users at lists.digium.com>
Subject: Re: [asterisk-users] From the CLI, how can I hangup a channel name that includes a space character?

>>> Is there some control character(s) for the CLI to interpret everything in between as a single argument?

I think you can typically use tab completion when working with spaces or you can escape the space with a back slash

For example Doug Lytle would be

Doug\ Lytle


-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:

More information about the asterisk-users mailing list