[Asterisk-Users] h extension seems to wipe variables?

Brian West brian at bkw.org
Wed Aug 13 09:50:36 MST 2003


Correct me if i'm wrong but doesn't the cdr modules log the call duration?

bkw

On Wed, 13 Aug 2003, Alastair Maw wrote:

> Hi.
>
> I'm trying to do some custom call logging, and I want to call an AGI
> script from a hangup handler to log call durations and things. Although
> the script executes, it isn't retrieving variables from the AGI
> interface. Looking closer, I realised the variables are actually getting
> unset before the h extension is reached.
>
> [foo]
> s,1,SetVar,foo=bar
> s,2,Play(audio/a-long-prompt)
> h,1,AGI(log-call-duration.pl)
>
> When I do an $agi->get_variable("foo") from the perl, I get the string
> "noresponse" returned.
>
> This all works fine if I don't call the AGI from the hangup extension,
> but from a normal one instead.
>
> Does anyone have any idea how I might fix or work around this? It's
> important for us to log call durations (and other things), which
> obviously needs to be done when the users hangs up. Storing stuff using
> the cdr isn't really an option.
>
> --
> Alastair Maw <al.maw at mxtelecom.com>
> MX Telecom - Systems Analyst
> http://www.mxtelecom.com
>
> _______________________________________________
> Asterisk-Users mailing list
> Asterisk-Users at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-users
>



More information about the asterisk-users mailing list