Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[asterisk-users] start n run an agi script on hangup


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users
View previous topic :: View next topic  
Author Message
stotaro at totarotechn...
Guest





PostPosted: Fri Jun 13, 2008 8:58 am    Post subject: [asterisk-users] start n run an agi script on hangup Reply with quote

http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+DeadAGI

On Fri, Jun 13, 2008 at 9:29 AM, Robor Oghene <oghenerobor at gmail.com> wrote:
Quote:
hello All,

How do I start and run an agi script on channel hang up?

Rgds,

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

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
Back to top
sherwood.mcgowan at gm...
Guest





PostPosted: Fri Jun 13, 2008 9:05 am    Post subject: [asterisk-users] start n run an agi script on hangup Reply with quote

Robor Oghene wrote:
Quote:
hello All,

How do I start and run an agi script on channel hang up?

Rgds,
------------------------------------------------------------------------

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

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
Define the "h" extension in the context in question, and use DeadAGI
http://www.google.com/search?hl=en&q=how+do+I+run+an+AGI+after+hangup&btnG=Search
Google is nice

--
Sherwood McGowan
VoIP / Telecom Solutions
sherwood.mcgowan at gmail.com
Back to top
sherwood.mcgowan at gm...
Guest





PostPosted: Fri Jun 13, 2008 3:31 pm    Post subject: [asterisk-users] start n run an agi script on hangup Reply with quote

Robor Oghene wrote:
Quote:
Thanks Steve, I appreciate your response, I checked the link and it
talks about an agi script running before and continuing after
hangup..... the problem I have is that, I dont want to run an agi
while the channel is up..... i want to start the script on on hangup
to do database cleanup...... i'd appreciate if you'd shed more light
just in case am missing something..

Rgds

On Fri, Jun 13, 2008 at 3:05 PM, Sherwood McGowan
<sherwood.mcgowan at gmail.com <mailto:sherwood.mcgowan at gmail.com>> wrote:

Robor Oghene wrote:
Quote:
hello All,

How do I start and run an agi script on channel hang up?

Rgds,

------------------------------------------------------------------------
Quote:

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

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
Define the "h" extension in the context in question, and use DeadAGI
http://www.google.com/search?hl=en&q=how+do+I+run+an+AGI+after+hangup&btnG=Search
<http://www.google.com/search?hl=en&q=how+do+I+run+an+AGI+after+hangup&btnG=Search>
Google is nice

--
Sherwood McGowan
VoIP / Telecom Solutions
sherwood.mcgowan at gmail.com <mailto:sherwood.mcgowan at gmail.com>


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

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 --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
DeadAGI will run even after both channels are down, that's why they
called it DeadAGI. VERY useful when put in the h exten Smile

--
Sherwood McGowan
VoIP / Telecom Solutions
sherwood.mcgowan at gmail.com
Back to top
sherwood.mcgowan at gm...
Guest





PostPosted: Fri Jun 13, 2008 7:48 pm    Post subject: [asterisk-users] start n run an agi script on hangup Reply with quote

Robor Oghene wrote:
Quote:
Thanks Sherwood, I haven't tried what the line you sent but I think it
would solve my problem.... I just hope it would run from asterisk
realtime...

On Fri, Jun 13, 2008 at 3:05 PM, Sherwood McGowan
<sherwood.mcgowan at gmail.com <mailto:sherwood.mcgowan at gmail.com>> wrote:

Robor Oghene wrote:
Quote:
hello All,

How do I start and run an agi script on channel hang up?

Rgds,

------------------------------------------------------------------------
Quote:

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

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
Define the "h" extension in the context in question, and use DeadAGI
http://www.google.com/search?hl=en&q=how+do+I+run+an+AGI+after+hangup&btnG=Search
<http://www.google.com/search?hl=en&q=how+do+I+run+an+AGI+after+hangup&btnG=Search>
Google is nice

--
Sherwood McGowan
VoIP / Telecom Solutions
sherwood.mcgowan at gmail.com <mailto:sherwood.mcgowan at gmail.com>


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

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 --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
You can't store AEL in realtime extensions, sorry, it's compiled at load
time (or AEL reload + dialplan reload) by the compiler Sad

