Re: [asterisk-users] How to hangup all channels

2010-11-29 Thread Jeff LaCoursiere

Un-un-top posting...

> -Original Message-
> From: asterisk-users-boun...@lists.digium.com
> [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Steve
> Edwards
> Sent: 29 November 2010 15:43
> To: Asterisk Users Mailing List - Non-Commercial Discussion
> Subject: Re: [asterisk-users] How to hangup all channels
> 
> Un-top-posting...
> 
> > From: Giuseppe D'alessio
> >
> > Thank you, i want to follow your idea, how i can send and receive data
> 
> > from/to Command Line in PHP Script?
> 
> On Mon, 29 Nov 2010, Andrew Thomas wrote:
> 
> > Read http://www.voip-info.org/wiki/view/Asterisk+AGI
> 
> An AGI is executed in the context of a channel. Are you suggesting the
> OP 
> write an AGI so he can call into his system to ask it to hang up all 
> channels?
> 
On Mon, 2010-11-29 at 16:11 +, Andrew Thomas wrote:
> Re-top-posting...
> 
> I was merely pointing out that AGI exists (teach a man to fish...)!
> 
> Sorry for not being as perfect as you...
>

I think you are missing the point entirely.  The OP wants to hangup all
channels, and appears to want to do so from a web interface, which makes
sense.  Writing an AGI does not make sense, as you would have to call
into the PBX to execute it, and basically hangup on yourself.  Don't get
me wrong, it would work, but it seems like a bad design.  Teach a man to
fish, but teach him to do it with a fishing rod, not a crowbar.

j


-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] How to hangup all channels

2010-11-29 Thread Andrew Thomas
Re-top-posting...

I was merely pointing out that AGI exists (teach a man to fish...)!

Sorry for not being as perfect as you...

-Original Message-
From: asterisk-users-boun...@lists.digium.com
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Steve
Edwards
Sent: 29 November 2010 15:43
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] How to hangup all channels

Un-top-posting...

> From: Giuseppe D'alessio
>
> Thank you, i want to follow your idea, how i can send and receive data

> from/to Command Line in PHP Script?

On Mon, 29 Nov 2010, Andrew Thomas wrote:

> Read http://www.voip-info.org/wiki/view/Asterisk+AGI

An AGI is executed in the context of a channel. Are you suggesting the
OP 
write an AGI so he can call into his system to ask it to hang up all 
channels?

-- 
Thanks in advance,

-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867
PST
Newline  Fax:
+1-760-731-3000

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


 If you have received this communication in error we would appreciate
you advising us either by telephone or return of e-mail. The contents
of this message, and any attachments, are the property of DataVox,
and are intended for the confidential use of the named recipient only.
If you are not the intended recipient, employee or agent responsible
for delivery of this message to the intended recipient, take note that
any dissemination, distribution or copying of this communication and
its attachments is strictly prohibited, and may be subject to civil or
criminal action for which you may be liable.
Every effort has been made to ensure that this e-mail or any attachments
are free from viruses. While the company has taken every reasonable
precaution to minimise this risk, neither company, nor the sender can
accept liability for any damage which you sustain as a result of viruses.
It is recommended that you should carry out your own virus checks
before opening any attachments. 

Registered in England. No. 27459085.



-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] How to hangup all channels

2010-11-29 Thread Steve Edwards
Un-top-posting...

> From: Giuseppe D'alessio
>
> Thank you, i want to follow your idea, how i can send and receive data 
> from/to Command Line in PHP Script?

On Mon, 29 Nov 2010, Andrew Thomas wrote:

> Read http://www.voip-info.org/wiki/view/Asterisk+AGI

An AGI is executed in the context of a channel. Are you suggesting the OP 
write an AGI so he can call into his system to ask it to hang up all 
channels?

-- 
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
Newline  Fax: +1-760-731-3000

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] How to hangup all channels

2010-11-29 Thread Steve Edwards
Un-top-posting...

On Sat, 27 Nov 2010, Giuseppe D'alessio wrote:

> > > Hi guys, I'm using Asterisk 1.4 and i need a way to hangup all channels.

On Sat, 27 Nov 2010, Steve Edwards wrote:

> > 2) Write a script to do "asterisk -r -x 'core show channels'", parse the
> > output and do "asterisk -r -x 'channel request hangup ${CHANNEL_NAME}" for
> > each channel.
> >
> > 3) Write a script to do #2 using AMI.

On Mon, 29 Nov 2010, Giuseppe D'alessio wrote:

> Thank you, i want to follow your idea, how i can send and receive data 
> from/to Command Line in PHP Script?Thank you in advance

1) Use 'popen().'

2) Use 'proc_open().'

3) Google for 'asterisk php ami.'

-- 
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
Newline  Fax: +1-760-731-3000

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] How to hangup all channels

2010-11-29 Thread Andrew Thomas
2 ways:

Read http://www.voip-info.org/wiki/view/Asterisk+AGI

or in PHP - system ("asterisk -rx 'core restart now' > /dev/null"); 

-Original Message-
From: asterisk-users-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Giuseppe D'alessio
Sent: 29 November 2010 14:47
To: asterisk-users@lists.digium.com
Subject: Re: [asterisk-users] How to hangup all channels

