[Kamailio-Users] issues with IMC module
Rajesh
Rajesh.sreedharan at siptech.com
Tue Sep 8 06:57:59 CEST 2009
Dear Experts,
I have been trying to configure IMC for quite
some time.I would like to know the reason why am i not gettin the module
working.I understand that the command to create chatroom is #create
roomname, but iam not very sure as to where do i add the create chat
room command .Kindly take time to go through my cfg file and tel me
where do i need to add the command to create chatroom.
debug=4 # 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=5066
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.sip-router.org/pipermail/sr-users/attachments/20090908/12da0a09/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.sip-router.org/pipermail/sr-users/attachments/20090908/12da0a09/attachment.jpg>
More information about the sr-users
mailing list