Need Help to initiate OBD using Asterisk

i am trying to initiate OBD call using call file, but unable to retrieve isdn failure codes in the ${HANGUPCAUSE} variable.
While asterisk prints the correct error code in the logs but the same is not getting set in the hangupcause vairable either in the failed or in the h extensions.
Any ideas…