Thanks Klaus.<br><br>I made:<br>&nbsp;avp_write("$fU","$avp(s:uri_ini)");<br>&nbsp;avp_write("$fU","$avp(s:code_uri)");<br>&nbsp;#add the code from area to uri&nbsp;<br>&nbsp;avp_subst("$avp(s:code_uri)", "/[0-9]{7}$/$tU/");<br>&nbsp;avp_pushto("$ru/username","$avp(s:code_uri)");<br>&nbsp;avp_delete("$avp(s:uri_ini)");<br>&nbsp;avp_delete("$avp(s:code_uri)");<br><br><br><br><br><b><i>Klaus Darilion &lt;klaus.mailinglists@pernau.at&gt;</i></b> escribió:<blockquote class="replbq" style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"> 1. copy the from userpart into an AVP (use the pseudo variable for from <br>userpart - I think it is $fU). E.g with avp_printf or avp_write<br>2. use a regular expression to copy the first 3 digits (withouth sip:) <br>into a new AVP2.<br>3. create a new AVP3 which consists of the 3 digits and the request URI <br>(e.g. avp_printf with AVP2 and $ru)<br>4. avp_push AVP3 back to the request
 URI<br><br>regards<br>klaus<br><br>Jose Gil Navarrete wrote:<br>&gt; Hi.<br>&gt; I need to obtain the first two o three digits of the header From and add them to uri?<br>&gt; <br>&gt; It's, because the telephones make the register with ten digits (area-code + telephone number), then in the call, the telephone sends the invites with 7 or 8 digits, it's because they don't use area code.<br>&gt; <br>&gt; thanks in advance.<br>&gt; <br>&gt;    <br>&gt; ---------------------------------<br>&gt;   Do You Yahoo!? La mejor conexión a Internet y 2GB extra a tu correo por $100 al mes. http://net.yahoo.com.mx <br>&gt; <br>&gt; <br>&gt; ------------------------------------------------------------------------<br>&gt; <br>&gt; _______________________________________________<br>&gt; Users mailing list<br>&gt; Users@openser.org<br>&gt; http://openser.org/cgi-bin/mailman/listinfo/users<br><br><br>-- <br>Klaus Darilion<br>nic.at<br><br></blockquote><br><p>&#32;
                <hr size=1>  
Do You Yahoo!? 
La mejor conexión a Internet y <b>2GB</b> extra a tu correo por $100 al mes. <a href="http://net.yahoo.com.mx">http://net.yahoo.com.mx</a>