<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.18812">
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2 face=Arial>Question:<BR>Naturally there are times when need to
I reformat an extension in a context as such: </FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>;Reformat add CC1<BR>exten =>
_NXXNXXXXXX,1,Goto(1${EXTEN},1) </FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>-or-</FONT></DIV>
<DIV><FONT size=2 face=Arial>;Reformat 011 with with +CC <BR>exten =>
_011X. ,1,Goto(+${EXTEN:3},1) </FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>It's a helpful trick, BUT there are times when I
want to send the call to another context in its original un-reformatted
state. Naturally the ${EXTEN} variable has been changed. It occurred
to me to use CALLERID(DNID) as such:</FONT></DIV>
<DIV><FONT size=2 face=Arial>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>exten =>
_1NXXNXXXXXX,n(fail),Goto(other-context,${CALLERID(DNID)},1)
</FONT></DIV></FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>...but I am wondering if I can be 100% confident
that CALLERID(DNID) will always be equal to the 'original' ${EXTEN}
variable. I observe that they are the same, but it occurs to me that it
may be up to the convention of my ITSP(s) or PRI provider to populate that value
equal to the original ${EXTEN}, and therefore it may vary over time and between
providers.</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>If the answer is "NO, CALLERID(DNID) is not
reliable and can vary between providers and implementations", I then ask whether
there is a RELIABLE place from which to fetch that original EXTEN value without
the added dialplan overhead of saving it myself</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>Thanks!</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>-Karl</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV></BODY></HTML>