[SR-Users] IMC module unresolved issues
Daniel-Constantin Mierla
miconda at gmail.com
Wed Jun 1 16:18:52 CEST 2011
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 at gmail.com <mailto:miconda at gmail.com>> 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 at gmail.com <mailto:ozren.lapcevic at gmail.com>> 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]+@")
>> || (uri=~ "sip:chat-manager@")) {
>> 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 <mailto: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 at abc.hr
>> <mailto:sip%3Aoz at abc.hr>] T [sip:chat-manager at abc.hr
>> <mailto:sip%3Achat-manager at abc.hr>] 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 at abc.hr
>> <mailto:sip%3Achat-111 at abc.hr>
>> 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 <mailto:sip%3Aoz 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 at abc.hr <mailto:sip%3Aoz at abc.hr>]
>>
>> "./kamctl fifo imc_list_rooms" returns following:
>> ROOM:: URI=sip:chat-111 at abc.hr
>> <mailto:sip%3Achat-111 at abc.hr> MEMBERS=0 OWNER=sip:oz at abc.hr
>> <mailto:sip%3Aoz at abc.hr>
>>
>> "./kamctl fifo imc_list_members sip:chat-111 at abc.hr
>> <mailto:sip%3Achat-111 at abc.hr>" returns following:
>> ROOM:: sip:chat-111 at abc.hr <mailto:sip%3Achat-111 at abc.hr>
>> NR_OF_MEMBERS=1
>> MEMBER:: sip:oz at abc.hr <mailto:sip%3Aoz at abc.hr>
>>
>> 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 <mailto: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
>
>
>
>
> _______________________________________________
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20110601/a3b90041/attachment.htm>
More information about the sr-users
mailing list