Ozren Lapcevic | 1 Jun 2011 10:48
Picon

Re: [SR-Users] IMC module unresolved issues

Hi,

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?

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'm using write to the database without a problem.

Best regards
Ozren


On Mon, May 30, 2011 at 6:28 PM, Ozren Lapcevic <ozren.lapcevic-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
Hi all,

I'm trying to configure IMC module and get it to work properly but I've run into problems with saving IMC module data to mysql database.

I'm using following code provided in IMC module documentation:
 
modparam("imc", "db_url", DBURL)

## route block ###
        if(is_method("MESSAGE") && (uri=~ "sip:chat-[0-9]+ <at> ") || (uri=~ "sip:chat-manager <at> ")) {
                xlog("L_INFO", "going to imc: F [$fu] T [$tu] B [$rb]\n");

                if(imc_manager())
                        sl_send_reply("200", "ok - imc_manager()");
                else
                        sl_send_reply("500", "command error");
        exit;
        }

I am creating chat room with following message sent to chat-manager <at> abc.hr: "#create chat-111"

DEBUG log returns following:
May 30 18:01:23 ser-test /usr/local/kamailio-ozren/sbin/kamailio[13225]: INFO: <script>: going to imc: F [sip:oz-mMtOvdfhfA4@public.gmane.org] T [sip:chat-manager-mMtOvdfhfA4@public.gmane.org] B [#create chat-111]
May 30 18:01:23 ser-test /usr/local/kamailio-ozren/sbin/kamailio[13225]: DEBUG: imc [imc.c:525]: found command
May 30 18:01:23 ser-test /usr/local/kamailio-ozren/sbin/kamailio[13225]: DEBUG: imc [imc_cmd.c:146]: command: [create]
May 30 18:01:23 ser-test /usr/local/kamailio-ozren/sbin/kamailio[13225]: DEBUG: imc [imc_cmd.c:151]: parameter 0=[chat-111]
May 30 18:01:23 ser-test /usr/local/kamailio-ozren/sbin/kamailio[13225]: DEBUG: imc [imc_cmd.c:171]: new room [chat-111]
May 30 18:01:23 ser-test /usr/local/kamailio-ozren/sbin/kamailio[13225]: DEBUG: imc [imc_cmd.c:186]: added room uri= sip:chat-111-mMtOvdfhfA4@public.gmane.org
May 30 18:01:23 ser-test /usr/local/kamailio-ozren/sbin/kamailio[13225]: DEBUG: imc [imc_mng.c:322]: [uri]= sip:oz <at> abc.hr
May 30 18:01:23 ser-test /usr/local/kamailio-ozren/sbin/kamailio[13225]: DEBUG: imc [imc_mng.c:326]: [user]= oz
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 [sip:oz-mMtOvdfhfA4@public.gmane.org]

"./kamctl fifo imc_list_rooms" returns following:
ROOM::  URI=sip:chat-111-mMtOvdfhfA4@public.gmane.org MEMBERS=0 OWNER=sip:oz-mMtOvdfhfA4@public.gmane.org

"./kamctl fifo imc_list_members sip:chat-111-mMtOvdfhfA4@public.gmane.org" returns following:
ROOM:: sip:chat-111-mMtOvdfhfA4@public.gmane.org NR_OF_MEMBERS=1
        MEMBER:: sip:oz-mMtOvdfhfA4@public.gmane.org

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?

Any help is greatly appreciated.

Best regards,
Ozren Lapcevic

PS
I'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've also checked imc-create.sql script and tables are correctly created.

The same DBURL used for imc is also used for auth_db, domain and usrloc modules and I haven't experienced any problems with those modules and database connection/persistence. domain, location, version and subscriber tables are correctly populated.

I'm not getting any errors from imc_manager(), it returns 200 OK. I can't trace any errors in DEBUG related to problems with mysql database.

<div>
<p>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'm using write to 
the database without a problem. <br><br>
Best regards <br>
Ozren<br><br><br></p>
<div class="gmail_quote">On Mon, May 30, 2011 at 6:28 PM, Ozren Lapcevic <span dir="ltr">&lt;<a href="mailto:ozren.lapcevic@...">ozren.lapcevic@...</a>&gt;</span> wrote:<br><blockquote class="gmail_quote">
Hi all,<br><br>I'm trying to configure IMC module and get it to work properly but I've run into problems with saving IMC module data to mysql database.<br><br>I'm using following code provided in IMC module documentation:<br>

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

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

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; else<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sl_send_reply("500", "command error");<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; exit;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br><br>I am creating chat room with following message sent to <a href="mailto:chat-manager@..." target="_blank">chat-manager <at> abc.hr</a>: "#create chat-111"<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@..." target="_blank">sip:oz@...</a>] T [<a href="mailto:sip%3Achat-manager@..." target="_blank">sip:chat-manager@...</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 <at> abc.hr" target="_blank">sip:chat-111@...</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@..." target="_blank">sip:oz <at> 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@..." target="_blank">sip:oz@...</a>]<br><br>"./kamctl fifo imc_list_rooms" returns following:<br>ROOM::&nbsp; URI=<a href="mailto:sip%3Achat-111@..." target="_blank">sip:chat-111@...</a> MEMBERS=0 OWNER=<a href="mailto:sip%3Aoz@..." target="_blank">sip:oz@...</a><br><br>"./kamctl fifo imc_list_members <a href="mailto:sip%3Achat-111 <at> abc.hr" target="_blank">sip:chat-111@...</a>" returns following:<br>
ROOM:: <a href="mailto:sip%3Achat-111@..." target="_blank">sip:chat-111@...</a> NR_OF_MEMBERS=1<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MEMBER:: <a href="mailto:sip%3Aoz@..." target="_blank">sip:oz@...</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'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'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't experienced any problems with those modules and 
database connection/persistence. domain, location, version and subscriber tables are correctly populated. <br><br>I'm not getting any errors from imc_manager(), it returns 200 OK. I can't trace any errors in DEBUG related to problems with mysql database.<br>
</blockquote>
</div>
<br>
</div>
Daniel-Constantin Mierla | 1 Jun 2011 12:41
Picon

Re: [SR-Users] IMC module unresolved issues

Hello,

the module is writing to database only at shutdown, otherwise it keeps everything in cache -- just in case you expected to see some records in database at runtime. However, I think there was an issue that even at shutdown the module didn't write back to database. Please fetch the latest git branch 3.1 and try again for this purpose.

Thanks,
Daniel

On 6/1/11 10:48 AM, Ozren Lapcevic wrote:
Hi,

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?

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'm using write to the database without a problem.

Best regards
Ozren


On Mon, May 30, 2011 at 6:28 PM, Ozren Lapcevic <ozren.lapcevic-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
Hi all,

I'm trying to configure IMC module and get it to work properly but I've run into problems with saving IMC module data to mysql database.

I'm using following code provided in IMC module documentation:
 
modparam("imc", "db_url", DBURL)

## route block ###
        if(is_method("MESSAGE") && (uri=~ "sip:chat-[0-9]+ <at> ") || (uri=~ "sip:chat-manager <at> ")) {
                xlog("L_INFO", "going to imc: F [$fu] T [$tu] B [$rb]\n");

                if(imc_manager())
                        sl_send_reply("200", "ok - imc_manager()");
                else
                        sl_send_reply("500", "command error");
        exit;
        }

I am creating chat room with following message sent to chat-manager-mMtOvdfhfA4@public.gmane.org: "#create chat-111"

