Hi, <br>
<br>
did anyone run into similar problems or have successfully set up IMC 
module with mysql? Can you please share your know-how on the subject?<br>
<br>
Besides issue described below, I also had several other issues, but I 
think they all might be related to the fact that my rooms and members 
are only stored in cache, but not in the database. To repeat, this is 
really strange behavior because all other modules that I&#39;m using write to 
the database without a problem. <br>
<br>
Best regards <br>
Ozren<br>
<br><br><div class="gmail_quote">On Mon, May 30, 2011 at 6:28 PM, Ozren Lapcevic <span dir="ltr">&lt;<a href="mailto:ozren.lapcevic@gmail.com">ozren.lapcevic@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hi all,<br><br>I&#39;m trying to configure IMC module and get it to work properly but I&#39;ve run into problems with saving IMC module data to mysql database.<br><br>I&#39;m using following code provided in IMC module documentation:<br>

 <br>modparam(&quot;imc&quot;, &quot;db_url&quot;, DBURL)<br><br>## route block ###<br>        if(is_method(&quot;MESSAGE&quot;) &amp;&amp; (uri=~ &quot;sip:chat-[0-9]+@&quot;) || (uri=~ &quot;sip:chat-manager@&quot;)) {<br>

                xlog(&quot;L_INFO&quot;, &quot;going to imc: F [$fu] T [$tu] B [$rb]\n&quot;);<br><br>                if(imc_manager())<br>                        sl_send_reply(&quot;200&quot;, &quot;ok - imc_manager()&quot;);<br>

                else<br>                        sl_send_reply(&quot;500&quot;, &quot;command error&quot;);<br>        exit;<br>        }<br><br>I am creating chat room with following message sent to <a href="mailto:chat-manager@abc.hr" target="_blank">chat-manager@abc.hr</a>: &quot;#create chat-111&quot;<br>

<br>DEBUG log returns following:<br>May 30 18:01:23 ser-test /usr/local/kamailio-ozren/sbin/kamailio[13225]: INFO: &lt;script&gt;: going to imc: F [<a href="mailto:sip%3Aoz@abc.hr" target="_blank">sip:oz@abc.hr</a>] T [<a href="mailto:sip%3Achat-manager@abc.hr" target="_blank">sip:chat-manager@abc.hr</a>] B [#create chat-111]<br>

May 30 18:01:23 ser-test /usr/local/kamailio-ozren/sbin/kamailio[13225]: DEBUG: imc [imc.c:525]: found command<br>May 30 18:01:23 ser-test /usr/local/kamailio-ozren/sbin/kamailio[13225]: DEBUG: imc [imc_cmd.c:146]: command: [create]<br>

May 30 18:01:23 ser-test /usr/local/kamailio-ozren/sbin/kamailio[13225]: DEBUG: imc [imc_cmd.c:151]: parameter 0=[chat-111]<br>May 30 18:01:23 ser-test /usr/local/kamailio-ozren/sbin/kamailio[13225]: DEBUG: imc [imc_cmd.c:171]: new room [chat-111]<br>

May 30 18:01:23 ser-test /usr/local/kamailio-ozren/sbin/kamailio[13225]: DEBUG: imc [imc_cmd.c:186]: added room uri= <a href="mailto:sip%3Achat-111@abc.hr" target="_blank">sip:chat-111@abc.hr</a><br>May 30 18:01:23 ser-test /usr/local/kamailio-ozren/sbin/kamailio[13225]: DEBUG: imc [imc_mng.c:322]: [uri]= <a href="mailto:sip%3Aoz@abc.hr" target="_blank">sip:oz@abc.hr</a><br>

May 30 18:01:23 ser-test /usr/local/kamailio-ozren/sbin/kamailio[13225]: DEBUG: imc [imc_mng.c:326]: [user]= oz<br>May 30 18:01:23 ser-test /usr/local/kamailio-ozren/sbin/kamailio[13225]: DEBUG: imc [imc_cmd.c:196]: added the owner as the first member [<a href="mailto:sip%3Aoz@abc.hr" target="_blank">sip:oz@abc.hr</a>]<br>

<br>&quot;./kamctl fifo imc_list_rooms&quot; returns following:<br>ROOM::  URI=<a href="mailto:sip%3Achat-111@abc.hr" target="_blank">sip:chat-111@abc.hr</a> MEMBERS=0 OWNER=<a href="mailto:sip%3Aoz@abc.hr" target="_blank">sip:oz@abc.hr</a><br>
<br>&quot;./kamctl fifo imc_list_members <a href="mailto:sip%3Achat-111@abc.hr" target="_blank">sip:chat-111@abc.hr</a>&quot; returns following:<br>
ROOM:: <a href="mailto:sip%3Achat-111@abc.hr" target="_blank">sip:chat-111@abc.hr</a> NR_OF_MEMBERS=1<br>        MEMBER:: <a href="mailto:sip%3Aoz@abc.hr" target="_blank">sip:oz@abc.hr</a><br><br>However, that data is not persisted/saved in the imc_rooms and imc_members tables in the database. Any clues what might be the problem here?<br>

<br>Any help is greatly appreciated.<br><br>Best regards,<br>Ozren Lapcevic<br><br>PS<br>I&#39;m runing Kamailio 3.1.4 with default cfg file with enabled mysql, 
multidomain, usrlocdb, auth and NAT. I can register clients, establish 
calls, send IMs, etc. imc_rooms and imc_members tables were created when kamailio was installed. I&#39;ve also checked imc-create.sql script and tables are correctly created. <br><br>The same DBURL used for imc is also used for auth_db, domain and usrloc 
modules and I haven&#39;t experienced any problems with those modules and 
database connection/persistence. domain, location, version and subscriber tables are correctly populated. <br><br>I&#39;m not getting any errors from imc_manager(), it returns 200 OK. I can&#39;t trace any errors in DEBUG related to problems with mysql database.<br>

</blockquote></div><br>