[asterisk-users] Hangup extensions via CLI?
Tzafrir Cohen
tzafrir.cohen at xorcom.com
Sun Feb 15 01:26:52 CST 2009
On Fri, Feb 13, 2009 at 06:08:45PM +0800, Dinesh Nair wrote:
> On Wed, 11 Feb 2009 12:34:12 +0100, Lenz Emilitri wrote:
>
> > This is a bit of trickery, but could not resist :)
> >
> > This will kill a channel that is connected to SIP/201
> >
> > asterisk -rx "soft hangup $(asterisk -rx 'show channels' | grep SIP/201
> > | awk '{ print $1 '} )"
Useless use of grep:
asterisk -rx "soft hangup $(asterisk -rx 'show channels' | awk '/SIP\/201/ {print $1}' )"
>
> what if there're also channels sip/201, sip/2011, sip/2012, sip/2013 et
> al ?
asterisk -rx "soft hangup $(asterisk -rx 'show channels' | awk '/SIP\/201\>/ {print $1}' )"
--
Tzafrir Cohen
icq#16849755 jabber:tzafrir.cohen at xorcom.com
+972-50-7952406 mailto:tzafrir.cohen at xorcom.com
http://www.xorcom.com iax:guest at local.xorcom.com/tzafrir
More information about the asterisk-users
mailing list