<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.3059" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=&#26032;&#32048;&#26126;&#39636; size=2></FONT>&nbsp;</DIV>
<BLOCKQUOTE 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
  <DIV style="FONT: 10pt &#26032;&#32048;&#26126;&#39636;"><SPAN class=gmail_quote>On 4/9/07, <B 
  class=gmail_sendername>chungyu</B> &lt;<A 
  href="mailto:chungyu@ms11.voip.edu.tw">chungyu@ms11.voip.edu.tw</A>&gt; 
  wrote:</SPAN></DIV>
  <BLOCKQUOTE class=gmail_quote 
  style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
    <DIV bgcolor="#ffffff">
    <DIV><FONT face="&#27;$B?7:YL@qs&#27;(B">Hi Raviprakash 
sunkara:</FONT></DIV>
    <DIV><FONT face="&#27;$B?7:YL@qs&#27;(B">&nbsp;&nbsp;&nbsp; 
    &nbsp;&nbsp;&nbsp; Thank for the reply. I am trying use the 
    solution.</FONT></DIV>
    <DIV><FONT face="&#27;$B?7:YL@qs&#27;(B"></FONT>&nbsp;</DIV>
    <DIV><FONT face="&#27;$B?7:YL@qs&#27;(B" size=2><SPAN 
    class=q>&nbsp;&nbsp;<FONT 
    size=3>modparam("avpops","avp_alias","store=s:domain")&nbsp;</FONT></SPAN></FONT></DIV></DIV></BLOCKQUOTE>
  <DIV>&nbsp;</DIV>
  <DIV><BR></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><BR></DIV>
  <BLOCKQUOTE class=gmail_quote 
  style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
    <DIV bgcolor="#ffffff">
    <DIV><FONT face="&#27;$B?7:YL@qs&#27;(B" size=2><FONT 
    size=3>avp_write("$ruri/domain/username","$avp(store)"); 
    </FONT></FONT></DIV></DIV></BLOCKQUOTE>
  <DIV><BR>remove the either username or domain , or simle give the $ruri, 
  <BR>Below one also same , but&nbsp; is there contact table is exists or not 
  <BR>if not exists , it stores in usr_preference table ( default) </DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT face=&#26032;&#32048;&#26126;&#39636; size=2>contact table is exists and not save into 
  usr_preference</FONT></DIV>
  <DIV><FONT face=&#26032;&#32048;&#26126;&#39636; size=2></FONT>&nbsp;</DIV>
  <DIV><FONT face=&#26032;&#32048;&#26126;&#39636; size=2>This is my confgure</FONT></DIV>
  <DIV><FONT face=&#26032;&#32048;&#26126;&#39636; size=2></FONT><FONT face=&#26032;&#32048;&#26126;&#39636; size=2>modparam("avpops", 
  "avp_table", "conatct")</FONT><BR><FONT face=&#26032;&#32048;&#26126;&#39636; size=2>modparam("avpops", 
  "domain_column", "domain")</FONT></DIV>
  <DIV><FONT face=&#26032;&#32048;&#26126;&#39636; size=2>modparam("avpops", "username_column", 
  "username")</FONT></DIV>
  <DIV><FONT face=&#26032;&#32048;&#26126;&#39636; size=2>modparam("avpops", "avp_aliases", 
  "store=s:friend")</FONT></DIV><FONT face=&#26032;&#32048;&#26126;&#39636; size=2></FONT></BLOCKQUOTE>
