rl_check()/rl_check_pipe() will work on an *incoming* SIP packet, but that SIP packet will go *out*, so what's the difference? The ratelimiting mechanism is flexible and it is entirely up to you how you want to use it. You can define several pipes and associate each pipe to a destination. Once you know where you want to route the call, just ratelimit the traffic based on you predefined pipes.
Regards, Ovidiu Sas On Tue, Aug 19, 2008 at 12:09 PM, sergejf <[EMAIL PROTECTED]> wrote: > > From what I understand rl_check_pipe() will work on all *incoming* INVITE > packets (assuming we use that setup) while what we want is limiting the rate > on *outgoing* SIP trunks that have different CPS ratings. For example, > carrier 1 supports 10 CPS per trunk while carrier 2 only accepts 5 CPS. > > For argument's sake let's assume we can get by with evenly spreading the CPS > load between SIP trunks with identical CPS ratings (e.g. 10 SIP trunks at 10 > CPS for an aggregate 100 CPS). The only possibility I can see is calling > rl_check_pipe() after havinig initialized ratelimit as follows > > modparam("ratelimit", "timer_interval", 5) > modparam("ratelimit", "queue", "1:INVITE") > modparam("ratelimit", "queue", "2:*") > modparam("ratelimit", "pipe", "1:RED:100") > > then using carrierroute with 10% load factors on every SIP trunk > (destination gateway). This should evenly spread a 100 CPS load between 10 > SIP trunks rated at 10 CPS each, correct? > > Nevertheless this does not support a configuration with SIP trunks that have > all different CPS ratings. > > > Ovidiu Sas-3 wrote: >> >> Just call rl_check()/rl_check_pipe() to see if the imposed cps limit >> was reached: >> - if not, route the call normally; >> - if yes, pick the next destination/carrier. >> >> Regards, >> Ovidiu Sas >> >> On Sat, Aug 16, 2008 at 5:48 PM, sergejf <[EMAIL PROTECTED]> wrote: >>> >>> Hello, >>> >>> We are connected to several VoIP carriers that impose a calls per second >>> (CPS) rate limit on their SIP trunks. For example, on TRUNK1 we can only >>> make call attempts at 10 CPS. >>> >>> Our calls are originally made by a dialer that does not support rate >>> limiting, hence it always blasts calls as fast as it can. Upon receiving >>> these SIP INVITE messages we determine what carrier to use and perform a >>> mapping to a dispatcher group. Call attempts are then load-balanced >>> between >>> all SIP trunks from the chosen carrier. >>> >>> My question is whether it is possible to use the ratelimit module in >>> conjunction with the dispatcher (or carrierroute) to ensure we don't >>> overload the carrier SIP trunks? If this is possible, then I wonder how >>> to >>> configure ratelimit to support a 10 CPS call attempts rate. >>> >>> Thanks in advance for any advice on the topic! >>> >>> Serge >> >> > > -- > View this message in context: > http://www.nabble.com/Ratelimit-outgoing-SIP-INVITE-messages-after-dispatcher-tp19000383p19053566.html > Sent from the OpenSER Users Mailing List mailing list archive at Nabble.com. > > > _______________________________________________ > Users mailing list > Users@lists.kamailio.org > http://lists.kamailio.org/cgi-bin/mailman/listinfo/users > _______________________________________________ Users mailing list Users@lists.kamailio.org http://lists.kamailio.org/cgi-bin/mailman/listinfo/users