Asterisk DNID question

Right now I have two channels set to go to a context block for our 1800 number (Those two channels are the two physical pots lines the 1800 number is tied to). What I would like to do is see if the calls coming in are to the 1800 number or to the real number. Is there a simple way to just echo out that variable in the console and I can just place a test call to see if it works?

Thanks in advance.

Well I did some testing today and it seem the ${callerid(dnid)} variable is empty. I set it to be the caller id number and it wouldn’t display anything. So now I guess I need to figure out if it is the way we handle the call, the hardware stripping it or us not receiving it at all from the telco. :cry: