Hey James,

If you don't want to separate the carriers gateways into 2 separate carriers ( ie. CARRIER_INBOUND and CARRIER_OUTBOUND ) then the only other option is to add a new 'type' param to route_to_carrier, similar to how is_from_gw is taking a type param.

Feel free to open a feature request for this https://github.com/OpenSIPS/opensips/issues

On 1/30/26 23:14, James Sharp wrote:
I've got various carriers that have gateways for inbound, gateways for outbound, and gateways for both.  I used is_from_gw() to determine the carrier for inbound and I used route_to_carrier() after sorting carriers around using cost_based_ordering from ratecacher.

In opensips, I had originally created a single carrier account for each carrier with the inbound and outbound gateways defined with different type numbers.  This worked for inbound, but when I used route_to_carrier(), it would also try to use the inbound gateways defined as outgoing and that displeased our carriers.

I had considered using weights in the gateways and setting the inbound gateways to 0%.  I had also considered adding a "type" parameter to route_to_carrier().  Is there another possible solution that I'm overlooking?  If not, adding the extra parameter to route_to_carrier() seems the less "ugly" way of picking one type of gateway over another.


_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to