[Users] How to clear the destination set for redirection?

Papadopoulos Georgios geop at altectelecoms.gr
Wed Oct 11 16:36:16 CEST 2006


I think the best thing to do is to use registered() instead of lookup().
This will significantly change my script...
If registered() returns true, is it possible that later in the script
lookup() will return false? I guess what I am asking is whether the
expiration time of the registration is checked against the timestamp of
the request or against the current time at execution.

thank you

George

 

> -----Original Message-----
> From: Klaus Darilion [mailto:klaus.mailinglists at pernau.at] 
> Sent: Wednesday, October 11, 2006 4:45 PM
> To: Papadopoulos Georgios
> Cc: users at openser.org
> Subject: Re: [Users] How to clear the destination set for redirection?
> 
> for clearing all the branches I think you can use 
> load_contacts from LCR
> 
> to detect if a client is registered use
> http://www.openser.org/docs/modules/1.1.x/registrar.html#AEN418
> 
> regards
> klaus
> 
> Papadopoulos Georgios wrote:
> > Hello Klaus,
> > 
> > I know this might not make perfect sence. If the user is registered 
> > (and if some other conditions are true that I have left out) then I 
> > want to redirect to an Asterisk server. Maybe this is not 
> the best way 
> > to implement this, however shouldn't there be some way to clear the 
> > destination set? I mean something similar to resetdsturi().
> > 
> > thank you
> > 
> > George
> > 
> >  
> > 
> >> -----Original Message-----
> >> From: Klaus Darilion [mailto:klaus.mailinglists at pernau.at]
> >> Sent: Wednesday, October 11, 2006 4:14 PM
> >> To: Papadopoulos Georgios
> >> Cc: users at openser.org
> >> Subject: Re: [Users] How to clear the destination set for 
> redirection?
> >>
> >>
> >> Hi!
> >>
> >> I do not understand why you even lookup the location if 
> the call is 
> >> getting redirected? What do you want to implement?
> >>
> >> btw: you could use load_contacts from LCR module if the 
> contacts have 
> >> different Q-value.
> >>
> >> regards
> >> klaus
> >>
> >> Papadopoulos Georgios wrote:
> >>> Hello,
> >>>
> >>> My senario is the following: userA is registered twice so
> >> after lookup
> >>> I have $ds = Contact: sip:userA at 10.0.0.1:5060,
> >> sip:userA at 10.0.0.2:5060
> >>> I want to add a prefix and redirect to 10.0.0.9, so I do 
> >>> prefix("160000"); rewritehostport("10.0.0.9:5060"); 
> >>> xlog("L_DEBUG","$ds\n"); sl_send_reply("300", "Redirect");
> >>>
> >>> and I get
> >>> $ds = Contact: sip:160000userA at 10.0.0.9:5060,
> >> sip:userA at 10.0.0.2:5060
> >>> The second uri is causing a problem, so I need to remove it
> >> before the
> >>> redirection. I tried resetdsturi() but it did not affect the 
> >>> destination set. Is there some way to keep only the first
> >> uri? Maybe
> >>> some way to clear the destination set before doing the 
> redirection?
> >>>
> >>> thank you
> >>>
> >>> George
> >>>
> >>>
> >>> Disclaimer
> >>> The information in this e-mail and any attachments is
> >> confidential. It is intended solely for the attention and 
> use of the 
> >> named addressee(s). If you are not the intended recipient, 
> or person 
> >> responsible for delivering this information to the intended 
> >> recipient, please notify the sender immediately. Unless 
> you are the 
> >> intended recipient or his/her representative you are not 
> authorized 
> >> to, and must not, read, copy, distribute, use or retain 
> this message 
> >> or any part of it. E-mail transmission cannot be guaranteed to be 
> >> secure or error-free as information could be intercepted, 
> corrupted, 
> >> lost, destroyed, arrive late or incomplete, or contain viruses.
> >>>
> >>> _______________________________________________
> >>> Users mailing list
> >>> Users at openser.org
> >>> http://openser.org/cgi-bin/mailman/listinfo/users
> >>
> 
> 




More information about the Users mailing list