DEBUG log returns following:
May 30 18:01:23 ser-test /usr/local/kamailio-ozren/sbin/kamailio[13225]: INFO: <script>: going to imc: F [sip:oz-mMtOvdfhfA4@public.gmane.org] T [sip:chat-manager-mMtOvdfhfA4@public.gmane.org] B [#create chat-111]
May 30 18:01:23 ser-test /usr/local/kamailio-ozren/sbin/kamailio[13225]: DEBUG: imc [imc.c:525]: found command
May 30 18:01:23 ser-test /usr/local/kamailio-ozren/sbin/kamailio[13225]: DEBUG: imc [imc_cmd.c:146]: command: [create]
May 30 18:01:23 ser-test /usr/local/kamailio-ozren/sbin/kamailio[13225]: DEBUG: imc [imc_cmd.c:151]: parameter 0=[chat-111]
May 30 18:01:23 ser-test /usr/local/kamailio-ozren/sbin/kamailio[13225]: DEBUG: imc [imc_cmd.c:171]: new room [chat-111]
May 30 18:01:23 ser-test /usr/local/kamailio-ozren/sbin/kamailio[13225]: DEBUG: imc [imc_cmd.c:186]: added room uri= sip:chat-111-mMtOvdfhfA4@public.gmane.org
May 30 18:01:23 ser-test /usr/local/kamailio-ozren/sbin/kamailio[13225]: DEBUG: imc [imc_mng.c:322]: [uri]= sip:oz-mMtOvdfhfA4@public.gmane.org
May 30 18:01:23 ser-test /usr/local/kamailio-ozren/sbin/kamailio[13225]: DEBUG: imc [imc_mng.c:326]: [user]= oz
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 [sip:oz-mMtOvdfhfA4@public.gmane.org]

"./kamctl fifo imc_list_rooms" returns following:
ROOM::  URI=sip:chat-111-mMtOvdfhfA4@public.gmane.org MEMBERS=0 OWNER=sip:oz-mMtOvdfhfA4@public.gmane.org

"./kamctl fifo imc_list_members sip:chat-111-mMtOvdfhfA4@public.gmane.org" returns following:
ROOM:: sip:chat-111-mMtOvdfhfA4@public.gmane.org NR_OF_MEMBERS=1
        MEMBER:: sip:oz-mMtOvdfhfA4@public.gmane.org

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?

Any help is greatly appreciated.

Best regards,
Ozren Lapcevic

PS
I'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've also checked imc-create.sql script and tables are correctly created.

The same DBURL used for imc is also used for auth_db, domain and usrloc modules and I haven't experienced any problems with those modules and database connection/persistence. domain, location, version and subscriber tables are correctly populated.

I'm not getting any errors from imc_manager(), it returns 200 OK. I can't trace any errors in DEBUG related to problems with mysql database.



_______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users-cR8azDVoa3IcDhw6gZKtMWD2FQJk+8+b@public.gmane.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

-- Daniel-Constantin Mierla -- http://www.asipto.com http://linkedin.com/in/miconda -- http://twitter.com/miconda
<div>
    Hello,<br><br>
    the module is writing to database only at shutdown, otherwise it
    keeps everything in cache -- just in case you expected to see some
    records in database at runtime. However, I think there was an issue
    that even at shutdown the module didn't write back to database.
    Please fetch the latest git branch 3.1 and try again for this
    purpose.<br><br>
    Thanks,<br>
    Daniel <br><br>
    On 6/1/11 10:48 AM, Ozren Lapcevic wrote:
    <blockquote cite="mid:BANLkTimt1T2f08+Qu2mO4iPDXKqdtq48oA@..." type="cite">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'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 moz-do-not-send="true" href="mailto:ozren.lapcevic@...">ozren.lapcevic@...</a>&gt;</span>
        wrote:<br><blockquote class="gmail_quote">
          Hi all,<br><br>
          I'm trying to configure IMC module and get it to work properly
          but I've run into problems with saving IMC module data to
          mysql database.<br><br>
          I'm using following code provided in IMC module documentation:<br>
          &nbsp;<br>
          modparam("imc", "db_url", DBURL)<br><br>
          ## route block ###<br>
          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if(is_method("MESSAGE") &amp;&amp; (uri=~
          <a class="moz-txt-link-rfc2396E" href="sip:chat-%5B0-9%5D+ <at> ">"sip:chat-[0-9]+ <at> "</a>) || (uri=~ <a class="moz-txt-link-rfc2396E" href="sip:chat-manager <at> ">"sip:chat-manager <at> "</a>)) {<br>
          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xlog("L_INFO", "going to imc: F [$fu] T [$tu]
          B [$rb]\n");<br><br>
          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if(imc_manager())<br>
          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sl_send_reply("200", "ok -
          imc_manager()");<br>
          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; else<br>
          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sl_send_reply("500", "command error");<br>
          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; exit;<br>
          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br><br>
          I am creating chat room with following message sent to <a moz-do-not-send="true" href="mailto:chat-manager@..." target="_blank">chat-manager@...</a>: "#create chat-111"<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 moz-do-not-send="true" href="mailto:sip%3Aoz@..." target="_blank">sip:oz@...</a>]
          T [<a moz-do-not-send="true" href="mailto:sip%3Achat-manager@..." target="_blank">sip:chat-manager@...</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 moz-do-not-send="true" href="mailto:sip%3Achat-111@..." target="_blank">sip:chat-111@...</a><br>
          May 30 18:01:23 ser-test
          /usr/local/kamailio-ozren/sbin/kamailio[13225]: DEBUG: imc
          [imc_mng.c:322]: [uri]= <a moz-do-not-send="true" href="mailto:sip%3Aoz@..." target="_blank">sip:oz@...</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 moz-do-not-send="true" href="mailto:sip%3Aoz@..." target="_blank">sip:oz@...</a>]<br><br>
          "./kamctl fifo imc_list_rooms" returns following:<br>
          ROOM::&nbsp; URI=<a moz-do-not-send="true" href="mailto:sip%3Achat-111@..." target="_blank">sip:chat-111@...</a>
          MEMBERS=0 OWNER=<a moz-do-not-send="true" href="mailto:sip%3Aoz@..." target="_blank">sip:oz@...</a><br><br>
          "./kamctl fifo imc_list_members <a moz-do-not-send="true" href="mailto:sip%3Achat-111@..." target="_blank">sip:chat-111@...</a>"
          returns following:<br>
          ROOM:: <a moz-do-not-send="true" href="mailto:sip%3Achat-111@..." target="_blank">sip:chat-111@...</a>
          NR_OF_MEMBERS=1<br>
          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MEMBER:: <a moz-do-not-send="true" href="mailto:sip%3Aoz@..." target="_blank">sip:oz@...</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'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'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't experienced any problems with
          those modules and database connection/persistence. domain,
          location, version and subscriber tables are correctly
          populated. <br><br>
          I'm not getting any errors from imc_manager(), it returns 200
          OK. I can't trace any errors in DEBUG related to problems with
          mysql database.<br>
</blockquote>
      </div>
      <br><br><br>_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@...">sr-users@...</a>
<a class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>

    </blockquote>
    <br>-- 
Daniel-Constantin Mierla -- <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
<a class="moz-txt-link-freetext" href="http://linkedin.com/in/miconda">http://linkedin.com/in/miconda</a> -- <a class="moz-txt-link-freetext" href="http://twitter.com/miconda">http://twitter.com/miconda</a>
  </div>
Klaus Darilion | 1 Jun 2011 14:33
Picon
Favicon

[SR-Users] Kamailio Tables with index

Hi!

With Openser 1.2 all the tables got an auto-increment-index column. Is
this index column just for layout/performance purposes or is it also
used somewhere insides the Kamailio code?

If not (what I expect), then Kamailio 3.1 should still work with tables
without those columns - correct?

Thanks
Klaus

Ozren Lapcevic | 1 Jun 2011 15:33
Picon

Re: [SR-Users] IMC module unresolved issues

Hi Daniel,

thanks for quick response and clarification, it helped a lot.

I was indeed expecting records in database at runtime, but until your latest updates to imc module, the module didn't write to database even at shutdown. Now, I can see records in the database when I shutdown Kamailio. When I start up Kamailio it populates cache based on records from database and deletes records in the database.

Best regards,
Ozren


On Wed, Jun 1, 2011 at 12:41 PM, Daniel-Constantin Mierla <miconda-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
Hello,

the module is writing to database only at shutdown, otherwise it keeps everything in cache -- just in case you expected to see some records in database at runtime. However, I think there was an issue that even at shutdown the module didn't write back to database. Please fetch the latest git branch 3.1 and try again for this purpose.

Thanks,
Daniel

On 6/1/11 10:48 AM, Ozren Lapcevic wrote:
Hi,

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?

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'm using write to the database without a problem.

Best regards
Ozren


On Mon, May 30, 2011 at 6:28 PM, Ozren Lapcevic <ozren.lapcevic-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
Hi all,

I'm trying to configure IMC module and get it to work properly but I've run into problems with saving IMC module data to mysql database.

I'm using following code provided in IMC module documentation:
 
modparam("imc", "db_url", DBURL)

## route block ###
        if(is_method("MESSAGE") && (uri=~ "sip:chat-[0-9]+ <at> ") || (uri=~ "sip:chat-manager <at> ")) {
                xlog("L_INFO", "going to imc: F [$fu] T [$tu] B [$rb]\n");

                if(imc_manager())
                        sl_send_reply("200", "ok - imc_manager()");
                else
                        sl_send_reply("500", "command error");
        exit;
        }

I am creating chat room with following message sent to chat-manager-mMtOvdfhfA4@public.gmane.org: "#create chat-111"

DEBUG log returns following:
May 30 18:01:23 ser-test /usr/local/kamailio-ozren/sbin/kamailio[13225]: INFO: <script>: going to imc: F [sip:oz-mMtOvdfhfA4@public.gmane.org] T [sip:chat-manager-mMtOvdfhfA4@public.gmane.org] B [#create chat-111]
May 30 18:01:23 ser-test /usr/local/kamailio-ozren/sbin/kamailio[13225]: DEBUG: imc [imc.c:525]: found command
May 30 18:01:23 ser-test /usr/local/kamailio-ozren/sbin/kamailio[13225]: DEBUG: imc [imc_cmd.c:146]: command: [create]
May 30 18:01:23 ser-test /usr/local/kamailio-ozren/sbin/kamailio[13225]: DEBUG: imc [imc_cmd.c:151]: parameter 0=[chat-111]
May 30 18:01:23 ser-test /usr/local/kamailio-ozren/sbin/kamailio[13225]: DEBUG: imc [imc_cmd.c:171]: new room [chat-111]
May 30 18:01:23 ser-test /usr/local/kamailio-ozren/sbin/kamailio[13225]: DEBUG: imc [imc_cmd.c:186]: added room uri= sip:chat-111-mMtOvdfhfA4@public.gmane.org
May 30 18:01:23 ser-test /usr/local/kamailio-ozren/sbin/kamailio[13225]: DEBUG: imc [imc_mng.c:322]: [uri]= sip:oz-mMtOvdfhfA4@public.gmane.org
May 30 18:01:23 ser-test /usr/local/kamailio-ozren/sbin/kamailio[13225]: DEBUG: imc [imc_mng.c:326]: [user]= oz
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 [sip:oz-mMtOvdfhfA4@public.gmane.org]

"./kamctl fifo imc_list_rooms" returns following:
ROOM::  URI=sip:chat-111-mMtOvdfhfA4@public.gmane.org MEMBERS=0 OWNER=sip:oz-mMtOvdfhfA4@public.gmane.org

"./kamctl fifo imc_list_members sip:chat-111-mMtOvdfhfA4@public.gmane.org" returns following:
ROOM:: sip:chat-111-mMtOvdfhfA4@public.gmane.org NR_OF_MEMBERS=1
        MEMBER:: sip:oz-mMtOvdfhfA4@public.gmane.org

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?

Any help is greatly appreciated.

Best regards,
Ozren Lapcevic

PS
I'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've also checked imc-create.sql script and tables are correctly created.

The same DBURL used for imc is also used for auth_db, domain and usrloc modules and I haven't experienced any problems with those modules and database connection/persistence. domain, location, version and subscriber tables are correctly populated.

I'm not getting any errors from imc_manager(), it returns 200 OK. I can't trace any errors in DEBUG related to problems with mysql database.



_______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users <at> lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

-- Daniel-Constantin Mierla -- http://www.asipto.com http://linkedin.com/in/miconda -- http://twitter.com/miconda

<div>
<p>Hi Daniel,<br><br>thanks for quick response and clarification, it helped a lot. <br><br>I was indeed expecting records in database at runtime, but until your latest updates to imc module, the module didn't write to database even at shutdown. Now, I can see records in the database when I shutdown Kamailio. When I start up Kamailio it populates cache based on records from database and deletes records in the database.<br><br>Best regards,<br>Ozren<br><br><br></p>
<div class="gmail_quote">On Wed, Jun 1, 2011 at 12:41 PM, Daniel-Constantin Mierla <span dir="ltr">&lt;<a href="mailto:miconda@...">miconda@...</a>&gt;</span> wrote:<br><blockquote class="gmail_quote">

  

  
  <div bgcolor="#FFFFFF" text="#000000">
    Hello,<br><br>
    the module is writing to database only at shutdown, otherwise it
    keeps everything in cache -- just in case you expected to see some
    records in database at runtime. However, I think there was an issue
    that even at shutdown the module didn't write back to database.
    Please fetch the latest git branch 3.1 and try again for this
    purpose.<br><br>
    Thanks,<br>
    Daniel <br><div>
<div></div>
<div class="h5">
    <br>
    On 6/1/11 10:48 AM, Ozren Lapcevic wrote:
    </div>
</div>
<blockquote type="cite">
<div>
<div></div>
<div class="h5">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'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 <at> gmail.com" target="_blank">ozren.lapcevic@...</a>&gt;</span>
        wrote:<br><blockquote class="gmail_quote">
          Hi all,<br><br>
          I'm trying to configure IMC module and get it to work properly
          but I've run into problems with saving IMC module data to
          mysql database.<br><br>
          I'm using following code provided in IMC module documentation:<br>
          &nbsp;<br>
          modparam("imc", "db_url", DBURL)<br><br>
          ## route block ###<br>
          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if(is_method("MESSAGE") &amp;&amp; (uri=~
          <a>"sip:chat-[0-9]+ <at> "</a>) || (uri=~ <a>"sip:chat-manager <at> "</a>)) {<br>
          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xlog("L_INFO", "going to imc: F [$fu] T [$tu]
          B [$rb]\n");<br><br>
          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if(imc_manager())<br>
          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sl_send_reply("200", "ok -
          imc_manager()");<br>
          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; else<br>
          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sl_send_reply("500", "command error");<br>
          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; exit;<br>
          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br><br>
          I am creating chat room with following message sent to <a href="mailto:chat-manager@..." target="_blank">chat-manager@...</a>: "#create chat-111"<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 <at> abc.hr" target="_blank">sip:oz@...</a>]
          T [<a href="mailto:sip%3Achat-manager@..." target="_blank">sip:chat-manager@...</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@..." target="_blank">sip:chat-111@...</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@..." target="_blank">sip:oz@...</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@..." target="_blank">sip:oz@...</a>]<br><br>
          "./kamctl fifo imc_list_rooms" returns following:<br>
          ROOM::&nbsp; URI=<a href="mailto:sip%3Achat-111@..." target="_blank">sip:chat-111@...</a>
          MEMBERS=0 OWNER=<a href="mailto:sip%3Aoz@..." target="_blank">sip:oz@...</a><br><br>
          "./kamctl fifo imc_list_members <a href="mailto:sip%3Achat-111@..." target="_blank">sip:chat-111@...</a>"
          returns following:<br>
          ROOM:: <a href="mailto:sip%3Achat-111@..." target="_blank">sip:chat-111@...</a>
          NR_OF_MEMBERS=1<br>
          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MEMBER:: <a href="mailto:sip%3Aoz@..." target="_blank">sip:oz@...</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'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'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't experienced any problems with
          those modules and database connection/persistence. domain,
          location, version and subscriber tables are correctly
          populated. <br><br>
          I'm not getting any errors from imc_manager(), it returns 200
          OK. I can't trace any errors in DEBUG related to problems with
          mysql database.<br>
</blockquote>
      </div>
      <br><br><br>
</div>
</div>_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a href="mailto:sr-users@..." target="_blank">sr-users <at> lists.sip-router.org</a>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>

    </blockquote>
    <br>-- 
Daniel-Constantin Mierla -- <a href="http://www.asipto.com" target="_blank">http://www.asipto.com</a>
<a href="http://linkedin.com/in/miconda" target="_blank">http://linkedin.com/in/miconda</a> -- <a href="http://twitter.com/miconda" target="_blank">http://twitter.com/miconda</a>
  </div>

</blockquote>
</div>
<br>
</div>
Daniel-Constantin Mierla | 1 Jun 2011 16:18
Picon

Re: [SR-Users] IMC module unresolved issues

Hello,

On 6/1/11 3:33 PM, Ozren Lapcevic wrote:
Hi Daniel,

thanks for quick response and clarification, it helped a lot.

I was indeed expecting records in database at runtime, but until your latest updates to imc module, the module didn't write to database even at shutdown. Now, I can see records in the database when I shutdown Kamailio. When I start up Kamailio it populates cache based on records from database and deletes records in the database.
great, thanks for reporting back it's working.

Any issues still going on with the module?

Best regards,
Daniel


Best regards,
Ozren


On Wed, Jun 1, 2011 at 12:41 PM, Daniel-Constantin Mierla <miconda-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
Hello,

the module is writing to database only at shutdown, otherwise it keeps everything in cache -- just in case you expected to see some records in database at runtime. However, I think there was an issue that even at shutdown the module didn't write back to database. Please fetch the latest git branch 3.1 and try again for this purpose.

Thanks,
Daniel

On 6/1/11 10:48 AM, Ozren Lapcevic wrote:
Hi,

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?

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'm using write to the database without a problem.

Best regards
Ozren


On Mon, May 30, 2011 at 6:28 PM, Ozren Lapcevic <ozren.lapcevic-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
Hi all,

I'm trying to configure IMC module and get it to work properly but I've run into problems with saving IMC module data to mysql database.

I'm using following code provided in IMC module documentation:
 
modparam("imc", "db_url", DBURL)

## route block ###
        if(is_method("MESSAGE") && (uri=~ "sip:chat-[0-9]+ <at> ") || (uri=~ "sip:chat-manager <at> ")) {
                xlog("L_INFO", "going to imc: F [$fu] T [$tu] B [$rb]\n");

                if(imc_manager())
                        sl_send_reply("200", "ok - imc_manager()");
                else
                        sl_send_reply("500", "command error");
        exit;
        }

I am creating chat room with following message sent to chat-manager-mMtOvdfhfA4@public.gmane.org: "#create chat-111"

DEBUG log returns following:
May 30 18:01:23 ser-test /usr/local/kamailio-ozren/sbin/kamailio[13225]: INFO: <script>: going to imc: F [sip:oz-mMtOvdfhfA4@public.gmane.org] T [sip:chat-manager-mMtOvdfhfA4@public.gmane.org] B [#create chat-111]
May 30 18:01:23 ser-test /usr/local/kamailio-ozren/sbin/kamailio[13225]: DEBUG: imc [imc.c:525]: found command
May 30 18:01:23 ser-test /usr/local/kamailio-ozren/sbin/kamailio[13225]: DEBUG: imc [imc_cmd.c:146]: command: [create]
May 30 18:01:23 ser-test /usr/local/kamailio-ozren/sbin/kamailio[13225]: DEBUG: imc [imc_cmd.c:151]: parameter 0=[chat-111]
May 30 18:01:23 ser-test /usr/local/kamailio-ozren/sbin/kamailio[13225]: DEBUG: imc [imc_cmd.c:171]: new room [chat-111]
May 30 18:01:23 ser-test /usr/local/kamailio-ozren/sbin/kamailio[13225]: DEBUG: imc [imc_cmd.c:186]: added room uri= sip:chat-111-mMtOvdfhfA4@public.gmane.org
May 30 18:01:23 ser-test /usr/local/kamailio-ozren/sbin/kamailio[13225]: DEBUG: imc [imc_mng.c:322]: [uri]= sip:oz-mMtOvdfhfA4@public.gmane.org
May 30 18:01:23 ser-test /usr/local/kamailio-ozren/sbin/kamailio[13225]: DEBUG: imc [imc_mng.c:326]: [user]= oz
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 [sip:oz-mMtOvdfhfA4@public.gmane.org]

"./kamctl fifo imc_list_rooms" returns following:
ROOM::  URI=sip:chat-111-mMtOvdfhfA4@public.gmane.org MEMBERS=0 OWNER=sip:oz-mMtOvdfhfA4@public.gmane.org

"./kamctl fifo imc_list_members sip:chat-111-mMtOvdfhfA4@public.gmane.org" returns following:
ROOM:: sip:chat-111-mMtOvdfhfA4@public.gmane.org NR_OF_MEMBERS=1
        MEMBER:: sip:oz-mMtOvdfhfA4@public.gmane.org

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?

Any help is greatly appreciated.

Best regards,
Ozren Lapcevic

PS
I'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've also checked imc-create.sql script and tables are correctly created.

The same DBURL used for imc is also used for auth_db, domain and usrloc modules and I haven't experienced any problems with those modules and database connection/persistence. domain, location, version and subscriber tables are correctly populated.

I'm not getting any errors from imc_manager(), it returns 200 OK. I can't trace any errors in DEBUG related to problems with mysql database.



_______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users-cR8azDVoa3IcDhw6gZKtMWD2FQJk+8+b@public.gmane.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

-- Daniel-Constantin Mierla -- http://www.asipto.com http://linkedin.com/in/miconda -- http://twitter.com/miconda



_______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users-cR8azDVoa3IcDhw6gZKtMWD2FQJk+8+b@public.gmane.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

-- Daniel-Constantin Mierla http://www.asipto.com
<div>
    Hello,<br><br>
    On 6/1/11 3:33 PM, Ozren Lapcevic wrote:
    <blockquote cite="mid:BANLkTikmtRezEkXE+wAz1oYxSV=FXGR65w@..." type="cite">Hi Daniel,<br><br>
      thanks for quick response and clarification, it helped a lot. <br><br>
      I was indeed expecting records in database at runtime, but until
      your latest updates to imc module, the module didn't write to
      database even at shutdown. Now, I can see records in the database
      when I shutdown Kamailio. When I start up Kamailio it populates
      cache based on records from database and deletes records in the
      database.<br>
</blockquote>
    great, thanks for reporting back it's working.<br><br>
    Any issues still going on with the module?<br><br>
    Best regards,<br>
    Daniel<br><br><blockquote cite="mid:BANLkTikmtRezEkXE+wAz1oYxSV=FXGR65w@..." type="cite">
      <br>
      Best regards,<br>
      Ozren<br><br><br><div class="gmail_quote">On Wed, Jun 1, 2011 at 12:41 PM,
        Daniel-Constantin Mierla <span dir="ltr">&lt;<a moz-do-not-send="true" href="mailto:miconda@...">miconda@...</a>&gt;</span>
        wrote:<br><blockquote class="gmail_quote">
          <div bgcolor="#FFFFFF" text="#000000"> Hello,<br><br>
            the module is writing to database only at shutdown,
            otherwise it keeps everything in cache -- just in case you
            expected to see some records in database at runtime.
            However, I think there was an issue that even at shutdown
            the module didn't write back to database. Please fetch the
            latest git branch 3.1 and try again for this purpose.<br><br>
            Thanks,<br>
            Daniel <br><div>
              <div class="h5"> <br>
                On 6/1/11 10:48 AM, Ozren Lapcevic wrote: </div>
            </div>
            <blockquote type="cite">
              <div>
                <div class="h5">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'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 moz-do-not-send="true" href="mailto:ozren.lapcevic@..." target="_blank">ozren.lapcevic@...</a>&gt;</span>
                    wrote:<br><blockquote class="gmail_quote"> Hi all,<br><br>
                      I'm trying to configure IMC module and get it to
                      work properly but I've run into problems with
                      saving IMC module data to mysql database.<br><br>
                      I'm using following code provided in IMC module
                      documentation:<br>
                      &nbsp;<br>
                      modparam("imc", "db_url", DBURL)<br><br>
                      ## route block ###<br>
                      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if(is_method("MESSAGE") &amp;&amp; (uri=~
                      <a moz-do-not-send="true">"sip:chat-[0-9]+ <at> "</a>)
                      || (uri=~ <a moz-do-not-send="true">"sip:chat-manager <at> "</a>))
                      {<br>
                      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xlog("L_INFO", "going to imc: F
                      [$fu] T [$tu] B [$rb]\n");<br><br>
                      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if(imc_manager())<br>
                      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sl_send_reply("200", "ok -
                      imc_manager()");<br>
                      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; else<br>
                      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sl_send_reply("500",
                      "command error");<br>
                      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; exit;<br>
                      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br><br>
                      I am creating chat room with following message
                      sent to <a moz-do-not-send="true" href="mailto:chat-manager@..." target="_blank">chat-manager@...</a>:
                      "#create chat-111"<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 moz-do-not-send="true" href="mailto:sip%3Aoz@..." target="_blank">sip:oz@...</a>]
                      T [<a moz-do-not-send="true" href="mailto:sip%3Achat-manager@..." target="_blank">sip:chat-manager@...</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 moz-do-not-send="true" href="mailto:sip%3Achat-111@..." target="_blank">sip:chat-111@...</a><br>
                      May 30 18:01:23 ser-test
                      /usr/local/kamailio-ozren/sbin/kamailio[13225]:
                      DEBUG: imc [imc_mng.c:322]: [uri]= <a moz-do-not-send="true" href="mailto:sip%3Aoz@..." target="_blank">sip:oz@...</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 moz-do-not-send="true" href="mailto:sip%3Aoz@..." target="_blank">sip:oz@...</a>]<br><br>
                      "./kamctl fifo imc_list_rooms" returns following:<br>
                      ROOM::&nbsp; URI=<a moz-do-not-send="true" href="mailto:sip%3Achat-111@..." target="_blank">sip:chat-111@...</a>
                      MEMBERS=0 OWNER=<a moz-do-not-send="true" href="mailto:sip%3Aoz@..." target="_blank">sip:oz@...</a><br><br>
                      "./kamctl fifo imc_list_members <a moz-do-not-send="true" href="mailto:sip%3Achat-111@..." target="_blank">sip:chat-111@...</a>" returns
                      following:<br>
                      ROOM:: <a moz-do-not-send="true" href="mailto:sip%3Achat-111@..." target="_blank">sip:chat-111@...</a>
                      NR_OF_MEMBERS=1<br>
                      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MEMBER:: <a moz-do-not-send="true" href="mailto:sip%3Aoz@..." target="_blank">sip:oz@...</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'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'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't
                      experienced any problems with those modules and
                      database connection/persistence. domain, location,
                      version and subscriber tables are correctly
                      populated. <br><br>
                      I'm not getting any errors from imc_manager(), it
                      returns 200 OK. I can't trace any errors in DEBUG
                      related to problems with mysql database.<br>
</blockquote>
                  </div>
                  <br><br><br>
</div>
              </div>
              _______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a moz-do-not-send="true" href="mailto:sr-users@..." target="_blank">sr-users@...</a>
<a moz-do-not-send="true" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>

            </blockquote>
            <br>-- 
Daniel-Constantin Mierla -- <a moz-do-not-send="true" href="http://www.asipto.com" target="_blank">http://www.asipto.com</a>
<a moz-do-not-send="true" href="http://linkedin.com/in/miconda" target="_blank">http://linkedin.com/in/miconda</a> -- <a moz-do-not-send="true" href="http://twitter.com/miconda" target="_blank">http://twitter.com/miconda</a>
          </div>
        </blockquote>
      </div>
      <br><br><br>_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@...">sr-users@...</a>
<a class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>

    </blockquote>
    <br>-- 
Daniel-Constantin Mierla
<a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
  </div>
Ozren Lapcevic | 1 Jun 2011 16:25
Picon

[SR-Users] IMC module - #join to private room crashes kamailio

Hi,

there is a bug in IMC module that crashes Kamailio.

Here is the scenario: One user (pero-mMtOvdfhfA4@public.gmane.org) creates private chat room (chat-999 <at> abc.hr). Other user (oz-mMtOvdfhfA4@public.gmane.org) tries to join the chat-999-mMtOvdfhfA4@public.gmane.org by sending #join. Kamailio crashes at that point. Here is the log:

Best regards,
Ozren


Jun  1 15:10:37 ser-test kernel: [5844312.456709] kamailio[20118]: segfault at 10 ip 7f28f89dae8e sp 7fffffffb750 error 4 in imc.so[7f28f89cf000+17000]
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20118]: INFO: <script>: going to imc: F [sip:oz-mMtOvdfhfA4@public.gmane.org] T [sip:chat-999-mMtOvdfhfA4@public.gmane.org] B [#join]
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20121]: DEBUG: <core> [receive.c:186]: preparing to run routing scripts...
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20118]: DEBUG: imc [imc.c:525]: found command
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20121]: DEBUG: maxfwd [mf_funcs.c:85]: value = 70
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20118]: DEBUG: imc [imc_cmd.c:146]: command: [join]
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20121]: DEBUG: <core> [parser/msg_parser.c:201]: DEBUG: get_hdr_body : content_length=223
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20118]: DEBUG: imc [imc_cmd.c:292]: found room [chat-999]
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20121]: DEBUG: <core> [parser/msg_parser.c:103]: found end of header
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20118]: ERROR: imc [imc_cmd.c:317]: attept to join private room [chat-999] from user [oz]
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20121]: DEBUG: <core> [parser/parse_to.c:174]: DEBUG: add_param: tag=5e3288a6
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20113]: ALERT: <core> [main.c:741]: child process 20118 exited by a signal 11
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20121]: DEBUG: <core> [parser/parse_to.c:803]: end of header reached, state=29
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20119]: DEBUG: <core> [parser/msg_parser.c:630]: SIP Request:
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20113]: ALERT: <core> [main.c:744]: core was not generated
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20121]: DEBUG: <core> [msg_translator.c:204]: check_via_address(161.53.255.82, 161.53.255.82, 0)
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20119]: DEBUG: <core> [parser/msg_parser.c:632]:  method:  <MESSAGE>
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20113]: INFO: <core> [main.c:756]: INFO: terminating due to SIGCHLD
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20114]: INFO: <core> [main.c:807]: INFO: signal 15 received
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20115]: INFO: <core> [main.c:807]: INFO: signal 15 received
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20116]: INFO: <core> [main.c:807]: INFO: signal 15 received
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20117]: INFO: <core> [main.c:807]: INFO: signal 15 received
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20122]: INFO: <core> [main.c:807]: INFO: signal 15 received
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20124]: INFO: <core> [main.c:807]: INFO: signal 15 received
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20125]: INFO: <core> [main.c:807]: INFO: signal 15 received
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20129]: INFO: <core> [main.c:807]: INFO: signal 15 received
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20128]: INFO: <core> [main.c:807]: INFO: signal 15 received
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20127]: INFO: <core> [main.c:807]: INFO: signal 15 received
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20123]: INFO: <core> [main.c:807]: INFO: signal 15 received
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20126]: INFO: <core> [main.c:807]: INFO: signal 15 received
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20120]: INFO: <core> [main.c:807]: INFO: signal 15 received
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20130]: INFO: <core> [main.c:807]: INFO: signal 15 received
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20131]: INFO: <core> [main.c:807]: INFO: signal 15 received
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20113]: DEBUG: imc [imc.c:709]: room 3 chat-777
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20113]: DEBUG: imc [imc.c:709]: room 11 chat-888
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20113]: DEBUG: imc [imc.c:709]: room 13 chat-999



