<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=big5">
<META content="MSHTML 6.00.2900.2995" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2>Hi</FONT></DIV>
<DIV><FONT size=2> I used subst_uri() and
AVP.</FONT></DIV>
<DIV><FONT size=2>ex:</FONT></DIV>
<DIV><FONT size=2><FONT
size=3>subst_uri('/^sip:(.*)@(.*)$/sip:4761@10\.10\.20\.154/');
</FONT></FONT></DIV>
<DIV><FONT size=2><FONT size=2></FONT></FONT> </DIV>
<DIV><FONT size=2><FONT size=3>the result is OK</FONT></FONT></DIV>
<DIV><FONT size=2><FONT size=2></FONT></FONT> </DIV>
<DIV><FONT size=2><FONT size=3>changed this</FONT></FONT></DIV>
<DIV><FONT size=2><FONT size=3>avp_write("4761",
"s:phone");<BR>subst_uri('/^sip:(.*)@(.*)$/sip:$avp(phone)@10\.10\.20\.154/');
</FONT></FONT></DIV>
<DIV><FONT size=2><FONT size=3>the result is error.</FONT></FONT></DIV>
<DIV><FONT size=2><FONT size=2></FONT></FONT> </DIV>
<DIV><FONT size=2><FONT size=3>On the AVP configuration was not
wrong?</FONT></FONT></DIV>
<DIV>thank you!!</DIV>
<DIV><FONT size=2><FONT size=3>Changyu</FONT></FONT></DIV>
<DIV><FONT size=2><FONT size=3>2006/12/13</FONT></DIV>
<DIV><BR></DIV></FONT>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt 新細明體">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt 新細明體; font-color: black"><B>From:</B>
<A title=chungyu@ms11.voip.edu.tw
href="mailto:chungyu@ms11.voip.edu.tw">chungyu</A> </DIV>
<DIV style="FONT: 10pt 新細明體"><B>To:</B> <A title=serusers@lists.iptel.org
href="mailto:serusers@lists.iptel.org">serusers@lists.iptel.org</A> </DIV>
<DIV style="FONT: 10pt 新細明體"><B>Sent:</B> Wednesday, December 13, 2006 9:56
PM</DIV>
<DIV style="FONT: 10pt 新細明體"><B>Subject:</B> [Serusers] About
rewriteuser()</DIV>
<DIV><BR></DIV>
<DIV><FONT size=2>Hi</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2> I have a field called
"phone_number" in subscriber,and would append to rewriteuser().<BR>But
rewriteuser() type is string. So have a problem.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2>problem:<BR> I used
AVpops.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2>
modparam("avpops","avp_aliases","phone=i:660")<BR>
modparam("avpops","db_scheme","phone_scheme:table=subscriber;value_col=phone_number;value_type=string")</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2>
avp_db_load("$ruri","$phone/$phone_scheme");<BR>
rewriteuser("$phone");<BR>
<BR> result is error. because
rewriteuser(string).</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2> and i want if value of
"$phone" is 4761<BR> <BR> the result is <A
href="mailto:4761@domain">4761@domain</A></FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2>How should I use rewriteuser()</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2>Thank you!!</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2>Chungyu<BR>2006/12/13<BR></FONT></DIV>
<P>
<HR>
<P></P>_______________________________________________<BR>Serusers mailing
list<BR>Serusers@lists.iptel.org<BR>http://lists.iptel.org/mailman/listinfo/serusers<BR></BLOCKQUOTE></BODY></HTML>