[asterisk-users] Hangup extensions via CLI?

Lenz Emilitri lenz.loway at gmail.com
Wed Feb 11 05:34:12 CST 2009


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 '} )"

It basically calls *, gets the list of channels, filters them out to get the
channel name and hangs it up.

OK, using AMI and a real programming language and hadling multiple lines
would be better.

Thanks

l.

2009/2/9 Tim Nelson <tnelson at rockbochs.com>

> Greetings list-
>
> I'd like the ability to hangup all calls for a particular extension from
> the system CLI. I understand this can probably be scripted using the AMI but
> I'm not familiar on how to do it. Help!
>
> Tim Nelson
> Systems/Network Support
> Rockbochs Inc.
> (218)727-4332 x105
>
>
-- 
Loway - home of QueueMetrics - http://queuemetrics.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20090211/b1ff3cce/attachment-0001.htm 


More information about the asterisk-users mailing list