How can I get a DNID number and RDINS

hello, guys:
how i can get the DIND and RDINS number using asterisk command. so far, i tried ${DIND} or ${RDINS}. I can not get the RDINS number. i am using PRI in asterisk. if anyone knows how to solve it, please help me!
regards!

try using ${CALLERID(dnis)} and ${CALLERID(rdnis)}