<BLOCKQUOTE 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px"><FONT 
  face=&#26032;&#32048;&#26126;&#39636; size=2>
  <DIV>if (method=="INVITE"){</DIV>
  <DIV>&nbsp;&nbsp;&nbsp; avp_write("$ruri/username", "$store");</DIV>
  <DIV>&nbsp;&nbsp;&nbsp; avp_db_store("$store", "s:/contact")</DIV>
  <DIV>&nbsp;&nbsp; }</DIV>
  <DIV>&nbsp;</DIV>
  <DIV>if call bob then bob'name save into contact table</DIV>
  <DIV>&nbsp;</DIV>
  <DIV>username&nbsp; |&nbsp; domain<BR>------------------------</DIV>
  <DIV>bob&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  |&nbsp;&nbsp; null</DIV>
  <DIV>-----------------------</DIV>
  <DIV>&nbsp;</DIV>
  <DIV>Thanks a lot in advance</DIV>
  <DIV>Chungyu</DIV>
  <DIV>&nbsp;<BR></FONT><BR></DIV>
  <BLOCKQUOTE class=gmail_quote 
  style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
    <DIV bgcolor="#ffffff">
    <DIV><FONT face="&#27;$B?7:YL@qs&#27;(B" size=2><FONT 
    size=3>&nbsp;avp_db_store("$ruri/domain/username", 
    "$avp(store)/contact")</FONT></FONT></DIV>
    <DIV><FONT face=&#26032;&#32048;&#26126;&#39636; size=2></FONT>&nbsp;</DIV>
    <DIV><FONT face="&#27;$B?7:YL@qs&#27;(B">system reply</FONT></DIV>
    <DIV><FONT face="&#27;$B?7:YL@qs&#27;(B">&nbsp;ERROR:avpops:fixup_write_avp: 
    flag "domain/username" unknown!</FONT></DIV>
    <DIV><FONT face="&#27;$B?7:YL@qs&#27;(B"></FONT>&nbsp;</DIV>
    <DIV><FONT face="&#27;$B?7:YL@qs&#27;(B">I only want uri of callee save into 
    contact(table name)</FONT></DIV>
    <DIV><FONT face="&#27;$B?7:YL@qs&#27;(B">Try most the param for 
    avo_db_store(),but reply </FONT></DIV>
    <DIV><FONT face="&#27;$B?7:YL@qs&#27;(B">submit_query(): unknow column 
    'attribute' in 'field list'</FONT></DIV>
    <DIV><FONT face="&#27;$B?7:YL@qs&#27;(B">db_insert: Error while submitting 
    query</FONT></DIV>
    <DIV><FONT face="&#27;$B?7:YL@qs&#27;(B">ERROR:avpops:db_store: insert 
    failed</FONT></DIV><SPAN class=q>
    <DIV><FONT face="&#27;$B?7:YL@qs&#27;(B"></FONT>&nbsp;</DIV>
    <DIV><FONT face="&#27;$B?7:YL@qs&#27;(B" size=2>Thanks a lot in 
    advance</FONT></DIV></SPAN><SPAN class=sg>
    <DIV><FONT face="&#27;$B?7:YL@qs&#27;(B">Chungyu</FONT></DIV></SPAN>
    <DIV><SPAN class=e id=q_111d58a9245dc71f_5>
    <BLOCKQUOTE 
    style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: rgb(0,0,0) 2px solid; MARGIN-RIGHT: 0px">
      <DIV><FONT face=&#26032;&#32048;&#26126;&#39636; size=2></FONT>&nbsp;</DIV><BR><BR>
      <DIV><SPAN class=gmail_quote>On 4/9/07, <B 
      class=gmail_sendername>chungyu</B> &lt;<A 
      onclick="return top.js.OpenExtLink(window,event,this)" 
      href="mailto:chungyu@ms11.voip.edu.tw" 
      target=_blank>chungyu@ms11.voip.edu.tw</A>&gt; wrote:</SPAN> 
      <BLOCKQUOTE class=gmail_quote 
      style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
        <DIV bgcolor="#ffffff">
        <DIV><FONT size=2>Hi all,<BR>I am trying to use avp_db_store() stores my 
        table "contact" with caller uri</FONT></DIV>
        <DIV>&nbsp;</DIV>
        <DIV><FONT size=2>ex:<BR>&nbsp;&nbsp;&nbsp; table name: 
        contact<BR>&nbsp;&nbsp; -----------------------------<BR>&nbsp; |&nbsp; 
        username | domain |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
        |<BR>&nbsp;&nbsp; -----------------------------<BR>&nbsp; 
        |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
        |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
        |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |<BR>&nbsp;&nbsp; 
        ----------------------------- <BR>&nbsp; 
        |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
        |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
        |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |<BR>&nbsp;&nbsp; 
        -----------------------------</FONT></DIV>
        <DIV>&nbsp;</DIV>
        <DIV><FONT size=2>&nbsp;If 
        (method=="INVITE"){<BR>&nbsp;&nbsp;&nbsp;&nbsp; 
        avp_write("$ruri/username", "s:name");</FONT></DIV></DIV></BLOCKQUOTE>
      <DIV><BR><BR>in Loading paramater&nbsp; of&nbsp; avp module <BR>Did U use 
      this . <BR>modparam("avpops","avp_alias","store=s:domain") 
      <BR>modparam(avpops","use_domain",1)<BR><BR></DIV><BR>
      <BLOCKQUOTE class=gmail_quote 
      style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
        <DIV bgcolor="#ffffff">
        <DIV><FONT size=2>&nbsp;&nbsp;&nbsp;&nbsp; avp_write("$ruri/domain", 
        "s:domain"); </FONT></DIV></DIV></BLOCKQUOTE>
      <DIV><BR>use this <BR>avp_write("$ruri/domain/username","$avp(store)"); 
      <BR></DIV><BR>
      <BLOCKQUOTE class=gmail_quote 
      style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
        <DIV bgcolor="#ffffff">
        <DIV><FONT size=2>&nbsp;&nbsp;&nbsp;&nbsp; avo_db_store("s:name", 
        "s:username/contact")</FONT></DIV></DIV></BLOCKQUOTE>
      <DIV><BR>avp_db_store("$ruri/domain/username","$avp(store)/contat_table_name"); 
      <BR></DIV><BR><BR>I hopes this will helps U.... <BR>Let me know, <BR>
      <BLOCKQUOTE class=gmail_quote 
      style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
        <DIV bgcolor="#ffffff">
        <DIV><FONT size=2>&nbsp;&nbsp;&nbsp;&nbsp; avp_db_store("s:domain", 
        "s:domain/contact");<BR>&nbsp;&nbsp;&nbsp;&nbsp; };</FONT></DIV>
        <DIV>&nbsp;</DIV>
        <DIV><FONT size=2>if the call bob then save username and domain of 
        callee in contact<BR>callee:&nbsp; bob at <A 
        onclick="return top.js.OpenExtLink(window,event,this)" 
        href="http://iptel.org" target=_blank>iptel.org</A> 
        <BR>=&gt;<BR>&nbsp;&nbsp; -----------------------------<BR>&nbsp; 
        |&nbsp; username | domain&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp; 
        |<BR>&nbsp;&nbsp; -----------------------------<BR>&nbsp; 
        |&nbsp;&nbsp;&nbsp;&nbsp; bob&nbsp;&nbsp; | <A 
        onclick="return top.js.OpenExtLink(window,event,this)" 
        href="http://iptel.org" target=_blank>iptel.org</A>&nbsp; |&nbsp;&nbsp; 
        |<BR>&nbsp;&nbsp; ----------------------------- <BR>&nbsp; 
        |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
        |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
        |&nbsp;&nbsp; |<BR>&nbsp;&nbsp; 
        -----------------------------<BR>&nbsp;but not success, system reply 
        <BR>ERROR:avpops:db_store: insert faild</FONT></DIV>
        <DIV>&nbsp;</DIV>
        <DIV><FONT size=2>Am I setting wrong param for avo_db_store()?<BR>Thanks 
        a lot in advance</FONT></DIV>
        <DIV>&nbsp;</DIV>
        <DIV><FONT 
    size=2>chungyu<BR></FONT></DIV></DIV></BLOCKQUOTE></DIV></BLOCKQUOTE></SPAN></DIV></DIV></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>