[Serusers] SIP Forwarding?

Jan Janak jan at iptel.org
Wed Jul 14 09:54:54 CEST 2004


Additionaly, if you want generic forwarding of @domain.com to
@sip.domain.com, try something like this:

if (uri =~ "^sip:.*@domain.com") {
	rewritehost("sip.domain.com");
};

t_relay();
  
  Jan.

On 13-07 08:37, Chris Bond wrote:
> Sounds good - question on the table structure - what fields do I need to
> populate and with what as its not very clear, cant see much documentation on
> it either...
> 
> -----Original Message-----
> From: Zeus Ng [mailto:zeus.ng at isquare.com.au] 
> Sent: 13 July 2004 2:24 AM
> To: chris at logics.co.uk
> Cc: serusers at lists.iptel.org
> Subject: RE: [Serusers] SIP Forwarding?
> 
> Chris,
> 
> The best way to do it is to use the aliases table. Set aliase for
> chris at domain.com as chris at sip.domain.com.
> 
> Then, in your route block, do
> 
>  lookup("aliases");
>  t_relay(); /* or forward(sip.domain.com, 5060) if you want stateless */
> 
> 
> 
> The function forward() does not make any changes to the URI. It simply send
> the request to the destination inside the function. In your case, the server
> sip.domain.com will see incoming URI as chris at domain.com. Unless you
> configure sip.domain.com to accept requests for domain.com, it will relay
> back to domain.com and form a loop or drop completely depending on your
> configuration.
> 
> With lookup("aliases"), the URI will be rewritten to chris at sip.domain.com.
> Then t_relay() will automatically forward the request to sip.domain.com
> statefully. If you desire stateless handling, use forward() instead.
> 
> Zeus
> 
> 
> > -----Original Message-----
> > From: serusers-bounces at lists.iptel.org
> > [mailto:serusers-bounces at lists.iptel.org] On Behalf Of Chris Bond
> > Sent: Tuesday, 13 July 2004 6:11 AM
> > To: serusers at lists.iptel.org
> > Subject: [Serusers] SIP Forwarding?
> > 
> > 
> > Hi,
> > 
> > I currently have the following setup and working chris at sip.domain.com 
> > incoming sip calls work fine.  I want to be able to setup SER to 
> > forward incoming packets for chris at domain.com to chris at sip.domain.com.
> > 
> > I've tried the following but it didn't work.
> > 
> > route{
> >         if (uri=~"sip:chris at domain.com") {
> >                 forward(sip.domain.com, 5060);
> >         }
> > 
> > Can anybody help?
> > 
> > Kind Regards,
> > Chris Bond
> > 
> > _______________________________________________
> > 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