You could just store the initial value of ${EXTEN} in another channel
variable before doing any postprocessing on it. You can then refer to
the original received DNIS whenever you like elsewhere.
Karl Fife wrote:
> Question:
> Naturally there are times when need to I reformat an extension in a
> context as such:
>
> ;Reformat add CC1
> exten => _NXXNXXXXXX,1,Goto(1${EXTEN},1)
>
> -or-
> ;Reformat 011 with with +CC
> exten => _011X. ,1,Goto(+${EXTEN:3},1)
>
> 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:
>
> exten => _1NXXNXXXXXX,n(fail),Goto(other-context,${CALLERID(DNID)},1)
>
> ...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.
>
> 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
>
> Thanks!
>
> -Karl
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> AstriCon 2009 - October 13 - 15 Phoenix, Arizona
> Register Now: http://www.astricon.net
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
--
Alex Balashov
Evariste Systems
Web : http://www.evaristesys.com/
Tel : (+1) (678) 954-0670
Direct : (+1) (678) 954-0671
Mobile : (+1) (678) 237-1775