<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
Hi Anca,<br><br>Thanks for your reply.<br>I found the mistake - I didn't set presence mode to Presence Agent in my xlite.<br><br>Thanks<br><br><br>Regards,<br>JR<br><br><br><br>> Date: Wed, 14 Oct 2009 14:51:57 -0700<br>> From: anca@opensips.org<br>> To: users@lists.opensips.org<br>> Subject: Re: [OpenSIPS-Users] Presence: no record in Presentity table<br>> <br>> Hi,<br>> <br>> Are you sure the server is receiving any PUBLISH messages? What clients <br>> do you use? Do they support presence with a central agent?<br>> <br>> Regards,<br>> Anca<br>> <br>> JR RND wrote:<br>> > Hi,<br>> ><br>> > I have installed opensips-1.5.3-tls with db_mysql, presence, <br>> > presence_xml and presence_mwi modules.<br>> ><br>> > I tried to test presence with xlite and I can see that there are <br>> > records found in watchers and active_watchers table but not presentity <br>> > table.<br>> ><br>> > I think there should be something inserted into presentity table. <br>> > Isn't it?<br>> ><br>> > Any hint or help is appreciated. Thanks<br>> ><br>> ><br>> ><br>> > Here is my opensips.cfg<br>> ><br>> ><br>> ><br>> > #<br>> > # $Id: opensips.cfg 5503 2009-03-22 16:22:32Z bogdan_iancu $<br>> > #<br>> > # OpenSIPS basic configuration script<br>> > # by Anca Vamanu <anca@voice-system.ro><br>> > #<br>> > # Please refer to the Core CookBook at:<br>> > # http://www.opensips.org/index.php?n=Resources.DocsCookbooks<br>> > # for a explanation of possible statements, functions and parameters.<br>> > #<br>> ><br>> ><br>> > ####### Global Parameters #########<br>> ><br>> ><br>> > log_facility=LOG_LOCAL0<br>> ><br>> ><br>> > /* uncomment the following lines to enable debugging */<br>> > debug=3<br>> > fork=yes<br>> > log_stderror=yes<br>> ><br>> > /* uncomment the next line to disable TCP (default on) */<br>> > #disable_tcp=yes<br>> ><br>> > /* uncomment the next line to enable the auto temporary blacklisting of<br>> > not available destinations (default disabled) */<br>> > #disable_dns_blacklist=no<br>> ><br>> > /* uncomment the next line to enable IPv6 lookup after IPv4 dns<br>> > lookup failures (default disabled) */<br>> > #dns_try_ipv6=yes<br>> ><br>> > /* uncomment the next line to disable the auto discovery of local aliases<br>> > based on revers DNS on IPs (default on) */<br>> > #auto_aliases=no<br>> ><br>> > /* uncomment the following lines to enable TLS support (default off) */<br>> > #disable_tls = no<br>> > #listen = tls:your_IP:5061<br>> > #tls_verify_server = 1<br>> > #tls_verify_client = 1<br>> > #tls_require_client_certificate = 0<br>> > #tls_method = TLSv1<br>> > #tls_certificate = "/usr/local/etc/opensips/tls/user/user-cert.pem"<br>> > #tls_private_key = "/usr/local/etc/opensips/tls/user/user-privkey.pem"<br>> > #tls_ca_list = "/usr/local/etc/opensips/tls/user/user-calist.pem"<br>> ><br>> ><br>> > port=5060<br>> ><br>> > /* uncomment and configure the following line if you want opensips to<br>> > bind on a specific interface/port/proto (default bind on all <br>> > available) */<br>> > #listen=udp:192.168.1.2:5060<br>> ><br>> ><br>> > ####### Modules Section ########<br>> ><br>> > #set module path<br>> > mpath="/usr/local/lib/opensips/modules/"<br>> ><br>> > /* uncomment next line for MySQL DB support */<br>> > loadmodule "db_mysql.so"<br>> > loadmodule "signaling.so"<br>> > loadmodule "sl.so"<br>> > loadmodule "tm.so"<br>> > loadmodule "rr.so"<br>> > loadmodule "maxfwd.so"<br>> > loadmodule "usrloc.so"<br>> > loadmodule "registrar.so"<br>> > loadmodule "textops.so"<br>> > loadmodule "mi_fifo.so"<br>> > loadmodule "uri_db.so"<br>> > loadmodule "uri.so"<br>> > loadmodule "xlog.so"<br>> > loadmodule "acc.so"<br>> > /* uncomment next lines for MySQL based authentication support<br>> > NOTE: a DB (like db_mysql) module must be also loaded */<br>> > loadmodule "auth.so"<br>> > loadmodule "auth_db.so"<br>> > /* uncomment next line for aliases support<br>> > NOTE: a DB (like db_mysql) module must be also loaded */<br>> > loadmodule "alias_db.so"<br>> > /* uncomment next line for multi-domain support<br>> > NOTE: a DB (like db_mysql) module must be also loaded<br>> > NOTE: be sure and enable multi-domain support in all used modules<br>> > (see "multi-module params" section ) */<br>> > loadmodule "domain.so"<br>> > /* uncomment the next two lines for presence server support<br>> > NOTE: a DB (like db_mysql) module must be also loaded */<br>> > loadmodule "presence.so"<br>> > loadmodule "presence_xml.so"<br>> > loadmodule "presence_mwi.so"<br>> ><br>> ><br>> > # ----------------- setting module-specific parameters ---------------<br>> ><br>> ><br>> > # ----- mi_fifo params -----<br>> > modparam("mi_fifo", "fifo_name", "/tmp/opensips_fifo")<br>> ><br>> ><br>> > # ----- rr params -----<br>> > # add value to ;lr param to cope with most of the UAs<br>> > modparam("rr", "enable_full_lr", 1)<br>> > # do not append from tag to the RR (no need for this script)<br>> > modparam("rr", "append_fromtag", 0)<br>> ><br>> ><br>> > # ----- registrar params -----<br>> > modparam("registrar", "method_filtering", 1)<br>> > /* uncomment the next line to disable parallel forking via location */<br>> > modparam("registrar", "append_branches", 0)<br>> > /* uncomment the next line not to allow more than 10 contacts per AOR */<br>> > #modparam("registrar", "max_contacts", 10)<br>> ><br>> ><br>> > # ----- usrloc params -----<br>> > #modparam("usrloc", "db_mode", 0)<br>> > /* uncomment the following lines if you want to enable DB persistency<br>> > for location entries */<br>> > modparam("usrloc", "db_mode", 2)<br>> > modparam("usrloc", <br>> > "db_url","mysql://opensips:opensipsrw@localhost/opensips")<br>> ><br>> ><br>> > # ----- uri_db params -----<br>> > /* by default we disable the DB support in the module as we do not need it<br>> > in this configuration */<br>> > modparam("uri_db", "use_uri_table", 0)<br>> > modparam("uri_db", "db_url", "")<br>> ><br>> ><br>> > # ----- acc params -----<br>> > /* what sepcial events should be accounted ? */<br>> > modparam("acc", "early_media", 1)<br>> > modparam("acc", "report_ack", 1)<br>> > modparam("acc", "report_cancels", 1)<br>> > /* by default ww do not adjust the direct of the sequential requests.<br>> > if you enable this parameter, be sure the enable "append_fromtag"<br>> > in "rr" module */<br>> > modparam("acc", "detect_direction", 0)<br>> > /* account triggers (flags) */<br>> > modparam("acc", "failed_transaction_flag", 3)<br>> > modparam("acc", "log_flag", 1)<br>> > modparam("acc", "log_missed_flag", 2)<br>> > /* uncomment the following lines to enable DB accounting also */<br>> > modparam("acc", "db_flag", 1)<br>> > modparam("acc", "db_missed_flag", 2)<br>> ><br>> ><br>> > # ----- auth_db params -----<br>> > /* uncomment the following lines if you want to enable the DB based<br>> > authentication */<br>> > modparam("auth_db", "calculate_ha1", yes)<br>> > modparam("auth_db", "password_column", "password")<br>> > modparam("auth_db", <br>> > "db_url","mysql://opensips:opensipsrw@localhost/opensips")<br>> > #modparam("auth_db", "load_credentials", "")<br>> ><br>> ><br>> > # ----- alias_db params -----<br>> > /* uncomment the following lines if you want to enable the DB based<br>> > aliases */<br>> > #modparam("alias_db", "db_url",<br>> > # "mysql://opensips:opensipsrw@localhost/opensips")<br>> ><br>> ><br>> > # ----- domain params -----<br>> > /* uncomment the following lines to enable multi-domain detection<br>> > support */<br>> > #modparam("domain", "db_url",<br>> > # "mysql://opensips:opensipsrw@localhost/opensips")<br>> > #modparam("domain", "db_mode", 1) # Use caching<br>> ><br>> ><br>> > # ----- multi-module params -----<br>> > /* uncomment the following line if you want to enable multi-domain support<br>> > in the modules (dafault off) */<br>> > #modparam("alias_db|auth_db|usrloc|uri_db", "use_domain", 1)<br>> ><br>> ><br>> > # ----- presence params -----<br>> > /* uncomment the following lines if you want to enable presence */<br>> > modparam("presence|presence_xml", <br>> > "db_url","mysql://opensips:opensipsrw@localhost/opensips")<br>> > modparam("presence_xml", "force_active", 1)<br>> > modparam("presence", "server_address", "sip:localhost:5060")<br>> > modparam("presence", "max_expires", 60)<br>> > modparam("presence", "subs_htable_size", 11)<br>> > modparam("presence", "pres_htable_size", 11)<br>> > modparam("presence", "presentity_table", "presentity")<br>> > #modparam("presence", "fallback2db", 1)<br>> ><br>> ><br>> > ####### Routing Logic ########<br>> ><br>> ><br>> > # main request routing logic<br>> ><br>> > route{<br>> > log(1,"--------Start-----------\n");<br>> > <br>> > if (!mf_process_maxfwd_header("10")) {<br>> > sl_send_reply("483","Too Many Hops");<br>> > exit;<br>> > }<br>> ><br>> > if (has_totag()) {<br>> > # sequential request withing a dialog should<br>> > # take the path determined by record-routing<br>> > if (loose_route()) {<br>> > if (is_method("BYE")) {<br>> > setflag(1); # do accounting ...<br>> > setflag(3); # ... even if the transaction fails<br>> > } else if (is_method("INVITE")) {<br>> > # even if in most of the cases is useless, do RR for<br>> > # re-INVITEs alos, as some buggy clients do change <br>> > route set<br>> > # during the dialog.<br>> > record_route();<br>> > }<br>> > # route it out to whatever destination was set by <br>> > loose_route()<br>> > # in $du (destination URI).<br>> > route(1);<br>> > } else {<br>> > /* uncomment the following lines if you want to enable <br>> > presence */<br>> > if (is_method("SUBSCRIBE") && $rd == "192.168.1.241") {<br>> > # in-dialog subscribe requests<br>> > log(1,"SUBSCRIBE\n");<br>> > route(2);<br>> > exit;<br>> > }<br>> > if ( is_method("ACK") ) {<br>> > if ( t_check_trans() ) {<br>> > # non loose-route, but stateful ACK; must be an <br>> > ACK after<br>> > # a 487 or e.g. 404 from upstream server<br>> > t_relay();<br>> > exit;<br>> > } else {<br>> > # ACK without matching transaction -><br>> > # ignore and discard<br>> > exit;<br>> > }<br>> > }<br>> > sl_send_reply("404","Not here");<br>> > }<br>> > exit;<br>> > }<br>> ><br>> > #initial requests<br>> ><br>> > # CANCEL processing<br>> > if (is_method("CANCEL"))<br>> > {<br>> > if (t_check_trans())<br>> > t_relay();<br>> > exit;<br>> > }<br>> ><br>> > t_check_trans();<br>> ><br>> > # authenticate if from local subscriber (uncomment to enable auth)<br>> > # authenticate all initial non-REGISTER request that pretend to be<br>> > # generated by local subscriber (domain from FROM URI is local)<br>> > ##if (!(method=="REGISTER") && from_uri==myself) /*no multidomain <br>> > version*/<br>> > if (!(method=="REGISTER") && is_from_local()) /*multidomain version*/<br>> > {<br>> > #xlog("from_uri");<br>> > if (!proxy_authorize("", "subscriber")) {<br>> > proxy_challenge("", "0");<br>> > exit;<br>> > }<br>> > if (!check_from()) {<br>> > sl_send_reply("403","Forbidden auth ID");<br>> > exit;<br>> > }<br>> > <br>> > consume_credentials();<br>> > # caller authenticated<br>> > }<br>> ><br>> > # preloaded route checking<br>> > if (loose_route()) {<br>> > xlog("L_ERR","Attempt to route with preloaded Route's <br>> > [$fu/$tu/$ru/$ci]");<br>> > if (!is_method("ACK"))<br>> > sl_send_reply("403","Preload Route denied");<br>> > exit;<br>> > }<br>> ><br>> > # record routing<br>> > if (!is_method("REGISTER|MESSAGE"))<br>> > record_route();<br>> ><br>> > # account only INVITEs<br>> > if (is_method("INVITE")) {<br>> > setflag(1); # do accounting<br>> > }<br>> > if (!uri==myself)<br>> > ## replace with following line if multi-domain support is used<br>> > ##if (!is_uri_host_local())<br>> > {<br>> > append_hf("P-hint: outbound\r\n");<br>> > # if you have some interdomain connections via TLS<br>> > ##if($rd=="tls_domain1.net") {<br>> > ## t_relay("tls:domain1.net");<br>> > ## exit;<br>> > ##} else if($rd=="tls_domain2.net") {<br>> > ## t_relay("tls:domain2.net");<br>> > ## exit;<br>> > ##}<br>> > route(1);<br>> > }<br>> ><br>> > # requests for my domain<br>> ><br>> > ## uncomment this if you want to enable presence server<br>> > ## and comment the next 'if' block<br>> > ## NOTE: uncomment also the definition of route[2] from below<br>> > if( is_method("PUBLISH|SUBSCRIBE")){<br>> > log(1,"\nPUBLISH|SUBSCRIBE\n");<br>> > route(2);<br>> > }<br>> ><br>> > #if (is_method("PUBLISH"))<br>> > #{<br>> > # sl_send_reply("503", "Service Unavailable");<br>> > # exit;<br>> > #}<br>> > <br>> ><br>> ><br>> > if (is_method("REGISTER"))<br>> > {<br>> > # authenticate the REGISTER requests (uncomment to enable auth)<br>> > if (!www_authorize("", "subscriber"))<br>> > {<br>> > log(1,"not in subscriber table\n");<br>> > www_challenge("", "0");<br>> > exit;<br>> > }<br>> > <br>> > if (!check_to())<br>> > {<br>> > log(1,"403 Forbidden auth ID\n");<br>> > sl_send_reply("403","Forbidden auth ID");<br>> > exit;<br>> > }<br>> ><br>> > if (!save("location"))<br>> > sl_reply_error();<br>> ><br>> > exit;<br>> > }<br>> ><br>> > if ($rU==NULL) {<br>> > # request with no Username in RURI<br>> > sl_send_reply("484","Address Incomplete");<br>> > exit;<br>> > }<br>> ><br>> > # apply DB based aliases (uncomment to enable)<br>> > ##alias_db_lookup("dbaliases");<br>> ><br>> > if (!lookup("location")) {<br>> > switch ($retcode) {<br>> > case -1:<br>> > case -3:<br>> > t_newtran();<br>> > t_reply("404", "Not Found");<br>> > exit;<br>> > case -2:<br>> > sl_send_reply("405", "Method Not Allowed");<br>> > exit;<br>> > }<br>> > }<br>> ><br>> > # when routing via usrloc, log the missed calls also<br>> > setflag(2);<br>> ><br>> > route(1);<br>> > }<br>> ><br>> ><br>> > route[1] {<br>> > # for INVITEs enable some additional helper routes<br>> > if (is_method("INVITE")) {<br>> > t_on_branch("2");<br>> > t_on_reply("2");<br>> > t_on_failure("1");<br>> > }<br>> ><br>> > if (!t_relay()) {<br>> > sl_reply_error();<br>> > };<br>> > exit;<br>> > }<br>> ><br>> ><br>> > # Presence route<br>> > /* uncomment the whole following route for enabling presence<br>> > NOTE: do not forget to enable the call of this route from the main<br>> > route */<br>> > route[2]<br>> > {<br>> > if (!t_newtran())<br>> > {<br>> > sl_reply_error();<br>> > exit;<br>> > };<br>> ><br>> ><br>> > if(is_method("PUBLISH"))<br>> > {<br>> > log(1,"\n------route2 PUBLISH-----\n");<br>> > handle_publish();<br>> > #t_release(); ## obsoleted in 1.5 - no need for it. So, just <br>> > remove it.<br>> > }<br>> > else<br>> > if( is_method("SUBSCRIBE"))<br>> > {<br>> > log(1,"\n------route2 SUBSCRIBE----\n");<br>> > handle_subscribe();<br>> > #t_release(); ## obsoleted in 1.5 - no need for it. So, just <br>> > remove it.<br>> ><br>> > }<br>> ><br>> > exit;<br>> > }<br>> ><br>> ><br>> > branch_route[2] {<br>> > xlog("new branch at $ru\n");<br>> > }<br>> ><br>> ><br>> > onreply_route[2] {<br>> > xlog("incoming reply\n");<br>> > }<br>> ><br>> ><br>> > failure_route[1] {<br>> > if (t_was_cancelled()) {<br>> > exit;<br>> > }<br>> ><br>> > # uncomment the following lines if you want to block client<br>> > # redirect based on 3xx replies.<br>> > ##if (t_check_status("3[0-9][0-9]")) {<br>> > ##t_reply("404","Not found");<br>> > ## exit;<br>> > ##}<br>> ><br>> > # uncomment the following lines if you want to redirect the failed<br>> > # calls to a different new destination<br>> > ##if (t_check_status("486|408")) {<br>> > ## sethostport("192.168.2.100:5060");<br>> > ## # do not set the missed call flag again<br>> > ## t_relay();<br>> > ##}<br>> > }<br>> ><br>> > ------------------------------------------------------------------------<br>> > Windows Live: Keep your friends up to date with what you do online. <br>> > <http://www.microsoft.com/windows/windowslive/see-it-in-action/social-network-basics.aspx?ocid=PID23461::T:WLMTAGL:ON:WL:ms-my:SI_SB_1:092010> <br>> ><br>> > ------------------------------------------------------------------------<br>> ><br>> > _______________________________________________<br>> > Users mailing list<br>> > Users@lists.opensips.org<br>> > http://lists.opensips.org/cgi-bin/mailman/listinfo/users<br>> > <br>> <br>> <br>> _______________________________________________<br>> Users mailing list<br>> Users@lists.opensips.org<br>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users<br>                                            <br /><hr />Chat online and in real-time with friends and family! <a href='http://get.live.com/messenger/overview' target='_new'>Windows Live Messenger</a></body>
</html>