[OpenSIPS-Users] drouting enhancement clarifications

Brett Nemeroff brett at nemeroff.com
Mon Apr 2 18:51:33 CEST 2012


Bogdan,

So the typical requirement I see is that I'll put in a handful of
termination gateways for a given carrier, but the carriers usually
(sometimes?) ask that if the call fails on one of the gateways (like a 503)
to NOT send it to all the other gateways as well. In fact a "next_carrier"
function would be ideal. Else, if I'm reading this right,if I use the
carriers capabilities as listed it'll try every single one of the carrier's
gateways, right? Or is the weight based selection going to pick just one
gateways of the carriers each time?

I feel like a lot of my confusion stems from this:

   -

   list of GWs/carriers (string) - a comma separated list of gateways or
   carriers (defined by IDs) to be used for this rule; the carrier IDs are
   prefixed with “#” sign. For each ID (GW or carrier) you may specify a
   weight. For how this list will be interpreted (as order) see the rule
   selection section. Example of list: “gw1,gw4,#cr3”

So this "gwX,#crX" notation is new and is specifically what I don't see
documented other than in the paragraph listed above. So before we'd
indicate a gwlist instead of a gateway by prefixing with a # like #5 is
gwlist 5. But now we have gwX, which I can only assume is
dr_gateways.gwid=X? and #cr3 which I'd assume is the list of gateways
associated with carrier_id 3. but I'm not sure why one has a # and the
other doesn't. Maybe I missed a documentation page? :)


Also can the weight based sorting be used on both in the dr_rules table to
select a carrier and in the dr_carriers table to select a gateways (ie
carrier 1 weight is 75% and carrier 2 is 25%.. BUT then carrier 1's gateway
5 is weight 75% and carrier 1's gateway 7 is weight 25%)

Sorry for all the questions. I'm looking forward to the new functionality,
hope I'm not jumping the gun here. :)

-Brett





On Mon, Apr 2, 2012 at 11:26 AM, Bogdan-Andrei Iancu <bogdan at opensips.org>wrote:

> When doing weight-based selection, all the entries of a carrier will be
> used (of course, based on weight). To be honest I haven;t foreseen this
> case - IMO, I supposed that if one GW of the carrier is down, you will
> always want to try the rest of the GWs from the same carrier, rather than
> falling to another carrier.
>
> Or does it already do that? If I don't specify weights, does it try them in serial order?
>
>  yes, but this is not triggered by the lack of weights, but from the
> carrier definition (see the wright flag in the carrier;s flag) or the
> do_routing() "W" flag.
>
> Is this documented somewhere that I'm missing? The regular module docs dont' seem to show it.
>
>  Well, you need to read the entire doc in order to get the big picture.
> But if something is found to be missing, I will take care of  it :)
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20120402/896993e5/attachment.htm>


More information about the Users mailing list