[asterisk-users] Execute after hangup

Steve Edwards asterisk.org at sedwards.com
Mon Apr 20 11:02:56 CDT 2009


Trying to make something coherent out of indiscriminate [top|bottom] 
posting...

>> On Mon, Apr 20, 2009 at 10:31 AM, Michael
> <michael at networkstuff.co.nz>wrote:

>>> What is the syntax to progress with a dial plan after hangup please?

> On Tue, 21 Apr 2009 02:40:58 you wrote:

>> You can use the extension h
>>
>> exten => h,1,app()
>> exten => h,n,app()

> Thanks. That works for 1 item, but it doesn't progress past the first 
> 'h' item for me.

On Mon, 20 Apr 2009, Danny Nicholas wrote:

> You might want to use AGI or DEADAGI if you have more than 1 thing to do on
> hangup.

Coming from a 1.2 Luddite...

A good place to start with elementary questions is Google, voip-info.org, 
TFOT, etc.

Besides the "h" extension, take a look at the "g" option to the dial application.

If you can't execute more than 1 priority in your "h" extension, you have 
an error in your dialplan or whatever it was that you executed in priority 
1.

You "HAVE" to use deadagi if you want to execute an AGI on a "dead" channel.

Here's a snippet showing multiple items (AGI and otherwise) all being 
executed in the "h" extension:

; finish up a call
[finish-call]
         exten = h,1,                    verbose(1,[${CONTEXT}:${EXTEN}:${PRIORITY}])
         exten = h,n,                    deadagi(write-cdr)
         exten = h,n,                    deadagi(most-idle-1on1-caller,--leave)
         exten = h,n,                    deadagi(cleanup)
         exten = h,n,                    hangup()

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



More information about the asterisk-users mailing list