[SR-Users] New functionality LCR + force_send_socket() - sanity check

Geoffrey Mina geoffreymina at gmail.com
Fri Jun 25 22:31:00 CEST 2010


The only reason I would choose to keep the values at the top is because I
have 4 machines which all need a copy of the script.... but would need the
IP changed per machine.  Since the IP will be referenced in both
REQUEST_ROUTE and FAILURE_ROUTE, i just figured it was easier to store in a
PV instead of having to change it 2 places for each machine.

Thanks.

On Fri, Jun 25, 2010 at 4:12 PM, Juha Heinanen <jh at tutpro.com> wrote:

> Geoffrey Mina writes:
>
> > modparam("pv","shvset","gw_one=s:1.1.1.1:5060")
> > modparam("pv","shvset","gw_two=s:1.1.1.2:5060")
> >
> > route{
> >
> >   load_gws();
> >   next_gw();
> >
> >   if(to_gw("1")){
> >       force_send_socket($shv(gw_one));
> >    }else if(to_gw("2")){
> >       force_send_socket($shv(gw_two));
> >   }
> >
> > }
>
> force_send_socket does what do want to do, but i don't know if it
> accepts pv argument.  also, i don't see why you need to use pv argument,
> rather than write force_send_socket(1.1.1.1:5060), etc.
>
> -- juha
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20100625/6c5e6b15/attachment.htm>


More information about the sr-users mailing list