Re: [asterisk-users] start n run an agi script on hangup
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 [EMAIL PROTECTED] wrote: From: Robor Oghene [EMAIL PROTECTED] Subject: Re: [asterisk-users] start n run an agi script on hangup To: Asterisk Users Mailing List - Non-Commercial Discussion asterisk-users@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 [EMAIL PROTECTED] wrote: Robor Oghene wrote: 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 [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Robor Oghene wrote: 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=enq=how+do+I+run+an+AGI+after+hangupbtnG=Search http://www.google.com/search?hl=enq=how+do+I+run+an+AGI+after+hangupbtnG=Search Google is nice -- Sherwood McGowan VoIP / Telecom Solutions [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] ___ -- 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 :) -- Sherwood McGowan VoIP / Telecom Solutions [EMAIL PROTECTED] ___ -- 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 ___ -- 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
Re: [asterisk-users] start n run an agi script on hangup
On Fri, 13 Jun 2008, Benjamin Jacob wrote: 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 [EMAIL PROTECTED] Voice: +1-760-468-3867 PST Newline Fax: +1-760-731-3000 ___ -- 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
[asterisk-users] start n run an agi script on hangup
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
Re: [asterisk-users] start n run an agi script on hangup
http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+DeadAGI On Fri, Jun 13, 2008 at 9:29 AM, Robor Oghene [EMAIL PROTECTED] wrote: 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 ___ -- 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
Re: [asterisk-users] start n run an agi script on hangup
Robor Oghene wrote: 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=enq=how+do+I+run+an+AGI+after+hangupbtnG=Search Google is nice -- Sherwood McGowan VoIP / Telecom Solutions [EMAIL PROTECTED] ___ -- 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
Re: [asterisk-users] start n run an agi script on hangup
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 [EMAIL PROTECTED] wrote: Robor Oghene wrote: 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=enq=how+do+I+run+an+AGI+after+hangupbtnG=Search Google is nice -- Sherwood McGowan VoIP / Telecom Solutions [EMAIL PROTECTED] ___ -- 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
Re: [asterisk-users] start n run an agi script on hangup
Robor Oghene wrote: 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 [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Robor Oghene wrote: 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=enq=how+do+I+run+an+AGI+after+hangupbtnG=Search http://www.google.com/search?hl=enq=how+do+I+run+an+AGI+after+hangupbtnG=Search Google is nice -- Sherwood McGowan VoIP / Telecom Solutions [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] ___ -- 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 :) -- Sherwood McGowan VoIP / Telecom Solutions [EMAIL PROTECTED] ___ -- 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
Re: [asterisk-users] start n run an agi script on hangup
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 [EMAIL PROTECTED] wrote: Robor Oghene wrote: 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=enq=how+do+I+run+an+AGI+after+hangupbtnG=Search Google is nice -- Sherwood McGowan VoIP / Telecom Solutions [EMAIL PROTECTED] ___ -- 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
Re: [asterisk-users] start n run an agi script on hangup
Thanks a million Sherwood!! On Fri, Jun 13, 2008 at 9:31 PM, Sherwood McGowan [EMAIL PROTECTED] wrote: Robor Oghene wrote: 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 [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Robor Oghene wrote: 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=enq=how+do+I+run+an+AGI+after+hangupbtnG=Search http://www.google.com/search?hl=enq=how+do+I+run+an+AGI+after+hangupbtnG=Search Google is nice -- Sherwood McGowan VoIP / Telecom Solutions [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] ___ -- 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 :) -- Sherwood McGowan VoIP / Telecom Solutions [EMAIL PROTECTED] ___ -- 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
Re: [asterisk-users] start n run an agi script on hangup
Robor Oghene wrote: 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 [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Robor Oghene wrote: 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=enq=how+do+I+run+an+AGI+after+hangupbtnG=Search http://www.google.com/search?hl=enq=how+do+I+run+an+AGI+after+hangupbtnG=Search Google is nice -- Sherwood McGowan VoIP / Telecom Solutions [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] ___ -- 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 :( -- Sherwood McGowan VoIP / Telecom Solutions [EMAIL PROTECTED] ___ -- 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
Re: [asterisk-users] start n run an agi script on hangup
Robor Oghene wrote: 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 [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Robor Oghene wrote: 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=enq=how+do+I+run+an+AGI+after+hangupbtnG=Search http://www.google.com/search?hl=enq=how+do+I+run+an+AGI+after+hangupbtnG=Search Google is nice -- Sherwood McGowan VoIP / Telecom Solutions [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] ___ -- 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 :( Yes, DeadAGI and the h extension is handled just fine in realtime extensions -- Sherwood McGowan VoIP / Telecom Solutions [EMAIL PROTECTED] ___ -- 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
Re: [asterisk-users] start n run an agi script on hangup
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 [EMAIL PROTECTED] wrote: 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 [EMAIL PROTECTED] wrote: Robor Oghene wrote: 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=enq=how+do+I+run+an+AGI+after+hangupbtnG=Search Google is nice -- Sherwood McGowan VoIP / Telecom Solutions [EMAIL PROTECTED] ___ -- 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 ___ -- 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