[Serusers] Re: pa module: presence "substatus"

Vaclav Kubart vaclav.kubart at iptel.org
Wed Oct 25 07:48:41 CEST 2006


Hi,
doesn't SER send "202 Accepted" instead of "200 OK" before "pending
NOTIFY"? You can set PA module parameter "auth" to "none" as described
in presence handbook.

Registrations are written into database (table "location") only if you
set db_mode parameter of userloc module to nonzero value.

	Vaclav

On Tue, Oct 24, 2006 at 09:40:30AM +0200, Diego Do?ate wrote:
> 
>   Hi,
>   
>    At the end I have running my SER, the "presence snapshots" version...
> Thanks very much for your help. 
> 
>    I have a doubt with the presence service: when user A subscribes to the
> presence of user B (sends a SUBSCRIBE request), the SER sends the 200 Ok and
> the initial NOTIFY ("pending"). I don't know how user B can authorize the
> subscription (SER sends nothing to user B), or if it is possible not to
> require authorization, that is, that SER sends automatically the 2nd NOTIFY
> (status, not "pending")?
>  
>    Related to that, when a user is registered, where can I find/delete the
> registration? "Location" table is empty... Maybe the problem with the
> presence is related to that, since there is no "subscriber" table, where are
> created users? In fact, since I had to uninstall and re-install SER, maybe
> the users don't exists yet, is it possible? Although I can register them
> (and SER accepts PUBLISH and SUBSCRIBE requests...)
> 
>   Thanks a lot in advance
> 
> 
> 
> -----Mensaje original-----
> De: Vaclav Kubart [mailto:vaclav.kubart at iptel.org] 
> Enviado el: lunes, 23 de octubre de 2006 7:51
> Para: Diego Do?ate
> CC: serusers at iptel.org
> Asunto: Re: pa module: presence "substatus"
> 
> Hi,
> you have to set LD_LIBRARY_PATH variable before running ser (see
> "3.4 Running SER" in presence handbook):
> 
> export LD_LIBRARY_PATH=/base/ser/directory/lib/ser
> 
> /base/ser/directory/sbin/ser -f /base/ser/directory/etc/ser/ser.cfg
> 
> 	Vaclav
> 
> On Fri, Oct 20, 2006 at 07:06:54PM +0200, Diego Do?ate wrote:
> > 
> >  Hi,
> > 
> >     I have done followed these steps, but still the same errors. 
> > Should I unistall something else?
> > ...
> >  0(13168) qm_malloc(0x8113ea0, 24) returns address 0x8148710 frag. 
> > 0x81486f8
> > (size=24) on 1 -th hit
> >  0(13168) read 2739142786 from /dev/urandom
> >  0(13168) seeding PRNG with 3900519771
> >  0(13168) test random number 509866974
> >  0(13168) ERROR: load_module: could not open module
> > </usr/local//lib/ser/modules/dialog.so>: lib_ser_cds.so: cannot open
> shared
> > obj                          ect file: No such file or directory
> >  0(13168) parse error (36,13-14): failed to load module
> >  0(13168) ERROR: load_module: could not open module
> > </usr/local//lib/ser/modules/rls.so>: lib_ser_xcap.so: cannot open shared
> > objec                          t file: No such file or directory
> >  0(13168) parse error (37,13-14): failed to load module
> >  0(13168) ERROR: load_module: could not open module
> > </usr/local//lib/ser/modules/pa.so>: lib_ser_xcap.so: cannot open shared
> > object                           file: No such file or directory
> >  0(13168) parse error (38,13-14): failed to load module
> >  0(13168) ERROR: load_module: could not open module
> > </usr/local//lib/ser/modules/presence_b2b.so>: lib_ser_xcap.so: cannot
> open
> > sha                          red object file: No such file or directory
> >  0(13168) parse error (39,13-14): failed to load module
> >  0(13168) set_mod_param_regex: No module matching <rls> found
> >  0(13168) parse error (76,21-22): Can't set module parameter
> >  0(13168) set_mod_param_regex: No module matching <rls> found  0
> >   ....
> > 
> > 
> >   Diego
> > 
> > -----Mensaje original-----
> > De: Vaclav Kubart [mailto:vaclav.kubart at iptel.org] Enviado el: 
> > viernes, 20 de octubre de 2006 7:15
> > Para: Diego Do?ate
> > CC: serdev-bounces at lists.iptel.org
> > Asunto: Re: pa module: presence "substatus"
> > 
> > Hi,
> > this seems that you are compiling something else than "presence snapshot"
> > because "presence snapshot" has modified Makefiles to compile 
> > libraries automaticaly which was not done in your case.
> > 
> > Try to follow the compilation rules "3.2 Installation from CVS":
> > 
> > cd sip_router/lib
> > make -f Makefile.ser install prefix=/base/ser/directory cd ..
> > make install include_modules="dialog pa rls presence_b2b xcap mysql
> xmlrpc"
> > prefix=/base/ser/directory
> > 
> > [in your case will be prefix=/usr/local if you want to install ser 
> > there]
> > 
> > 	Vaclav
> > 
> > On Thu, Oct 19, 2006 at 07:57:55PM +0200, Diego Do?ate wrote:
> > > 
> > >  Hi,
> > > 
> > >   Thanks for the suggestion. I have download the 0.10.99 version 
> > > ("presence
> > > snapshot") but I can not make it work: after the "make install", I 
> > > go to /usr/local/etc/ser, where is the ser.cfg to run, but with ser 
> > > -f ser.cfg it gives me this errors:
> > > 
> > > ERROR: bad config file (47 errors)
> > > -bash-3.00# ser -f ser.cfg -E
> > >  0(15125) ERROR: load_module: could not open module
> > > </usr/local/lib/ser/modules/dialog.so>: lib_ser_cds.so: cannot open 
> > > shared object file: No such file or directory
> > >  0(15125) parse error (36,13-14): failed to load module
> > >  0(15125) ERROR: load_module: could not open module
> > > </usr/local/lib/ser/modules/rls.so>: lib_ser_xcap.so: cannot open 
> > > shared object file: No such file or directory
> > >  0(15125) parse error (37,13-14): failed to load module
> > >  0(15125) ERROR: load_module: could not open module
> > > </usr/local/lib/ser/modules/pa.so>: lib_ser_xcap.so: cannot open 
> > > shared object file: No such file or directory
> > >  0(15125) parse error (38,13-14): failed to load module
> > >  0(15125) ERROR: load_module: could not open module
> > > </usr/local/lib/ser/modules/presence_b2b.so>: lib_ser_xcap.so: 
> > > cannot open shared object file: No such file or directory
> > >  0(15125) parse error (39,13-14): failed to load module
> > >  0(15125) set_mod_param_regex: No module matching <rls> found
> > >  
> > > 
> > > And the last line is repeated with the 4 modules it can not find. 
> > > But the 4 of them exists in /usr/local/lib/ser/modules, where it is 
> > > looking
> > for...
> > > 
> > >   I thought the installation was going to be easy, as read in 
> > > http://ftp.iptel.org/pub/ser/presence/presence-handbook/ar01s03.html
> (3.3.
> > > Installation from presence-snapshot), but there is something I am 
> > > doing wrong.
> > > 
> > >  Any suggestion? I attach the .cfg
> > > 
> > > Thanks a lot
> > > 
> > > Diego Do?ate
> > >  
> > > 
> > > -----Mensaje original-----
> > > De: Vaclav Kubart [mailto:vaclav.kubart at iptel.org] Enviado el: 
> > > miércoles, 18 de octubre de 2006 11:22
> > > Para: Diego Do?ate
> > > CC: serdev-bounces at lists.iptel.org
> > > Asunto: Re: pa module: presence "substatus"
> > > 
> > > Hi,
> > > I'm afraid that there was not good support for presence in 0.9.6. I 
> > > recommend to use "presence snapshot".
> > > 	Vaclav
> > > 
> > > On Wed, Oct 18, 2006 at 10:37:27AM +0200, Diego Do?ate wrote:
> > > >  
> > > >   Hi,
> > > > 
> > > >     I am using the last version of the SER server (0.9.6), and 
> > > > have a problem with the presence management. I want a user (805) 
> > > > to subscribe to the presence of another user (806), but when 805 
> > > > sends a SUBSCRIBE to the SER, it responses a NOTIFY with 
> > > > "closed-offline", while both users had sent previously a successful
> REGISTER to the SER.
> > > > 
> > > >     Both users are added (serctl) to the server, and are displayed 
> > > > in "subscriber" table of the "ser" DB. Once registered, they are 
> > > > also in the "location" table. But the ser does not add "open" to 
> > > > the NOTIFY.. Any
> > > idea?
> > > > 
> > > >     Once the user 805 is successfully subscribed to the presence 
> > > > of user 806, when 806 modifies its presence (sends a PUBLISH to 
> > > > the SER, with
> > > "open"
> > > > and <note>"Away"</note> in the xml, for instance), the SER is 
> > > > suppposed to send a NOTIFY with the same xml to user 805 
> > > > (subscriber),
> > > isn't it?
> > > > 
> > > >     "pa" module is added, but in this moment I don't need 
> > > > authentication. U can see the ser.cfg file bellow:
> > > > 
> > > >  Thanks in advance
> > > > 
> > > > 
> > > > // ******************************** # # $Id: ser.cfg,v 1.25.2.1 
> > > > 2005/02/18 14:30:44 andrei Exp $ # # simple quick-start config 
> > > > script #
> > > > 
> > > > # ----------- global configuration parameters
> > > > ------------------------
> > > > 
> > > > #debug=3         # debug level (cmd line: -dddddddddd)
> > > > #fork=yes
> > > > #log_stderror=no	# (cmd line: -E)
> > > > 
> > > > /* Uncomment these lines to enter debugging mode fork=no 
> > > > log_stderror=yes */
> > > > 
> > > > check_via=no	# (cmd. line: -v)
> > > > dns=no           # (cmd. line: -r)
> > > > rev_dns=no      # (cmd. line: -R)
> > > > #port=5060
> > > > #children=4
> > > > fifo="/tmp/ser_fifo"
> > > > 
> > > > # ------------------ module loading
> > > > ----------------------------------
> > > > 
> > > > # Uncomment this if you want to use SQL database loadmodule 
> > > > "/usr/local/lib/ser/modules/mysql.so"
> > > > 
> > > > loadmodule "/usr/local/lib/ser/modules/sl.so"
> > > > loadmodule "/usr/local/lib/ser/modules/tm.so"
> > > > loadmodule "/usr/local/lib/ser/modules/rr.so"
> > > > loadmodule "/usr/local/lib/ser/modules/maxfwd.so"
> > > > loadmodule "/usr/local/lib/ser/modules/usrloc.so"
> > > > loadmodule "/usr/local/lib/ser/modules/registrar.so"
> > > > loadmodule "/usr/local/lib/ser/modules/textops.so"
> > > > 
> > > > loadmodule "/usr/local/lib/ser/modules/pa.so"
> > > > 
> > > > # Uncomment this if you want digest authentication # mysql.so must 
> > > > be loaded !
> > > > #loadmodule "/usr/local/lib/ser/modules/auth.so"
> > > > #loadmodule "/usr/local/lib/ser/modules/auth_db.so"
> > > > 
> > > > # ----------------- setting module-specific parameters
> > > > ---------------
> > > > 
> > > > # -- usrloc params --
> > > > 
> > > > #modparam("usrloc", "db_mode",   0)
> > > > 
> > > > # Uncomment this if you want to use SQL database # for persistent 
> > > > storage and comment the previous line modparam("usrloc", 
> > > > "db_mode",
> > > > 2)
> > > > modparam("pa","db_url","mysql://ser:heslo@localhost/ser")
> > > > 
> > > > # -- auth params --
> > > > # Uncomment if you are using auth module # #modparam("auth_db", 
> > > > "calculate_ha1", yes) # # If you set "calculate_ha1" parameter to 
> > > > yes (which true in this config), # uncomment also the following
> > > > parameter) # #modparam("auth_db", "password_column", "password")
> > > > 
> > > > # -- rr params --
> > > > # add value to ;lr param to make some broken UAs happy 
> > > > #modparam("rr", "enable_full_lr", 1)
> > > > 
> > > > # -------------------------  request routing logic
> > > > -------------------
> > > > 
> > > > # main routing logic
> > > > 
> > > > route{
> > > > 
> > > > 	# initial sanity checks -- messages with
> > > > 	# max_forwards==0, or excessively long requests
> > > > 	if (!mf_process_maxfwd_header("10")) {
> > > > 		sl_send_reply("483","Too Many Hops");
> > > > 		break;
> > > > 	};
> > > > 	if (msg:len >=  2048 ) {
> > > > 		sl_send_reply("513", "Message too big");
> > > > 		break;
> > > > 	};
> > > > 	
> > > > 
> > > > 	# we record-route all messages -- to make sure that
> > > > 	# subsequent messages will go through our proxy; that's
> > > > 	# particularly good if upstream and downstream entities
> > > > 	# use different transport protocol
> > > > 	if (!method=="REGISTER") record_route();	
> > > > 
> > > > 	# subsequent messages withing a dialog should take the
> > > > 	# path determined by record-routing
> > > > 	if (loose_route()) {
> > > > 		# mark routing logic in request
> > > > 		append_hf("P-hint: rr-enforced\r\n"); 
> > > > 		route(1);
> > > > 		break;
> > > > 	};
> > > > 
> > > > 	if (!uri==myself) {
> > > > 		# mark routing logic in request
> > > > 		append_hf("P-hint: outbound\r\n"); 
> > > > 		route(1);
> > > > 		break;
> > > > 	};
> > > > 
> > > > 	# if the request is for other domain use UsrLoc
> > > > 	# (in case, it does not work, use the following command
> > > > 	# with proper names and addresses in it)
> > > > 	if (uri==myself) {
> > > > 
> > > > 		if (method=="PUBLISH"){
> > > > 			if(t_newtran()){
> > > > 				handle_publish("registrar");
> > > > 				break;
> > > > 			}
> > > > 		}
> > > >                 if (method=="SUBSCRIBE") {
> > > >                         if (!t_newtran()) {
> > > >                                 log(1, "newtran error\n");
> > > >                                 sl_reply_error();
> > > >                          };
> > > >                          handle_subscription("registrar");
> > > >                          break;
> > > >                };
> > > > 
> > > > 		if (method=="REGISTER") {
> > > > 
> > > > # Uncomment this if you want to use digest authentication
> > > > #			if (!www_authorize("192.168.1.118", "subscriber")) {
> > > > #				www_challenge("192.168.1.118", "0");
> > > > #				break;
> > > > #			};
> > > > 
> > > > 			save("location");
> > > > 			break;
> > > > 		};
> > > > 
> > > > 		lookup("aliases");
> > > > 		if (!uri==myself) {
> > > > 			append_hf("P-hint: outbound alias\r\n"); 
> > > > 			route(1);
> > > > 			break;
> > > > 		};
> > > > 
> > > > 		# native SIP destinations are handled using our USRLOC DB
> > > > 		if (!lookup("location")) {
> > > > 			sl_send_reply("404", "Not Found");
> > > > 			break;
> > > > 		};
> > > > 	};
> > > > 	append_hf("P-hint: usrloc applied\r\n"); 
> > > > 	route(1);
> > > > }
> > > > 
> > > > route[1]
> > > > {
> > > > 	# send it out now; use stateful forwarding as it works reliably
> > > > 	# even for UDP2TCP
> > > > 	if (!t_relay()) {
> > > > 		sl_reply_error();
> > > > 	};
> > > > }
> > > > 
> > > > 
> > > > 
> > > >  
> > > > 
> > > > // ********************************
> > > > 
> > > > -----Mensaje original-----
> > > > De: Vaclav Kubart [mailto:vaclav.kubart at iptel.org] Enviado el: 
> > > > miércoles, 18 de octubre de 2006 6:21
> > > > Para: Diego Do?ate
> > > > CC: serusers at iptel.org
> > > > Asunto: Re: [Serdev] pa module: presence "substatus"
> > > > 
> > > > Hi,
> > > > notes are quite often used for this.
> > > > 
> > > > Can you send your config here? What SER version do you use? And if 
> > > > you try register your users via sending REGISTER messages it is 
> > > > still the
> > > same?
> > > > 
> > > > 	Vaclav
> > > > 
> > > > P.S. Send these messages to serusers too, might be that somebody 
> > > > else will have the same problem...
> > > > 
> > > > On Tue, Oct 17, 2006 at 05:18:55PM +0200, Diego Do?ate wrote:
> > > > > 
> > > > >  Hi,
> > > > > 
> > > > >    Thanks, then I will use a <note> tag for the presence 
> > > > > substatus(<note>Away<\note>, for instance).
> > > > > 
> > > > >    I have a problem with the Subscription. User A subscribes to 
> > > > > the presence of user B and receives a NOTIFY but with 
> > > > > "close/offline", and both users are previously registered 
> > > > > successfully
> > in SER.
> > > > > 
> > > > >    Both users are added with serctl, but it seems the SER does 
> > > > > not
> > > "save"
> > > > > user A registration when user B subscribes...  Where may be the 
> > > > > problem? May it be related to autherization? By now, it is
> disabled...
> > > > > 
> > > > >    Thanks in advance
> > > > > 
> > > > > 
> > > > > 
> > > > > -----Mensaje original-----
> > > > > De: Vaclav Kubart [mailto:vaclav.kubart at iptel.org] Enviado el: 
> > > > > lunes,
> > > > > 16 de octubre de 2006 18:57
> > > > > Para: Diego Do?ate
> > > > > CC: serdev at lists.iptel.org
> > > > > Asunto: Re: [Serdev] pa module: presence "substatus"
> > > > > 
> > > > > Hi,
> > > > > support for PIDF extensions (elements from non-pidf namespace) 
> > > > > is nearly finished in current CVS version, but it still needs some
> work.
> > > > > It will be done as soon as possible.
> > > > > 
> > > > > Notes should be possible in last presence snapshot without any 
> > > > > problems
> > > > > - they can be within tuple or presence elements according
> > specification.
> > > > > 
> > > > > 	Vaclav
> > > > > 
> > > > > On Mon, Oct 16, 2006 at 05:52:47PM +0200, Diego Do?ate wrote:
> > > > > > 
> > > > > >  Hi,
> > > > > > 
> > > > > >     In the SER "pa" module, I would like to use a tag like "note" 
> > > > > > or "substatus" in the pidf of the NOTIFY when a PUBLISH is 
> > > > > > received (with a presence change, to "Away", for instance), 
> > > > > > but SER only modified the <status> tag ("open"/"closed").
> > > > > > 
> > > > > >     How can I implement a more detailed presence status 
> > > > > > management in the SER?
> > > > > > 
> > > > > > Thanks in advance
> > > > > > 
> > > > > > 
> > > > > > _______________________________________________
> > > > > > Serdev mailing list
> > > > > > Serdev at lists.iptel.org
> > > > > > http://lists.iptel.org/mailman/listinfo/serdev
> > > > > 
> > > > 
> > 
> > 
> > 
> 



More information about the sr-users mailing list