<div><p>Hi,<br><br>there is a bug in IMC module that crashes Kamailio.<br><br>Here is the scenario: One user (<a href="mailto:pero@...">pero@...</a>) creates private chat room (<a href="mailto:chat-999@...">chat-999 <at> abc.hr</a>). Other user (<a href="mailto:oz@...">oz@...</a>) tries to join the <a href="mailto:chat-999@...">chat-999@...</a> by sending #join. Kamailio crashes at that point. Here is the log:<br><br>Best regards,<br>
Ozren<br><br><br>Jun&nbsp; 1 15:10:37 ser-test kernel: [5844312.456709] kamailio[20118]: segfault at 10 ip 7f28f89dae8e sp 7fffffffb750 error 4 in imc.so[7f28f89cf000+17000]<br>Jun&nbsp; 1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20118]: INFO: &lt;script&gt;: going to imc: F [<a href="mailto:sip%3Aoz@...">sip:oz@...</a>] T [<a href="mailto:sip%3Achat-999@...">sip:chat-999@...</a>] B [#join]<br>
Jun&nbsp; 1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20121]: DEBUG: &lt;core&gt; [receive.c:186]: preparing to run routing scripts...<br>Jun&nbsp; 1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20118]: DEBUG: imc [imc.c:525]: found command<br>
Jun&nbsp; 1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20121]: DEBUG: maxfwd [mf_funcs.c:85]: value = 70<br>Jun&nbsp; 1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20118]: DEBUG: imc [imc_cmd.c:146]: command: [join]<br>
Jun&nbsp; 1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20121]: DEBUG: &lt;core&gt; [parser/msg_parser.c:201]: DEBUG: get_hdr_body : content_length=223<br>Jun&nbsp; 1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20118]: DEBUG: imc [imc_cmd.c:292]: found room [chat-999]<br>
Jun&nbsp; 1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20121]: DEBUG: &lt;core&gt; [parser/msg_parser.c:103]: found end of header<br>Jun&nbsp; 1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20118]: ERROR: imc [imc_cmd.c:317]: attept to join private room [chat-999] from user [oz]<br>
Jun&nbsp; 1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20121]: DEBUG: &lt;core&gt; [parser/parse_to.c:174]: DEBUG: add_param: tag=5e3288a6<br>Jun&nbsp; 1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20113]: ALERT: &lt;core&gt; [main.c:741]: child process 20118 exited by a signal 11<br>
Jun&nbsp; 1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20121]: DEBUG: &lt;core&gt; [parser/parse_to.c:803]: end of header reached, state=29<br>Jun&nbsp; 1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20119]: DEBUG: &lt;core&gt; [parser/msg_parser.c:630]: SIP Request:<br>
Jun&nbsp; 1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20113]: ALERT: &lt;core&gt; [main.c:744]: core was not generated<br>Jun&nbsp; 1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20121]: DEBUG: &lt;core&gt; [msg_translator.c:204]: check_via_address(161.53.255.82, 161.53.255.82, 0)<br>
Jun&nbsp; 1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20119]: DEBUG: &lt;core&gt; [parser/msg_parser.c:632]:&nbsp; method:&nbsp; &lt;MESSAGE&gt;<br>Jun&nbsp; 1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20113]: INFO: &lt;core&gt; [main.c:756]: INFO: terminating due to SIGCHLD<br>
Jun&nbsp; 1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20114]: INFO: &lt;core&gt; [main.c:807]: INFO: signal 15 received<br>Jun&nbsp; 1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20115]: INFO: &lt;core&gt; [main.c:807]: INFO: signal 15 received<br>
Jun&nbsp; 1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20116]: INFO: &lt;core&gt; [main.c:807]: INFO: signal 15 received<br>Jun&nbsp; 1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20117]: INFO: &lt;core&gt; [main.c:807]: INFO: signal 15 received<br>
Jun&nbsp; 1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20122]: INFO: &lt;core&gt; [main.c:807]: INFO: signal 15 received<br>Jun&nbsp; 1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20124]: INFO: &lt;core&gt; [main.c:807]: INFO: signal 15 received<br>
Jun&nbsp; 1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20125]: INFO: &lt;core&gt; [main.c:807]: INFO: signal 15 received<br>Jun&nbsp; 1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20129]: INFO: &lt;core&gt; [main.c:807]: INFO: signal 15 received<br>
Jun&nbsp; 1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20128]: INFO: &lt;core&gt; [main.c:807]: INFO: signal 15 received<br>Jun&nbsp; 1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20127]: INFO: &lt;core&gt; [main.c:807]: INFO: signal 15 received<br>
Jun&nbsp; 1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20123]: INFO: &lt;core&gt; [main.c:807]: INFO: signal 15 received<br>Jun&nbsp; 1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20126]: INFO: &lt;core&gt; [main.c:807]: INFO: signal 15 received<br>
Jun&nbsp; 1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20120]: INFO: &lt;core&gt; [main.c:807]: INFO: signal 15 received<br>Jun&nbsp; 1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20130]: INFO: &lt;core&gt; [main.c:807]: INFO: signal 15 received<br>
Jun&nbsp; 1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20131]: INFO: &lt;core&gt; [main.c:807]: INFO: signal 15 received<br>Jun&nbsp; 1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20113]: DEBUG: imc [imc.c:709]: room 3 chat-777<br>
Jun&nbsp; 1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20113]: DEBUG: imc [imc.c:709]: room 11 chat-888<br>Jun&nbsp; 1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20113]: DEBUG: imc [imc.c:709]: room 13 chat-999<br><br><br><br></p></div>
Daniel-Constantin Mierla | 1 Jun 2011 16:29
Picon

