[Kamailio-Users] imc related issues

Rajesh Rajesh.sreedharan at siptech.com
Mon Sep 7 13:40:18 CEST 2009


Hi,
     Iam trying to configure IMC. as i was told that this works fine, on 
a users system,I would like to know if i need to integrate it to my 
kamailio.cfg file or "can i use it all alone"..

My cfg file is as folllows.


debug=5           # debug level (cmd line: -dddddddddd)
fork=no           # don't fork
log_stderror=yes  # log to stderr (cmd line: -E)


children=0        # number of children
check_via=no      # (cmd. line: -v)
dns=off           # (cmd. line: -r)
rev_dns=off       # (cmd. line: -R)
port=5063

listen=192.168.64.75
#alias="stefan.lo"

# ------------------ module loading ----------------------------------
mpath="/usr/local//lib/kamailio/modules/"
loadmodule "db_mysql.so"

loadmodule "textops.so"

loadmodule "sl.so"   loadmodule "maxfwd.so"
loadmodule "imc.so"
loadmodule "tm.so"
loadmodule "xlog.so"
loadmodule "registrar.so"
loadmodule "usrloc.so"
loadmodule "mi_fifo.so"

# ----------------- setting module-specific parameters ---------------

# -- mi_fifo params --

modparam("mi_fifo", "fifo_name", "/tmp/openser_fifo")

# -- usrloc params --

modparam("usrloc", "db_mode", 2)

# -- registrar params --

modparam("registrar", "default_expires", 120)

# -- registrar params --

modparam("usrloc", "db_mode", 0)

# -- imc params --
modparam("imc", "imc_cmd_start_char", "#")
modparam("imc|usrloc", "db_url", 
"mysql://openser:openserrw@192.168.64.75/openser")

# -- tm params --

modparam("tm", "fr_timer", 10 )
modparam("tm", "fr_inv_timer", 15 )
modparam("tm", "wt_timer", 10 )


route{
    if ( !mf_process_maxfwd_header("10") )
    {
        sl_send_reply("483","To Many Hops");
        drop();
    };

        # registrations -
        if(is_method("REGISTER")) {
            save("location");
            exit;
        }
               #imc##if(uri=~"sip:q.*@")
           if(uri=~"sip:chatroom000 at 192.168.64.75")
        {
            # IMC - message
        ##imc##    xdbg("script: message from [$fu] r-uri [$ru] msg 
[$rb]\n");
                   xdbg("script: message from [$fu]  chatroom000 [$ru] 
msg [$rb]\n");

            if(is_method("MESSAGE"))
            {
                log("MESSAGE received -> processing with imc\n");
                sl_send_reply("200", "ok");
                imc_manager();                           exit;
            } else {
                sl_send_reply("404", "not found");
                exit;
            };
           } else {
        ##edited as below for imc    xdbg("script: message not for room, 
from [$fu] r-uri [$ru] msg [$rb]\n");
               xdbg("script: message not for room, from [$fu] 
chatroom000 [$ru] msg [$rb]\n");

            if(!lookup("location"))
            {
                sl_send_reply("404", "not found");
                exit;
            }
            t_relay();
            #sl_send_reply("200", "ok");
            exit();
        };
}

-- 
Regards,
Rajesh Sreedharan
Software Trainee-Wireless & Mobile Technology

SIPTECH Solutions Limited
G4, Elnet Software City, CPT Road,
Taramani, Chennai - 600 113, India.
Tel : +91 (44) 2254 1473/ 74
Extn.:206
Fax : +91 (44) 2254 1475
E-Mail :Rajesh.Sreedharan at Siptech.com 
<mailto:Rajesh.Sreedharan at Siptech.com?>
Website : www.siptech.com <http://www.siptech.com/>
<http://www.siptech.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/users/attachments/20090907/8bea3db0/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: siptechlogo.jpg
Type: image/jpeg
Size: 5434 bytes
Desc: not available
URL: <http://lists.kamailio.org/pipermail/users/attachments/20090907/8bea3db0/attachment.jpg>


More information about the Users mailing list