Do the provider gateways have the same IP address for the different rate plans? If the gateways are different then the following may be relevant.

          if (next_gw()) {
                # prepare for lcr failover
                t_on_failure("2");
                if($rd=="aaa.aaa.aaa.aaa")
                {
                  xlog ("L_INFO", "This is a request for Some Rate Plan");
                  force_send_socket(udp:xxx.xxx.xxx.xxx:5060);
                }
                else
                {
xlog ("L_INFO", "This is a request for another rate plan");
                  force_send_socket(udp:yyy.yyy.yyy.yyy:5060);
                };
                route(2);
          } else {
            xlog("No gateways found!");


Stagg

On 1/29/11 9:10 AM, Graham Wooden wrote:
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



_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

Reply via email to