<div>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">This might be a newbie question... </blockquote>
<div> </div>
<div>You're right, part of it is. I don't mean to sound rude, but you really need to go do some research first to get the basics down. First place is to read the book, Asterisk: The Future of Telephony (available for free, there's this site called
<a href="http://google.com">google.com</a> that can give you loads of information, including where to download the book), the next stop would be <a href="http://www.voip-info.org">www.voip-info.org</a>. </div>
<div> </div>
<div>By basics, I'm referring to your numbering. It should be:</div>
<div> </div>
<div>exten => s,1,....</div>
<div>exten => s,n,....</div>
<div> </div>
<div>Now, to answer your question, which looks to be a good question. On a PRI, the variable ${DNID} contains the dialed number (I believe, or at least it did for me in testing). On a SIP connection, see: <a href="http://www.voip-info.org/wiki/view/DNID">
http://www.voip-info.org/wiki/view/DNID</a>. It appears you may need to use something else for a SIP connection. You'll have to see for yourself. In my case, it does not return the number dialed, but rather the SIP username dialed.
</div>
<div> </div>
<div>BTW, the FROM_DID variable is something from FreePBX, not standard Asterisk. Are you using standard Asterisk, FreePBX, Trixbox, or <a href="mailto:Asterisk@Home">Asterisk@Home</a>?</div><br> </div>