<div>I think I&#39;ve found the answer to Q2 in my below email. For example, if wanted to retrieve the email address of user 1000, I&#39;d use something like:</div>
<div>exec_msg (&#39;P=$(mysql -u root -D ser --password=mypassword&nbsp; -e &quot;select email_address from subscriber where username=1000&quot;&#39;)</div>
<div>&nbsp;</div>
<div>There is a problem though. If I type this on Linux shell:</div>
<div>&gt; echo $P<br>the output is: </div>
<div>&gt; email_address <a href="mailto:1000@localhost">1000@localhost</a></div>
<div>&nbsp;</div>
<div>does anyone know how to get rid of the field name and just get the value. That is, instead of getting &quot;email address 1000@localhost&quot;, how could I get just &quot;<a href="mailto:1000@localhost">1000@localhost</a>&quot; ?<br>
</div>
<div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">frq ser</b> &lt;<a href="mailto:frq.ser@googlemail.com">frq.ser@googlemail.com</a>&gt;<br>Date: Fri, Apr 11, 2008 at 1:41 PM<br>
Subject: Questions re. MySQL<br>To: <a href="mailto:serusers@iptel.org">serusers@iptel.org</a><br><br><br>
<div>Hi,</div>
<div>&nbsp;</div>
<div>Here&#39;s a set of basic questions for which I need your help.&nbsp; I want&nbsp;to&nbsp;play different announcements based on the caller&#39;s history. For simplicity, I want ann1_user1.wav to be played for the first call, and ann2_user1.wav for all subsequent calls from the 1st user. Similarly for&nbsp;2nd user, the files would be ann*_user2.wav.</div>

<div>&nbsp;</div>
<div>1) I want to have a basic record of the number of&nbsp; times a user has called the SER(ie, sent an INVITE). Which table and column&nbsp;in mySQL can I use for this purpose. Also, how can I write the integer&nbsp;using SER commands (ie something that I can put in ser.cfg file). There is an example (<a href="http://www.iptel.org/write_custom_text_to_mysql_acc_table" target="_blank">http://www.iptel.org/write_custom_text_to_mysql_acc_table</a>) which uses &#39;acc_db_request&#39;, but it can only write to sip_status column in acc table. How can I modify /write to to any general&nbsp;field in mysql?</div>

<div>&nbsp;</div>
<div>2) Subsequently, how can I retreive&nbsp;this value from mysql through some command in ser.cfg file.&nbsp;I want to use this value in an &#39;if&#39; statement and redirect the process flow accordingly.</div>
<div>&nbsp;</div>
<div>3) I was thinking of rewriting the uri to make it <a href="mailto:&#39;ann1_user1@xxxxx&#39;" target="_blank">&#39;ann1_user1@xxxxx&#39;</a> and sending the request to early_announce application so that the user hears different announcement based on username and&nbsp;their call&nbsp;history (ie whether this user has called before or not). However,&nbsp;I am not very clear about how to do this. Is there any simpler method to do this. The final aim of this whole exercise is to demonstrate call differentiation based on username and user history. So if someone has a better idea then please do share it. </div>

<div>&nbsp;</div>
<div>Thanks for the help and accept my apologies for squeezing so many questions into a single message.</div>
<div>&nbsp;</div>
<div>Regards,</div>
<div>Frq</div></div><br>