Re: [SR-Users] IMC module - #join to private room crashes kamailio

Hello,

can you get the core dump and send the backtrace?

Be sure you have 'ulimit -c unlimited', working directory (-w option) set to writable path and you don't run it in chowner (no -u or -g parameters).

Cheers,
Daniel

On 6/1/11 4:25 PM, Ozren Lapcevic wrote:
Hi,

there is a bug in IMC module that crashes Kamailio.

Here is the scenario: One user (pero-mMtOvdfhfA4@public.gmane.org) creates private chat room (chat-999-mMtOvdfhfA4@public.gmane.org). Other user (oz-mMtOvdfhfA4@public.gmane.org) tries to join the chat-999-mMtOvdfhfA4@public.gmane.org by sending #join. Kamailio crashes at that point. Here is the log:

Best regards,
Ozren


Jun  1 15:10:37 ser-test kernel: [5844312.456709] kamailio[20118]: segfault at 10 ip 7f28f89dae8e sp 7fffffffb750 error 4 in imc.so[7f28f89cf000+17000]
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20118]: INFO: <script>: going to imc: F [sip:oz-mMtOvdfhfA4@public.gmane.org] T [sip:chat-999-mMtOvdfhfA4@public.gmane.org] B [#join]
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20121]: DEBUG: <core> [receive.c:186]: preparing to run routing scripts...
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20118]: DEBUG: imc [imc.c:525]: found command
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20121]: DEBUG: maxfwd [mf_funcs.c:85]: value = 70
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20118]: DEBUG: imc [imc_cmd.c:146]: command: [join]
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20121]: DEBUG: <core> [parser/msg_parser.c:201]: DEBUG: get_hdr_body : content_length=223
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20118]: DEBUG: imc [imc_cmd.c:292]: found room [chat-999]
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20121]: DEBUG: <core> [parser/msg_parser.c:103]: found end of header
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20118]: ERROR: imc [imc_cmd.c:317]: attept to join private room [chat-999] from user [oz]
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20121]: DEBUG: <core> [parser/parse_to.c:174]: DEBUG: add_param: tag=5e3288a6
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20113]: ALERT: <core> [main.c:741]: child process 20118 exited by a signal 11
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20121]: DEBUG: <core> [parser/parse_to.c:803]: end of header reached, state=29
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20119]: DEBUG: <core> [parser/msg_parser.c:630]: SIP Request:
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20113]: ALERT: <core> [main.c:744]: core was not generated
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20121]: DEBUG: <core> [msg_translator.c:204]: check_via_address(161.53.255.82, 161.53.255.82, 0)
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20119]: DEBUG: <core> [parser/msg_parser.c:632]:  method:  <MESSAGE>
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20113]: INFO: <core> [main.c:756]: INFO: terminating due to SIGCHLD
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20114]: INFO: <core> [main.c:807]: INFO: signal 15 received
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20115]: INFO: <core> [main.c:807]: INFO: signal 15 received
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20116]: INFO: <core> [main.c:807]: INFO: signal 15 received
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20117]: INFO: <core> [main.c:807]: INFO: signal 15 received
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20122]: INFO: <core> [main.c:807]: INFO: signal 15 received
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20124]: INFO: <core> [main.c:807]: INFO: signal 15 received
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20125]: INFO: <core> [main.c:807]: INFO: signal 15 received
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20129]: INFO: <core> [main.c:807]: INFO: signal 15 received
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20128]: INFO: <core> [main.c:807]: INFO: signal 15 received
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20127]: INFO: <core> [main.c:807]: INFO: signal 15 received
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20123]: INFO: <core> [main.c:807]: INFO: signal 15 received
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20126]: INFO: <core> [main.c:807]: INFO: signal 15 received
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20120]: INFO: <core> [main.c:807]: INFO: signal 15 received
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20130]: INFO: <core> [main.c:807]: INFO: signal 15 received
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20131]: INFO: <core> [main.c:807]: INFO: signal 15 received
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20113]: DEBUG: imc [imc.c:709]: room 3 chat-777
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20113]: DEBUG: imc [imc.c:709]: room 11 chat-888
Jun  1 15:10:37 ser-test /usr/local/kamailio-ozren/sbin/kamailio[20113]: DEBUG: imc [imc.c:709]: room 13 chat-999





