[Serusers] Configuration example - no register, no auth

Greg Fausak lgfausak at gmail.com
Thu Jul 7 17:37:16 CEST 2005


Chris,

A simple script to do so would be:

route
{
    forward(192.168.1.1, 5060);
}

That would forward all packets to 192.168.1.1.
However, that's probably not what you want.

Packets flow both directions, and if you use record-route you
can expect to get loose routed stuff as well.  Below is from memory,
probably won't work, but, it might spawn some ideas.  I think there is some
good examples on both iptel.org and onsip.org.

-g


route
{
   # if already record routed just let it pass
   if(loose_route())
   {
      if(!t_relay()) { sl_reply_error(); };
      break;
   };

   # if not ours, don't mess with it, just move it on it's way.
   if(!(uri == myself))
   {
      if(!t_relay()) { sl_reply_error(); };
      break;
   };

   # if from our gateway then forward to internal UAC (for example)
   if(src_ip == 192.168.100.1)
   {
      record_route();
      rewritehostport("192.168.1.1:5060");
      if(!t_relay()) { sl_reply_error(); };
      break;
   };

   # relay everything else outside
   rewritehostport("192.168.100.1:5060");
   if(!t_relay()) { sl_reply_error(); };
}



On 7/6/05, Chris Mason <lists at masonc.com> wrote:
> I need some newbie help to configure ser so that it forwards all
> requests to another server. I don't need mysql authentication, or any
> authentication, just a plain proxy that runs on port 5080. Can someone
> help me modify the config? All the examples I have seen spend a lot of
> time on mysql authentication, but little on the proxy routng.
> 
> Chris
> 
> _______________________________________________
> Serusers mailing list
> serusers at lists.iptel.org
> http://lists.iptel.org/mailman/listinfo/serusers
> 


-- 
Greg Fausak
greg at thursday.com




More information about the sr-users mailing list