[Serusers] lookup 2 uri

Samuel Osorio Calvo samuel.osorio at nl.thalesgroup.com
Wed Aug 3 10:55:37 CEST 2005


Just one remark: only one of the two URI will be translated to the contact.

I'll try to explain...

imagine the incoming Req-URI is 1001 at test.com. When it passes the first lookup,
            lookup("aliases");
SER will retrieve the two aliases and put one of them as the new req-uri and the other as branch.
  Req-URI: 1002 at test.com  
  branch: 1003 at test.com 
Doing the second lookup,
            lookup("location");
will put the contact of 1002 at test.com as Req-URI (if more than one contact is present, the subsequent bindings will be added as branches) and the 1003 at test.com will be left as branch untouched.
  Req-URI:  1002 at 10.1.1.102 
  branch: 1003 at test.com
This happens because lookup() only takes as input the req-URI.

The result is that SER makes a DNS query for test.com, to send the request to 1003 at test.com, instead of the end-point. If the DNS is properly configured, test.com should point to SER itself, making SER sending the message to itself via the network. Depending on the config file, it can work but you should check the logs to see what is exactly happening.
User 1002 will get the message without any problem.

NOTE: depending on the order in the database, 1003 and 1002 can exchange roles in upper explanation.

As SER is now coded, above can not be changed (as far as I know)....

Hope it helps,

Samuel.

Unclassified.

>>> "Zeus Ng" <zeus.ng at isquare.com.au> 08/03/05 01:51AM >>>
You would need two steps here, looup("aliases"), then lookup("location").

Zeus

> -----Original Message-----
> From: serusers-bounces at lists.iptel.org 
> [mailto:serusers-bounces at lists.iptel.org] On Behalf Of Richard Z
> Sent: Wednesday, 3 August 2005 3:33 AM
> To: Atle Samuelsen
> Cc: serusers at lists.iptel.org 
> Subject: Re: [Serusers] lookup 2 uri
> 
> 
> Hi Atle,
> 
> Alias doesn't replace uri with its real location. I'd like to use
> lookup("location") to find out its real location. For 
> example, if 102 at test.com is at 102 at 10.1.1.102 and 
> 103 at test.com is at 103 at 10.1.1.103. I'd like to replace all 
> uris with 102 at 10.1.1.102 and 103 at 10.1.1.103 in a single ser 
> transaction  logic. Would it be possible?
> 
> Thanks,
> Richard
> 
> 
> On 8/1/05, Atle Samuelsen <clona at camaro.no> wrote:
> > 
> > Hi,
> > 
> > you could do something like :
> > 
> > serctl alias add 101 sip:102 at test.com 
> > serctl alias add 101 sip:103 at test.com 
> > 
> > This way the invite would be forked to both 102 and 103,
> > 
> > just remember to have both lookup("aliases"); and 
> save("aliases"); in 
> > your config at the right spot :-)
> > 
> > -Atle
> > 
> > 
> > 
> > * Richard Z <rzheng at gmail.com> [050802 04:34]:
> > > Hi,
> > >
> > > I am trying to implement a feature to ring two ip phones 
> > > simultaneously. For example, when I call 101 at test.com, it 
> rings both 
> > > 101 at test.com and 102 at test.com. In this case, the ruri is 
> > > 101 at test.com. I can use append_branch 102 at test.com, but 
> is there a 
> > > way to lookup the locations of both 101 and 102?
> > >
> > > Thanks,
> > > Richard
> > >
> > > _______________________________________________
> > > 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




More information about the sr-users mailing list