_______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users-cR8azDVoa3IcDhw6gZKtMWD2FQJk+8+b@public.gmane.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

-- Daniel-Constantin Mierla -- http://www.asipto.com http://linkedin.com/in/miconda -- http://twitter.com/miconda
<div>
    Hello,<br><br>
    can you get the core dump and send the backtrace?<br><br>
    Be sure you have 'ulimit -c unlimited', working directory (-w
    option) set to writable path and you don't run it in chowner (no -u
    or -g parameters).<br><br>
    Cheers,<br>
    Daniel <br><br>
    On 6/1/11 4:25 PM, Ozren Lapcevic wrote:
    <blockquote cite="mid:BANLkTinHnpQ078hCmV1A3L4UqhtUJVuSSw@..." type="cite">Hi,<br><br>
      there is a bug in IMC module that crashes Kamailio.<br><br>
      Here is the scenario: One user (<a moz-do-not-send="true" href="mailto:pero@...">pero@...</a>) creates private chat
      room (<a moz-do-not-send="true" href="mailto:chat-999@...">chat-999@...</a>).
      Other user (<a moz-do-not-send="true" href="mailto:oz@...">oz@...</a>)
      tries to join the <a moz-do-not-send="true" href="mailto:chat-999@...">chat-999@...</a> by sending
      #join. Kamailio crashes at that point. Here is the log:<br><br>
      Best regards,<br>
      Ozren<br><br><br>
      Jun&nbsp; 1 15:10:37 ser-test kernel: [5844312.456709] kamailio[20118]:
      segfault at 10 ip 7f28f89dae8e sp 7fffffffb750 error 4 in
      imc.so[7f28f89cf000+17000]<br>
      Jun&nbsp; 1 15:10:37 ser-test
      /usr/local/kamailio-ozren/sbin/kamailio[20118]: INFO:
      &lt;script&gt;: going to imc: F [<a moz-do-not-send="true" href="mailto:sip%3Aoz@...">sip:oz@...</a>] T [<a moz-do-not-send="true" href="mailto:sip%3Achat-999@...">sip:chat-999@...</a>]
      B [#join]<br>
      Jun&nbsp; 1 15:10:37 ser-test
      /usr/local/kamailio-ozren/sbin/kamailio[20121]: DEBUG:
      &lt;core&gt; [receive.c:186]: preparing to run routing scripts...<br>
      Jun&nbsp; 1 15:10:37 ser-test
      /usr/local/kamailio-ozren/sbin/kamailio[20118]: DEBUG: imc
      [imc.c:525]: found command<br>
      Jun&nbsp; 1 15:10:37 ser-test
      /usr/local/kamailio-ozren/sbin/kamailio[20121]: DEBUG: maxfwd
      [mf_funcs.c:85]: value = 70<br>
      Jun&nbsp; 1 15:10:37 ser-test
      /usr/local/kamailio-ozren/sbin/kamailio[20118]: DEBUG: imc
      [imc_cmd.c:146]: command: [join]<br>
      Jun&nbsp; 1 15:10:37 ser-test
      /usr/local/kamailio-ozren/sbin/kamailio[20121]: DEBUG:
      &lt;core&gt; [parser/msg_parser.c:201]: DEBUG: get_hdr_body :
      content_length=223<br>
      Jun&nbsp; 1 15:10:37 ser-test
      /usr/local/kamailio-ozren/sbin/kamailio[20118]: DEBUG: imc
      [imc_cmd.c:292]: found room [chat-999]<br>
      Jun&nbsp; 1 15:10:37 ser-test
      /usr/local/kamailio-ozren/sbin/kamailio[20121]: DEBUG:
      &lt;core&gt; [parser/msg_parser.c:103]: found end of header<br>
      Jun&nbsp; 1 15:10:37 ser-test
      /usr/local/kamailio-ozren/sbin/kamailio[20118]: ERROR: imc
      [imc_cmd.c:317]: attept to join private room [chat-999] from user
      [oz]<br>
      Jun&nbsp; 1 15:10:37 ser-test
      /usr/local/kamailio-ozren/sbin/kamailio[20121]: DEBUG:
      &lt;core&gt; [parser/parse_to.c:174]: DEBUG: add_param:
      tag=5e3288a6<br>
      Jun&nbsp; 1 15:10:37 ser-test
      /usr/local/kamailio-ozren/sbin/kamailio[20113]: ALERT:
      &lt;core&gt; [main.c:741]: child process 20118 exited by a signal
      11<br>
      Jun&nbsp; 1 15:10:37 ser-test
      /usr/local/kamailio-ozren/sbin/kamailio[20121]: DEBUG:
      &lt;core&gt; [parser/parse_to.c:803]: end of header reached,
      state=29<br>
      Jun&nbsp; 1 15:10:37 ser-test
      /usr/local/kamailio-ozren/sbin/kamailio[20119]: DEBUG:
      &lt;core&gt; [parser/msg_parser.c:630]: SIP Request:<br>
      Jun&nbsp; 1 15:10:37 ser-test
      /usr/local/kamailio-ozren/sbin/kamailio[20113]: ALERT:
      &lt;core&gt; [main.c:744]: core was not generated<br>
      Jun&nbsp; 1 15:10:37 ser-test
      /usr/local/kamailio-ozren/sbin/kamailio[20121]: DEBUG:
      &lt;core&gt; [msg_translator.c:204]:
      check_via_address(161.53.255.82, 161.53.255.82, 0)<br>
      Jun&nbsp; 1 15:10:37 ser-test
      /usr/local/kamailio-ozren/sbin/kamailio[20119]: DEBUG:
      &lt;core&gt; [parser/msg_parser.c:632]:&nbsp; method:&nbsp; &lt;MESSAGE&gt;<br>
      Jun&nbsp; 1 15:10:37 ser-test
      /usr/local/kamailio-ozren/sbin/kamailio[20113]: INFO: &lt;core&gt;
      [main.c:756]: INFO: terminating due to SIGCHLD<br>
      Jun&nbsp; 1 15:10:37 ser-test
      /usr/local/kamailio-ozren/sbin/kamailio[20114]: INFO: &lt;core&gt;
      [main.c:807]: INFO: signal 15 received<br>
      Jun&nbsp; 1 15:10:37 ser-test
      /usr/local/kamailio-ozren/sbin/kamailio[20115]: INFO: &lt;core&gt;
      [main.c:807]: INFO: signal 15 received<br>
      Jun&nbsp; 1 15:10:37 ser-test
      /usr/local/kamailio-ozren/sbin/kamailio[20116]: INFO: &lt;core&gt;
      [main.c:807]: INFO: signal 15 received<br>
      Jun&nbsp; 1 15:10:37 ser-test
      /usr/local/kamailio-ozren/sbin/kamailio[20117]: INFO: &lt;core&gt;
      [main.c:807]: INFO: signal 15 received<br>
      Jun&nbsp; 1 15:10:37 ser-test
      /usr/local/kamailio-ozren/sbin/kamailio[20122]: INFO: &lt;core&gt;
      [main.c:807]: INFO: signal 15 received<br>
      Jun&nbsp; 1 15:10:37 ser-test
      /usr/local/kamailio-ozren/sbin/kamailio[20124]: INFO: &lt;core&gt;
      [main.c:807]: INFO: signal 15 received<br>
      Jun&nbsp; 1 15:10:37 ser-test
      /usr/local/kamailio-ozren/sbin/kamailio[20125]: INFO: &lt;core&gt;
      [main.c:807]: INFO: signal 15 received<br>
      Jun&nbsp; 1 15:10:37 ser-test
      /usr/local/kamailio-ozren/sbin/kamailio[20129]: INFO: &lt;core&gt;
      [main.c:807]: INFO: signal 15 received<br>
      Jun&nbsp; 1 15:10:37 ser-test
      /usr/local/kamailio-ozren/sbin/kamailio[20128]: INFO: &lt;core&gt;
      [main.c:807]: INFO: signal 15 received<br>
      Jun&nbsp; 1 15:10:37 ser-test
      /usr/local/kamailio-ozren/sbin/kamailio[20127]: INFO: &lt;core&gt;
      [main.c:807]: INFO: signal 15 received<br>
      Jun&nbsp; 1 15:10:37 ser-test
      /usr/local/kamailio-ozren/sbin/kamailio[20123]: INFO: &lt;core&gt;
      [main.c:807]: INFO: signal 15 received<br>
      Jun&nbsp; 1 15:10:37 ser-test
      /usr/local/kamailio-ozren/sbin/kamailio[20126]: INFO: &lt;core&gt;
      [main.c:807]: INFO: signal 15 received<br>
      Jun&nbsp; 1 15:10:37 ser-test
      /usr/local/kamailio-ozren/sbin/kamailio[20120]: INFO: &lt;core&gt;
      [main.c:807]: INFO: signal 15 received<br>
      Jun&nbsp; 1 15:10:37 ser-test
      /usr/local/kamailio-ozren/sbin/kamailio[20130]: INFO: &lt;core&gt;
      [main.c:807]: INFO: signal 15 received<br>
      Jun&nbsp; 1 15:10:37 ser-test
      /usr/local/kamailio-ozren/sbin/kamailio[20131]: INFO: &lt;core&gt;
      [main.c:807]: INFO: signal 15 received<br>
      Jun&nbsp; 1 15:10:37 ser-test
      /usr/local/kamailio-ozren/sbin/kamailio[20113]: DEBUG: imc
      [imc.c:709]: room 3 chat-777<br>
      Jun&nbsp; 1 15:10:37 ser-test
      /usr/local/kamailio-ozren/sbin/kamailio[20113]: DEBUG: imc
      [imc.c:709]: room 11 chat-888<br>
      Jun&nbsp; 1 15:10:37 ser-test
      /usr/local/kamailio-ozren/sbin/kamailio[20113]: DEBUG: imc
      [imc.c:709]: room 13 chat-999<br><br><br><br><br><br>_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@...">sr-users@...</a>
<a class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>

    </blockquote>
    <br>-- 
Daniel-Constantin Mierla -- <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
<a class="moz-txt-link-freetext" href="http://linkedin.com/in/miconda">http://linkedin.com/in/miconda</a> -- <a class="moz-txt-link-freetext" href="http://twitter.com/miconda">http://twitter.com/miconda</a>
  </div>
Henning Westerholt | 1 Jun 2011 16:37
Picon
Favicon

Re: [SR-Users] Kamailio Tables with index

On Wednesday 01 June 2011, Klaus Darilion wrote:
> With Openser 1.2 all the tables got an auto-increment-index column. Is
> this index column just for layout/performance purposes or is it also
> used somewhere insides the Kamailio code?
> 
> If not (what I expect), then Kamailio 3.1 should still work with tables
> without those columns - correct?

Hi Klaus,

i think your assumption is correct, as they are some DB modules that don't 
have support for this auto_increment type.

Best regards,

Henning

Bruno Bresciani | 1 Jun 2011 16:48
Picon

[SR-Users] has_tran_tmcbs function

Hi,

I can't understand the has_tran_tmcbs function... Can someone tell me how it works?


Regards,


<div><p>Hi,<br><br>I can't understand the has_tran_tmcbs function... Can someone tell me how it works?<br><br><br>Regards,<br><br><br></p></div>
Timo Reimann | 1 Jun 2011 17:12
Picon
Favicon

Re: [SR-Users] has_tran_tmcbs function

Hey Bruno,

On 01.06.2011 16:48, Bruno Bresciani wrote:
> I can't understand the has_tran_tmcbs function... Can someone tell me
> how it works?

The function checks if, for a given transaction T and a bitfield of
callbacks, any of the callbacks are registered for T.

It does so my logically ANDing the transaction bitfield (which
represents the set of registered callbacks) with the bitfield of
callbacks you would like to be checked. For each callback actually
registered, the corresponding pair of bits will yield one w.r.t. to the
AND operation. Therefore, if at least one of the given callbacks is
registered, the entire AND operation will result in a value greater
zero, thereby indicating that the transaction does have at least one of
the given callbacks registered.

For instance, if the bitfield of registered callbacks for T is 1011, and
it is to be checked whether the callback bitfield 0110 matches, the
outcome of 1011 & 0110 = 0010 > 0, meaning that at least one of the
given callbacks is registered (which, in this example, happens to be the
second transaction callback defined in t_hooks.h).

HTH,

--Timo


Gmane