[asterisk-users] After Dial execution, using DIALEDTIME, ANSWEREDTIME

Tony Mountifield tony at softins.clara.co.uk
Thu Aug 21 11:35:14 CDT 2008


In article <20080821153516.292500 at gmx.com>, selmak se <selmak at gmx.com> wrote:
>  I noticed that when dial terminates it does not return to the dialplan, 
> and therefore can not execute any entry after Dial().
> 
>  Is there any trick to overcome this limitation ?

You can give the 'g' option to Dial, but that might not be the best way.

>  How I am supposed to handle the returned vales DIALEDTIME, ANSWEREDTIME if 
> I can not execute anything after Dial()?

In the 'h' extension, as you mentioned below.

>  I made a workaround with DeadAGI (below) but it is unreliable: if 2 calls 
> end nearly at the same time I do not know to whom belongs the ANSWEREDTIME 
> value :
> 
>  exten => h,1,DeadAGI(myagi.agi,0,${DIALEDTIME},${ANSWEREDTIME},00)

Use the value of ${UNIQUEID} to distinguish between the channels. It will
be unique for every channel in a system.

Cheers
Tony
-- 
Tony Mountifield
Work: tony at softins.co.uk - http://www.softins.co.uk
Play: tony at mountifield.org - http://tony.mountifield.org



More information about the asterisk-users mailing list