<p>I have worked on somewhat similar situations but with ANI and DNIS, not with RDNIS, but it seems similar to me. If it enters a context, the code I sent above should work just fine. If not, you can either replace ${EXTEN:1} with ${CALLERID(RDNIS):1}, or within the same context where you know CALLERID(RDNIS) exists assign it to a new variable &quot;foo&quot; like:</p>

<p>exten =&gt; s,1,GotoIf($[&quot;${CALLERID(RDNIS):0:1}&quot;=&quot;1&quot;]?a:b)<br>
exten =&gt; s,n(a),Set(foo=&quot;${CALLERID(RDNIS):1}&quot;)<br>
exten =&gt; s,n(b),Noop( - - - - - RDNIS fix end - - - - -)</p>
<p>And from here you can use the foo variable. I don&#39;t know if it&#39;ll work or not, but in the above code you can try to do:<br>
Set(CALLERID(RDNIS)=&quot;${CALLERID(RDNIS):1}&quot;)</p>
<p>Zeeshan A Zakaria</p>
<p>--<br>
<a href="http://www.ilovetovoip.com">www.ilovetovoip.com</a></p>
<p><blockquote type="cite">On 2010-06-15 5:13 PM, &quot;Chris Ramirez&quot; &lt;<a href="mailto:cramirez@tele-onecom.com">cramirez@tele-onecom.com</a>&gt; wrote:<br><br>


  

<div bgcolor="#ffffff" text="#000000">
Right now we are attempting this...<br>
<br>
When a call comes in it has all of the CALLERID() information. What we
are wanting is that when the variable CALLERID(RDNIS) comes through as
18005555555 we can have it be forwarded through the system as
8005555555 rather than with the 1 preceding it.We are setting the RDNIS
as the CDR(userfield) to pass it through. Is that what you were wanting?<p><font color="#500050"><br><br>On 6/15/2010 3:23 PM, Zeeshan Zakaria wrote:<br>&gt;<br>&gt; Can you give an example of how it looks like?<br>&gt;<br>
&gt;...</font></p><p><font color="#500050">-- <br>Chris Ramirez <br>TELE-ONE COMMUNICATIONS, INC. <br><a href="mailto:cramirez@tele-onecom.com">cramirez@tele-onecom.com</a> <br>903-531-0777</font></p></div>

<br>--<br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
New to Asterisk? Join us for a live introductory webinar every Thurs:<br>
               <a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
   <a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br></blockquote></p>