Problem with HANGUPCAUSE

Hello All,

I am trying to develop an application where, I am asked to call a number.

I am doing this by creating “callfile” and copying it to “spool/outgoing” directory.I was successful in creating callfile.

Now, my I am trying to find the result or status of the dialed number. I am trying to do this HANGUP cause variable.
Based on the value of the HANGUPCAUSE, I was planning to identify the status of the channel.
But in my case, the HANGUPCAUSE is always returning me the value as 16 which means “AST_CAUSE_NORMAL_CLEARING” .
Can any one please explain me why I am always getting the same HANGUPCAUSE NUMBER.

Thanks in Advance,
Amaresh Manthena.