[SR-Users] LCR next_gw() - certain GW, source from other IP address

Graham Wooden graham at g-rock.net
Sat Jan 29 15:10:46 CET 2011


Hi there,

I have a requirement now that for one of my GW¹s in my LCR, needs to be
sourced from another IP address (two different rate-decks with the carrier).
This ratedeck will always be at least 2nd inline ...

I was thinking something along the sorts ... Some pseudo code:

failure_route [2] {
.
.
    if (next_gw()) {
        if ( name = 'gw_name') {
            force_send_socket(udp:ip.address.of.certain.ip:5060);
        } else {
            # just dummy, as we will send out our default IP for everyone
else.
        }
        t_on_failure("2");
        route(19);
    }
.
.
.
}

What variable will have the value that's in the gw_name column? I can't go
by the IP address in $ru because the destination IP is the same between the
two ratedecks.

Overall, Is that the best way to handle this requirement?

Thanks all,

-graham





More information about the sr-users mailing list