--
Sherwood McGowan
VoIP / Telecom Solutions
sherwood.mcgowan at gmail.com
Back to top
sherwood.mcgowan at gm...
Guest





PostPosted: Fri Jun 13, 2008 7:48 pm    Post subject: [asterisk-users] start n run an agi script on hangup Reply with quote

Robor Oghene wrote:
Quote:
Thanks Sherwood, I haven't tried what the line you sent but I think it
would solve my problem.... I just hope it would run from asterisk
realtime...

On Fri, Jun 13, 2008 at 3:05 PM, Sherwood McGowan
<sherwood.mcgowan at gmail.com <mailto:sherwood.mcgowan at gmail.com>> wrote:

Robor Oghene wrote:
Quote:
hello All,

How do I start and run an agi script on channel hang up?

Rgds,

------------------------------------------------------------------------
Quote:

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

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
Define the "h" extension in the context in question, and use DeadAGI
http://www.google.com/search?hl=en&q=how+do+I+run+an+AGI+after+hangup&btnG=Search
<http://www.google.com/search?hl=en&q=how+do+I+run+an+AGI+after+hangup&btnG=Search>
Google is nice

--
Sherwood McGowan
VoIP / Telecom Solutions
sherwood.mcgowan at gmail.com <mailto:sherwood.mcgowan at gmail.com>


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

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 --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
oops, sorry I was thinking of another post I had responded too Sad

Yes, DeadAGI and the h extension is handled just fine in realtime extensions

--
Sherwood McGowan
VoIP / Telecom Solutions
sherwood.mcgowan at gmail.com
Back to top
stotaro at totarotechn...
Guest





PostPosted: Fri Jun 13, 2008 9:07 pm    Post subject: [asterisk-users] start n run an agi script on hangup Reply with quote

Two things jump to mind depending on the nature of your script. Both
use the "h" extension, this is where a call will go when hungup. You
can either use deadagi on the h extension or you can use exten =
h,1,System(command).

Thanks,
Steve T

On Fri, Jun 13, 2008 at 4:26 PM, Robor Oghene <oghenerobor at gmail.com> wrote:
Quote:
Thanks Steve, I appreciate your response, I checked the link and it talks
about an agi script running before and continuing after hangup..... the
problem I have is that, I dont want to run an agi while the channel is
up..... i want to start the script on on hangup to do database cleanup......
i'd appreciate if you'd shed more light just in case am missing something..

Rgds

On Fri, Jun 13, 2008 at 3:05 PM, Sherwood McGowan
<sherwood.mcgowan at gmail.com> wrote:
Quote:

Robor Oghene wrote:
Quote:
hello All,

How do I start and run an agi script on channel hang up?

Rgds,
------------------------------------------------------------------------

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

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
Define the "h" extension in the context in question, and use DeadAGI

http://www.google.com/search?hl=en&q=how+do+I+run+an+AGI+after+hangup&btnG=Search
Google is nice

--
Sherwood McGowan
VoIP / Telecom Solutions
sherwood.mcgowan at gmail.com


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

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 --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
Back to top
ben4asterisk at yahoo.com
Guest





PostPosted: Sat Jun 14, 2008 1:46 am    Post subject: [asterisk-users] start n run an agi script on hangup Reply with quote

I think, you can use the 'h' extension to invoke scripts (DeadAGI to be more precise) on hungup channels.
use something like this :
exten => _X., 1, NoOp(got a call)
exten => _X., n, Dial(<somexten>}
....

exten => h, 1, DeadAGI(hangupScript.sh)
--- On Fri, 6/13/08, Robor Oghene <oghenerobor at gmail.com> wrote:

Quote:
From: Robor Oghene <oghenerobor at gmail.com>
Subject: Re: [asterisk-users] start n run an agi script on hangup
To: "Asterisk Users Mailing List - Non-Commercial Discussion" <asterisk-users at lists.digium.com>
Date: Friday, June 13, 2008, 8:59 PM
Thanks a million Sherwood!!

On Fri, Jun 13, 2008 at 9:31 PM, Sherwood McGowan <
sherwood.mcgowan at gmail.com> wrote:

