DNID sometimes contains the number that was dialed.

From asterisk-; docs/channelvariables.txt:
${DNID} - Dialed Number Identifier (Deprecated; use ${CALLERID(dnid)})

Asterisk implementation comment:
I do not know when it works or not nor when it is supposed to work or not.
See http://bugs.digium.com/view.php?id=2590

See also

Created by: fredo, Last modification: Tue 03 of Jun, 2008 (18:40 UTC) by timbo
Please update this page with new information, just login and click on the "Edit" or "Discussion" tab. Get a free login here: Register Thanks! - Find us on Google+