Hi Julien,

 

sounds interesting, a “location optimized routing mode”. What about making it as a dedicated mode, to not overloading the mode “8”?

 

Cheers,

 

Henning

 

--

Henning Westerholt – https://skalatan.de/blog/

Kamailio services – https://gilawa.com

 

From: sr-dev <sr-dev-bounces@lists.kamailio.org> On Behalf Of Julien Chavanton
Sent: Thursday, May 14, 2020 7:26 PM
To: Kamailio (SER) - Development Mailing List <sr-dev@lists.kamailio.org>; Kamailio (SER) - Users Mailing List <sr-users@lists.kamailio.org>
Subject: [sr-dev] congestion control priority for priority based dispatching

 

Hi Folks,


Just found another simple use case of the dispatcher latency stats.

Just shraing this idea of a feature I want to contribute.


When using dispatcher algorithm 8:

   “8” - select destination sorted by priority attribute value (serial forking ordered by priority).

If the gateway as the attribute, the priority becomes the estimated latency.

   cc-priority

 

- The dispatcher would automatically prioritize the closest one.

- If a gateway is becoming unresponsive it will automatically become de prioritize.


Consider this real life scenario where you have gateways in East and West Coast

Example


URI: sip:28.71.19.140                                                                                                                                                                                      
FLAGS: AP
PRIORITY: 10
ATTRS: {
        BODY: cc_priority=1
}
LATENCY: {
        AVG: 84.001000
        STD: 0.062000
        EST: 84.001000 (high == low priority)
        MAX: 93
        TIMEOUT: 0
URI: sip:28.71.16.140
FLAGS: AP
PRIORITY: 10

ATTRS: {
        BODY: cc_priority=1
}

LATENCY: {
        AVG: 29.110000
        STD: 2.383000
        EST: 31.999000 (low == high priority)
        MAX: 1499
        TIMEOUT: 1

 

 

Another major improvement to all of this would be to gather stats on INVITE <> 100 to have a very accurate latency estimation even if the gateway does not support SIP OPTIONS pings