Deadagi hungup problem

i have a deadagi function in my dialplan.

h,1,deadagi(test.php)

The script still runs after the user hangs up. but the problem is that agivariables, (e.i. agivar[agi_callerid]) are not passed to my php script… my php script is dependent in agi variables.

correct me if i am wrong.
i guess that whenever it hungs up; the channel is closed. therefore the agi variables are gone… the agi variable can only be pass if the channel is still up.

anyone who have an idea how to solve this problem?
is there a way to get agi variables after it hangs up, thanks in advance.

all i need is the callernumber. how can i pass the callernumber to php script without using the agi variables… if there is no other way to pass the agi variables if the channel is dead.

${CALLERID(num)} is still available at the ‘h’ extension, so exten => h,1,AGI(myscript.agi|${CALLERID(num)}) would pass the variable to your AGI.

Can you please show me your extensions.conf. I basically want to see the flow of it as i want to run the script just after the call gets hanged up but unable to do so. Kindly show me your extensions.conf file so that i could get a clue and solve my problem as well.

who’s that addressed to ?

This is addressed to bighippo but all of the ppl who have understood my problem can give me the clue by showing a piece of config

i’ve upgrade my asterisk box to asterisk 1.4.2
i think the hung up problem is already fixed. i mean the agi variables are still there after hung up…

i still got problem dealing with variables…

if i use the hung up function, the extension variable passed to php is “h”.
i want the old extension… not the “h” extension.

example.

exten => 1000,1,Dial(IAX2/1000) exten => h,1,agi,test.php

i need the old extension (1000). how am i going to pass the old extension. any idea?

question whats the variable in php when you pass it?? or what variable am i going to use/call in php to use?