[Serusers] still no help - usrloc synchronization - bug in replication?

Matt Schulte mschulte at netlogic.net
Thu Apr 7 14:21:01 CEST 2005


Your right, I must have been tired when I thought it was working. This doesn't work unless there's something that has to be done with branches additionally

	-----Original Message-----
	From: Tina [mailto:kramarv at yahoo.com] 
	Sent: Wednesday, April 06, 2005 6:55 PM
	To: Evan "Borgström
	Cc: Greger V. Teigre; Matt Schulte; serusers at lists.iptel.org
	Subject: Re: [Serusers] still no help - usrloc synchronization - bug in replication?
	
	
	Unfortunately this does not work. It sends the message to the ser2 2 times and won't send to ser4....(see below)
	 
	   if (isflagset(...)) {
	   rewritehostport("192.168.25.139:5060");
	   append_branch();
	      t_replicate("192.168.25.115","5060");
	      log(1, "replicated to 139 n 115===\n"); 
	      };
	===========192.168.25.113:5060 -> 192.168.25.103:5060
	  REGISTER sip:192.168.25.103 SIP/2.0..Via: SIP/2.0/UDP 192.168.25.113:5060;rport;b
	  ranch=z9hG4bK0D463F2A700A45A6BB50ADC7E5DFAE71..From: matuka <sip:tuka at 192.168.25.
	  103>;tag=1369320418..To: matuka <sip:tuka at 192.168.25.103>..Contact: "matuka" <sip
	  :tuka at 192.168.25.113:5060>..Call-ID: 5E3468B20AF142938FC6D5069BC203D6 at 192.168.25.
	  103..CSeq: 50582 REGISTER..Expires: 60..Max-Forwards: 70..User-Agent: X-Lite rele
	  ase 1103m..Content-Length: 0....                                                 
	#
	T 192.168.25.103:23 -> 192.168.25.113:2469 [AP]
	   4(2829) REGISTER++++fixing contact and port....Fix contact: Insert buf - sip:tuk
	  a at 192.168.25.113:5060..                                                          
	#
	U 192.168.25.103:5060 -> 192.168.25.113:5060
	  SIP/2.0 200 OK..Via: SIP/2.0/UDP 192.168.25.113:5060;rport=5060;branch=z9hG4bK0D4
	  63F2A700A45A6BB50ADC7E5DFAE71..From: matuka <sip:tuka at 192.168.25.103>;tag=1369320
	  418..To: matuka <sip:tuka at 192.168.25.103>;tag=5607c0bdebf2a92111742e4bf83280c3.c1
	  3f..Call-ID: 5E3468B20AF142938FC6D5069BC203D6 at 192.168.25.103..CSeq: 50582 REGISTE
	  R..Contact: <sip:tuka at 192.168.25.113:5060>;q=0.00;expires=60..Content-Length: 0..
	  Warning: 392 192.168.25.103:5060 "Noisy feedback tells:  pid=2829 req_src_ip=192.
	  168.25.113 req_src_port=5060 in_uri=sip:192.168.25.103 out_uri=sip:192.168.25.103
	   via_cnt==1"....                                                                 
	#
	U 192.168.25.103:5060 -> 192.168.25.115:5060
	  REGISTER sip:192.168.25.139:5060 SIP/2.0..Via: SIP/2.0/UDP 192.168.25.103;branch=
	  z9hG4bK2a77.fafffe65.0..Via: SIP/2.0/UDP 192.168.25.113:5060;rport=5060;branch=z9
	  hG4bK0D463F2A700A45A6BB50ADC7E5DFAE71..From: matuka <sip:tuka at 192.168.25.103>;tag
	  =1369320418..To: matuka <sip:tuka at 192.168.25.103>..Contact: "matuka" <sip:tuka at 19
	  2.168.25.113:5060>..Call-ID: 5E3468B20AF142938FC6D5069BC203D6 at 192.168.25.103..CSe
	  q: 50582 REGISTER..Expires: 60..Max-Forwards: 69..User-Agent: X-Lite release 1103
	  m..Content-Length: 0....                                                         
	#
	U 192.168.25.103:5060 -> 192.168.25.115:5060
	  REGISTER sip:192.168.25.139:5060 SIP/2.0..Via: SIP/2.0/UDP 192.168.25.103;branch=
	  z9hG4bK2a77.fafffe65.1..Via: SIP/2.0/UDP 192.168.25.113:5060;rport=5060;branch=z9
	  hG4bK0D463F2A700A45A6BB50ADC7E5DFAE71..From: matuka <sip:tuka at 192.168.25.103>;tag
	  =1369320418..To: matuka <sip:tuka at 192.168.25.103>..Contact: "matuka" <sip:tuka at 19
	  2.168.25.113:5060>..Call-ID: 5E3468B20AF142938FC6D5069BC203D6 at 192.168.25.103..CSe
	  q: 50582 REGISTER..Expires: 60..Max-Forwards: 69..User-Agent: X-Lite release 1103
	  m..Content-Length: 0....          
	 

	Evan Borgström <evan.borgstrom at ca.mci.com> wrote: 


		It's just the way that t_register works, if you call t_relay_to more 
		than once the same error will occur... It's quite messy, you probably 
		have to use append_branch like;
		
		save("location");
		
		rewritehostport("ser2.domain.com:5060");
		append_branch();
		rewritehostport("ser3.domain.com:5060");
		append_branch();
		t_replicate("ser4.domain.com:5060");
		
		I haven't tested this but the logic should work since the t_replicate 
		function just calls t_relay_to. Also, you'll probably want to use 
		save_noreply() on the hosts processing the replicated register messages 
		otherwise the host replicating the register will spew errors. Like I 
		said, messy.
		
		
		You could probably do it more elegantly using avpops similar to the 
		trusted ip example in the docs.
		
		-Evan
		
		Tina wrote:
		> Yep, it didn't help
		> 
		> */REGISTER++++fixing contact and port/*
		> */Fix contact: Insert buf - sip:tuka at 192.168.25.113:5060
		> 6(1305) ERROR: t_newtran: transaction already in process 0x28361068
		> /*
		> */"Greger V. Teigre" /* wrote:
		> 
		> The error means that t_newtran has been run while an
		> existing transaction is still in the workings. Have you tried
		> moving your save() to *before* the t_replicate()?
		> g-)
		> 
		> ---- Original Message ----
		> From: Tina
		> To: Matt Schulte
		> Cc: serusers at lists.iptel.org ; greger at teigre.com
		> Sent: Tuesday, April 05, 2005 05:00 PM
		> Subject: RE: [Serusers] still no help - usrloc synchronization
		> 
		> > Thanks a lot, gentelmens!
		> >
		> > I have jumped to the same conclusion. The only thing I am worried -
		> > t_replicate() creates aditional SIP traffic between sers. And I also
		> > get some strange error with each REGISTER: 
		> >
		> > 1(712) ERROR: t_newtran: transaction already in process 0x28336768
		> >
		> > Don't have any idea what I am doing wrong....
		> >
		> > Below is my ser.cfg snippet.
		> > As far as you see I am using mediaproxy package to solve NAT issues.
		> > I always force relay, cause I had nathelper problems with
		> > UAC1->ser->NAT->UAC2 configuration. 
		> > I am going to test new mediaproxy release.
		> > BRs,
		> > Tina
		> >
		> >
		> > < BR>> ============================
		> >
		> > . . .
		> > # ------------------------- request routing logic
		> -------------------
		> > # main routing logic
		> > route{
		> > #-------------------------------------------------------
		> > if (!method=="REGISTER") record_route();
		> >
		> #-------------------------------------------------------????????????????????
		> > # loose-route processing
		> > if (loose_route()) {
		> > route(8); #--go to mediaproxy processing
		> > break;
		> > };
		> > ...
		> > if (method=="REGISTER") {
		> > #------Replicate to the peers
		> >
		> > #---Ser 1
		> > if (!src_ip==192.168.25.103)
		> > t_replicate("192.168.25.103","5060");
		> > #---Ser 2
		> > if (!src_ip==192.168.25.115)
		> > t_replicate("192.168.25.115","5060");
		> >
		> > save ("location");
		> > break;
		> > };
		> > #-----------------------------------------------INVITE
		> > if (method=="INVITE") {
		> > log (1, "INVITE: Radius Accounting\n");
		> > t_on_failure("4"); #---voice mail
		> > use_media_proxy();
		> > t_on_reply("5"); #--mediaproxy
		> > };
		> > #--------------------------------------------------BYE
		> > if (method=="BYE" || method=="CANCEL") {
		> > log (1, "BYE or CANCEL: Radius Accounting\n");
		> > };
		> > #---------------------------------------------------
		> > if (!lookup("location") && !lookup("aliases")) {
		> > sl_send_reply("404", "Not Found");
		> > break;
		> > };
		> > if (!t_relay()) {
		> > sl_reply_error();
		> > };
		> > }
		> >
		> > #-------------------------------------------------------
		> > failure_route[4]{
		> > if (t_check_status("408|486")){
		> > append_hf("P-hint: Rewrited to VM");
		> > rewritehostport("192.168.25.116:5060");
		> > append_branch();
		> > t_relay();
		> > break;
		> > };
		> > }
		> > #---------------------------------------------------------
		> > onreply_route[5]{
		> > if (status =~ "(183)|2[0-9][0-9]" && !search("^Content-Length:\
		> > 0")) {
		> > if ( (!(src_ip=="SERVER1"))
		> > && (!(src_ip=="SERVER2"))
		> > && (!(src_ip=="SERVER3")) ){
		> > if ( search("c=IN IP4 192.168.*")||search("c=IN IP4
		> > 10.*")||search("c=IN IP4 172.16.*") ) {
		> > fix_contact();
		> > };
		> > };
		> > use_media_proxy();
		> > }
		> > }
		> >
		> > ===================================================
		> >
		> > Matt Schulte wrote:
		> > I'm starting to lean this direction, using t_replicate and all. I
		> > could
		> > never get usrloc (db mode) to function properly.. t_replicate is a
		> > dirty
		> > but very effective workaround.
		> >
		> > -----Original Message-----
		> > From: Greger V. Teigre [mailto:greger at teigre.com]
		> > Sent: Saturday, April 02, 2005 1:33 AM
		> > To: kramarv at yahoo.com
		> > Cc: serusers at lists.iptel.org
		> > Subject: Re: [Serusers] still no help - usrloc synchronization
		> >
		> >
		> > Have a look at this thread:
		> > http://lists.iptel.org/pipermail/serusers/2005-January/014669.html
		> > g-)
		> >
		> > Java Rockx wrote:
		> >> Tina,
		> >& gt;
		> >> I thought I saw you post the other day that you did not want to use
		> >> t_replicate(), however, this is probably your best bet to getting
		> >> this
		> >
		> >> to work, IMHO.
		> >>
		> >> Regards,
		> >> Paul
		> >>
		> >> On Apr 1, 2005 4:08 PM, Tina wrote:>>
		> >>> Hi, please help me, I'm stuck with it!!!!!
		> >>> I am trying to set up several sers with a shared MySQL database for
		> >>> location service.
		> >>>
		> >>> I set in each ser.cfg:
		> >>>
		> >>> modparam("usrloc", "db_mode", 2)
		> >>> modparam("usrloc",
		> >>> "db_url","sql://ser:heslo@192.168.25.163/ser")
		> >>>
		> >>> and the servers are not synchronized.
		> >>> The I set
		> >>> modparam("usrloc", "db_mode", 2)
		> >>>
		> >>>
		> >>> made UAC (Xlite) register to one of the servers.
		> >>> ; I see it via usrloc, but there is no record in "location" mySQL
		> >>> table....So others do not see the client and I'm unable to make
		> >>> calls....
		> >>>
		> >>>
		> >>> Please help how to work with usrloc and mySQL...
		> >>>
		> >>> Tina,
		> >>> software engineer
		> >>>
		> >>> ________________________________
		> >>> Do you Yahoo!?
		> >>> Better first dates. More second dates. Yahoo! Personals
		> >>>
		> >>>
		> >>> _______________________________________________
		> >>> Serusers mailing list
		> >>> serusers at lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
		> >>>
		> >>>
		> >>>
		> >>
		> >> _______________________________________________
		> >> Serusers mailing list
		> >> serusers at lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
		> >
		> > _______________________________________________
		> > Serusers mailing list
		> > serusers at lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
		> >
		> >
		> >
		> > Do you Yahoo!?
		> > Yahoo! Mail - Find what you need with new enhanced search. Learn
		> more.
		> 
		> __________________________________________________
		> Do You Yahoo!?
		> Tired of spam? Yahoo! Mail has the best spam protection around
		> http://mail.yahoo.com
		> 
		> 
		> ------------------------------------------------------------------------
		> 
		> _______________________________________________
		> Serusers mailing list
		> serusers at lists.iptel.org
		> http://lists.iptel.org/mailman/listinfo/serusers
		
		

	
  _____  

	Do you Yahoo!?
	Better first dates. More second dates. Yahoo! Personals <http://us.rd.yahoo.com/evt=27808/*http://personals.yahoo.com>  

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20050407/1be5d305/attachment.htm>


More information about the sr-users mailing list