Thank you, i want to follow your idea, how i can send and receive data from/to 
Command Line in PHP Script?
Thank you in advance

> Date: Sat, 27 Nov 2010 08:45:47 -0800
> From: asterisk@sedwards.com
> To: asterisk-users@lists.digium.com
> Subject: Re: [asterisk-users] How to hangup all channels
> 
> On Sat, 27 Nov 2010, Giuseppe D'alessio wrote:
> 
> > Hi guys, I'm using Asterisk 1.4 and i need a way to hangup all channels.
> 
> 1) sudo /etc/init.d/asterisk restart
> 
> 2) Write a script to do "asterisk -r -x 'core show channels'", parse the 
> output and do "asterisk -r -x 'channel request hangup ${CHANNEL_NAME}" for 
> each channel.
> 
> 3) Write a script to do #2 using AMI.
> 
> -- 
> Thanks in advance,
> -
> Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST
> Newline Fax: +1-760-731-3000
> 
> -- 
> _
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> New to Asterisk? Join us for a live introductory webinar every Thurs:
> http://www.asterisk.org/hello
> 
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users


 If you have received this communication in error we would appreciate
you advising us either by telephone or return of e-mail. The contents
of this message, and any attachments, are the property of DataVox,
and are intended for the confidential use of the named recipient only.
If you are not the intended recipient, employee or agent responsible
for delivery of this message to the intended recipient, take note that
any dissemination, distribution or copying of this communication and
its attachments is strictly prohibited, and may be subject to civil or
criminal action for which you may be liable.
Every effort has been made to ensure that this e-mail or any attachments
are free from viruses. While the company has taken every reasonable
precaution to minimise this risk, neither company, nor the sender can
accept liability for any damage which you sustain as a result of viruses.
It is recommended that you should carry out your own virus checks
before opening any attachments. 

Registered in England. No. 27459085.



-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] How to hangup all channels

2010-11-29 Thread Giuseppe D'alessio

Thank you, i want to follow your idea, how i can send and receive data from/to 
Command Line in PHP Script?Thank you in advance

> Date: Sat, 27 Nov 2010 08:45:47 -0800
> From: asterisk@sedwards.com
> To: asterisk-users@lists.digium.com
> Subject: Re: [asterisk-users] How to hangup all channels
> 
> On Sat, 27 Nov 2010, Giuseppe D'alessio wrote:
> 
> > Hi guys, I'm using Asterisk 1.4 and i need a way to hangup all channels.
> 
> 1) sudo /etc/init.d/asterisk restart
> 
> 2) Write a script to do "asterisk -r -x 'core show channels'", parse the 
> output and do "asterisk -r -x 'channel request hangup ${CHANNEL_NAME}" for 
> each channel.
> 
> 3) Write a script to do #2 using AMI.
> 
> -- 
> Thanks in advance,
> -
> Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
> Newline  Fax: +1-760-731-3000
> 
> -- 
> _
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> New to Asterisk? Join us for a live introductory webinar every Thurs:
>http://www.asterisk.org/hello
> 
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>http://lists.digium.com/mailman/listinfo/asterisk-users
  -- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] How to hangup all channels

2010-11-27 Thread Jim Dickenson
Can also do "asterisk -r -x 'restart now'"

asterisk*CLI> help restart
   restart gracefully  Restart Asterisk gracefully
  restart now  Restart Asterisk immediately
  restart when convenient  Restart Asterisk at empty call volume

-- 
Jim Dickenson
mailto:dicken...@cfmc.com

CfMC
http://www.cfmc.com/



On Nov 27, 2010, at 8:45 AM, Steve Edwards wrote:

> On Sat, 27 Nov 2010, Giuseppe D'alessio wrote:
> 
>> Hi guys, I'm using Asterisk 1.4 and i need a way to hangup all channels.
> 
> 1) sudo /etc/init.d/asterisk restart
> 
> 2) Write a script to do "asterisk -r -x 'core show channels'", parse the 
> output and do "asterisk -r -x 'channel request hangup ${CHANNEL_NAME}" for 
> each channel.
> 
> 3) Write a script to do #2 using AMI.
> 
> -- 
> Thanks in advance,
> -
> Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
> Newline  Fax: +1-760-731-3000
> 
> -- 
> _
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> New to Asterisk? Join us for a live introductory webinar every Thurs:
>   http://www.asterisk.org/hello
> 
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-users


-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] How to hangup all channels

2010-11-27 Thread Steve Edwards
On Sat, 27 Nov 2010, Giuseppe D'alessio wrote:

> Hi guys, I'm using Asterisk 1.4 and i need a way to hangup all channels.

1) sudo /etc/init.d/asterisk restart

2) Write a script to do "asterisk -r -x 'core show channels'", parse the 
output and do "asterisk -r -x 'channel request hangup ${CHANNEL_NAME}" for 
each channel.

3) Write a script to do #2 using AMI.

-- 
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
Newline  Fax: +1-760-731-3000

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


[asterisk-users] How to hangup all channels

2010-11-27 Thread Giuseppe D'alessio
Hi guys, I'm using Asterisk 1.4 and i need a way to hangup all channels. 
I want to use the teleyapper system for broadcasting call for security reason 
but i need that all channels are free when a security call is ready to start!
I already search in the old post without success. 
Can anyone help me? 
Thanks and sorry for my newbie english-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users