Quote:
Robor Oghene wrote:
Quote:
Thanks Steve, I appreciate your response, I
checked the link and it
Quote:
Quote:
talks about an agi script running before and
continuing after
Quote:
Quote:
hangup..... the problem I have is that, I dont
want to run an agi
Quote:
Quote:
while the channel is up..... i want to start the
script on on hangup
Quote:
Quote:
to do database cleanup...... i'd appreciate
if you'd shed more light
Quote:
Quote:
just in case am missing something..

Rgds

On Fri, Jun 13, 2008 at 3:05 PM, Sherwood McGowan
<sherwood.mcgowan at gmail.com
<mailto:sherwood.mcgowan at gmail.com>> wrote:
Quote:
Quote:

Robor Oghene wrote:
Quote:
hello All,

How do I start and run an agi script on
channel hang up?
Quote:
Quote:
Quote:

Rgds,



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

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

http://lists.digium.com/mailman/listinfo/asterisk-users
Quote:
Quote:
Define the "h" extension in the
context in question, and use DeadAGI
http://www.google.com/search?hl=en&q=how+do+I+run+an+AGI+after+hangup&btnG=Search
Quote:
Quote:
<

http://www.google.com/search?hl=en&q=how+do+I+run+an+AGI+after+hangup&btnG=Search
Quote:
Quote:

Google is nice

--
Sherwood McGowan
VoIP / Telecom Solutions
sherwood.mcgowan at gmail.com
<mailto:sherwood.mcgowan at gmail.com>
_______________________________________________
Quote:
Quote:
-- Bandwidth and Colocation Provided by
http://www.api-digital.com--
Quote:
Quote:

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

http://lists.digium.com/mailman/listinfo/asterisk-users
------------------------------------------------------------------------
Quote:
Quote:

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

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

http://lists.digium.com/mailman/listinfo/asterisk-users
Quote:
DeadAGI will run even after both channels are down,
that's why they
Quote:
called it DeadAGI. VERY useful when put in the h exten
Smile
Quote:

--
Sherwood McGowan
VoIP / Telecom Solutions
sherwood.mcgowan at gmail.com


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

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

http://lists.digium.com/mailman/listinfo/asterisk-users
Quote:
_______________________________________________
-- Bandwidth and Colocation Provided by
http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
Back to top
asterisk.org at sedwar...
Guest





PostPosted: Sat Jun 14, 2008 3:00 am    Post subject: [asterisk-users] start n run an agi script on hangup Reply with quote

On Fri, 13 Jun 2008, Benjamin Jacob wrote:

Quote:
I think, you can use the 'h' extension to invoke scripts (DeadAGI to be
more precise) on hungup channels. use something like this :

exten => _X., 1, NoOp(got a call)
exten => _X., n, Dial(<somexten>}
....

exten => h, 1, DeadAGI(hangupScript.sh)

Just to clarify...

You don't need the "h" extension to invoke deadagi(). You need the "h"
extension to "catch" the channel hangup.

You may have several contexts in your dialplan where you want to catch a
channel hangup. If the code you want to execute in each context is the
same, you could "catch" the channel hangup and go to a common context to
finish the call. For example:

[example-1]
.
.
.
exten = h,1, verbose(1,Hangup detected)
exten = h,n, goto(finish-call,s,1)

[example-2]
.
.
.
exten = h,1, verbose(1,Hangup detected)
exten = h,n, goto(finish-call,s,1)

finish-call]
exten = s,1, verbose(1,Finishing call)
exten = s,n, deadagi(cleanup-database)

Note that deadagi() is invoked from "s," not "h."

Personally, I would use the "h" extension in finish-call so that it is
obvious that we think we are processing a hung up channel -- but it is not
a requirement.

You could clean this example up a bit with a template:

[h](!)
exten = h,1, verbose(1,Hangup detected)
exten = h,n, goto(finish-call,h,1)

[example-1](h)
.
.
.

[example-2](h)
.
.
.

finish-call]
exten = h,1, verbose(1,Finishing call)
exten = h,n, deadagi(cleanup-database)

Thanks in advance,
------------------------------------------------------------------------
Steve Edwards sedwards at sedwards.com Voice: +1-760-468-3867 PST
Newline Fax: +1-760-731-3000
Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services