From asterisk-1.4.20.1.tar.gz; 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
Page Changes
DNID for SIP incoming calls from VoIP provider
Full decision in dialplan (when "to" headers look like <sip:xxxxxxx@sipnet.ru>):
exten => s,1,Set(FOO=${SIP_HEADER(TO):5})
exten => s,n,Set(DNID=${CUT(FOO,@,1)})
exten => s,n,Goto(${DNID},1)
Started a page that may be useful
http://www.voip-info.org/wiki/view/Routing+calls+using+a+free+international+calling+service
DNID relating to Asterisk
exten => s,1,NoOp(${SIP_HEADER(TO)})
Could prove very useful
This variable could prove very useful. for instance, one could incorporate it into an international callback, without prior pick-up (i.e one stage dialing). for example, a user would dial the * phone number immediately followed by the ultimate destination he/she wishes to reach (should work for calls coming over zap channels at least) . * authentifies the user based on CID, then connects through a conference room the CID and DNID numbers (after proper CDR recording). If anyone interested in co-developing (I could pay for this) let me know at o (underscore) olivier (at) hotmail (dot) com