My ser server working is good,I want to integrated the xmpp jabber server into ser
service.and when I reading the doc about SIMPLE to XMMP(Jabber) gateway doc I find some
confure error in it,when I correct the ser configre error .it's runing.But I can not
register into ser servers .How can I resolve it ?
Thanks very much
ZhaoMin
following is my ser.cfg,jabber server is good runing.
#
# configuration for Jabber module testing
# (sample config file using the module with presence support)
#
# $ID: daniel $
#
debug=9 # debug level (cmd line: -dddddddddd)
#fork=yes # (cmd. line: -D)
fork=no
log_stderror=yes # (cmd line: -E)
#log_stderror=no # (cmd line: -E)
children=2
check_via=no # (cmd. line: -v)
dns=off # (cmd. line: -r)
rev_dns=off # (cmd. line: -R)
port=5060
listen=127.0.0.1
listen=221.202.129.165
fifo="/tmp/ser_fifo"
# for more info: sip_router -h
# ------------------ module loading ----------------------------------
#modules
loadmodule "/usr/local/lib/ser/modules/print.so"
loadmodule "/usr/local/lib/ser/modules/textops.so"
loadmodule "/usr/local/lib/ser/modules/tm.so"
loadmodule "/usr/local/lib/ser/modules/maxfwd.so"
loadmodule "/usr/local/lib/ser/modules/sl.so"
loadmodule "/usr/local/lib/ser/modules/mysql.so"
loadmodule "/usr/local/lib/ser/modules/jabber.so"
loadmodule "/usr/local/lib/ser/modules/registrar.so"
loadmodule "/usr/local/lib/ser/modules/usrloc.so"
loadmodule "/usr/local/lib/ser/modules/pa.so"
# ----------------- setting module-specific parameters ---------------
# -- registrar params --
modparam("registrar", "default_expires", 120)
modparam("registrar", "use_domain", 1)
# -- usrloc params --
modparam("usrloc", "use_domain", 1)
modparam("usrloc", "db_mode", 0)
# -- jabber params --
modparam("jabber","db_url","sql://root:zm9898@127.0.0.1/sip_jab")
modparam("jabber","jaddress","mvu.cn")
modparam("jabber","jport",5222)
modparam("jabber","workers",2)
modparam("jabber","max_jobs",10)
modparam("jabber","cache_time",200)
modparam("jabber","delay_time",60)
modparam("jabber","jdomain","mvu.cn=*")
modparam("jabber","aliases","4;aim.mvu.cn;icq.mvu.cn;msn.mvu.cn=%;yahoo.mvu.cn;")
route{
#if ( !mf_process_maxfwd_header("10") )
#{
# sl_send_reply("483","To Many Hops");
# drop();
#};
if (uri=~"[@:]sip\.mvu\.cn([;:].*)*")
{
# for testing purposes, simply okay all REGISTERs
if (method=="REGISTER")
{
if (t_newtran())
{
save("location");
log("REGISTER received -> reply okay\n");
};
if(search("registration"))
{
log("XJAB: Going ONline in Jabber network!!!\n");
if(jab_go_online())
{
sl_send_reply("200", "Accepted");
}
else
{
sl_send_reply("404","Not found");
};
}
else
{
log("XJAB: Going OFFline in Jabber network!!!\n");
if(jab_go_offline())
{
sl_send_reply("200", "Accepted");
}
else
{
sl_send_reply("404","Not found");
};
};
break;
};
if (method=="SUBSCRIBE")
{
if (t_newtran())
{
handle_subscription("registrar");
};
break;
};
if(!lookup("location"))
{
sl_send_reply("404","Not found");
break;
};
};
if ((search("To:.*@icq\.mvu\.cn"))
|| (search("To:.*@\.mvu\.cn"))
|| (search("To:.*@msn\.mvu\.cn"))
|| (search("To:.*@yahoo\.mvu\.cn")))
{
if (! t_newtran())
{
sl_reply_error();
break;
};
if (method=="MESSAGE")
{
log("MESSAGE received -> manage it with XJAB\n");
if(search("\n:on"))
{
if (jab_go_online())
{
sl_send_reply("200","Accepted");
}else{
sl_send_reply("404","Not found");
};
break;
};
if(search("\n:off"))
{
if (jab_go_offline())
{
sl_send_reply("200","Accepted");
}else{
sl_send_reply("404","Not found");
};
break;
};
if(search("\n:join"))
{
if (jab_join_jconf())
{
sl_send_reply("200","Accepted");
}else{
sl_send_reply("404","Not Found");
};
break;
};
if(search("\n:exit"))
{
if (jab_exit_jconf())
{
sl_send_reply("200","Accepted");
}else{
sl_send_reply("404","Not Found");
};
break;
};
if (jab_send_message())
{
sl_send_reply("200","Accepted");
}else{
sl_send_reply("503","Service Unavailable");
};
break;
};
if (method=="SUBSCRIBE") {
handle_subscription("jabber");
break;
};
log("NON_Message request received for JABBER gateway->dropt!\n");
sl_send_reply("202","Accepted");
break;
};
if (!t_relay())
{
sl_reply_error();
};
#forward(uri:host,uri:port);
}