Hello.
        I'm facing a problem with the carrierroute module (openser version 
1.3.2).  i hope that someone could help me.
        I have two gateways for a particular destination.  GW1and GW2 : 

+----+---------+-------------+--------+------+-------+---------------+----------------+----------------+--------------+
| id | carrier | scan_prefix | domain | prob | strip | rewrite_host  | 
rewrite_prefix | rewrite_suffix | comment      |
+----+---------+-------------+--------+------+-------+---------------+----------------+----------------+--------------+
|  1 |       0 |  200        | 0      |  0.3 |     0 | GW1.IP      |            
    |                | op 1         | 
|  2 |       0 |  200        | 0      |  0.3 |     0 | GW2.IP      |            
    |                | op 2         | 
|  3 |       1 |  200        | 1      |  1   |     0 | GW3.IP      |            
    |                | op 3         |
+----+---------+-------------+--------+------+-------+---------------+----------------+----------------+--------------+

        Let's say, for example, that GW1 is down (offline).   Is possible via 
the carrierroute module try with the other gateway (GW2) before sending the 
call to the failure_route?.
        My configuration file is very similar to the example in the docs.

route[2] {
        # send it out now; use stateful forwarding as it works reliably
        # even for UDP2TCP
        if (!t_relay()) {
                sl_reply_error();
        };
        exit;
}       

route[5] {
        # CARRIER ROUTE MODULE HANDLING.

        # route calls based on hash over callid
        # choose route domain 0 of the default carrier

        if(!cr_rewrite_uri("0", "call_id")){
                sl_send_reply("403", "Not allowed - CR");
        } else {
                # In case of failure, re-route the request
                t_on_failure("2");
                # Relay the request to the gateway
                route(2);
        }
}

failure_route[2] {
         # In case of failure, send it to an alternative route:
        if (t_check_status("408|5[0-9][0-9]")) {
                #choose route domain 1 of the default carrier
                if(!cr_rewrite_uri("1", "call_id")){
                        t_reply("403", "Not allowed");
                } else {
                        route(2);
                }
        }
}

        How can i address this issue?

Thanks,

Regards,
Ricardo Martinez.-
_______________________________________________
Users mailing list
Users@lists.openser.org
http://lists.openser.org/cgi-bin/mailman/listinfo/users

Reply via email to