[OpenSIPS-Users] Dispatcher algorithm 9

Răzvan Crainea razvan at opensips.org
Fri Sep 4 07:44:39 EST 2020


Depending on the BYE's direction, the `$dd` variable may point to the 
gateway or to the caller. If the BYE comes from the gateway, you should 
decrease the statistic based on $si, not $dd.

Best regards,

Răzvan Crainea
OpenSIPS Core Developer
http://www.opensips-solutions.com

On 9/3/20 7:10 PM, Social Boh wrote:
> Hello,
> 
> I'm trying to using DISPATCHER module with algorithm 9 together with 
> STATISTICS module:
> 
> My configuration:
> 
> #### STATISTIC module
> loadmodule "statistics.so"
> modparam("statistics", "stat_groups", "load_sip")
> 
> #### DISPATCHER module
> loadmodule "dispatcher.so"
> modparam("dispatcher", 
> "db_url","mysql://opensips:password@localhost/opensips")
> modparam("dispatcher", "algo_route", "disproute")
> modparam("dispatcher", "ds_ping_method", "OPTIONS")
> modparam("dispatcher", "ds_ping_from", "sip:proxy at 1.2.3.4")
> modparam("dispatcher", "ds_ping_interval", 30)
> modparam("dispatcher", "ds_probing_threshhold", 2)
> modparam("dispatcher", "ds_probing_mode", 1)
> modparam("dispatcher", "dst_avp", "$avp(271)")
> modparam("dispatcher", "pvar_algo_pattern", "$stat(load_%u)")
> 
> script:
> 
> on the BYE block:
> 
> update_stat("load_sip:$dd", -1)
> 
> On the DISPATCHER route:
> 
> route[DISP] {
>                     if(!ds_select_dst(1,9)) {
>                             send_reply(404, "No destination");
>                             exit;
>                     }
>          xlog("L_NOTICE", "script: Call to $ru via $du\n");
>          update_stat("load_sip:$dd", +1);
>          t_on_failure("DISPATCHER_FAILURE");
>          t_relay();
>          exit;
> }
> 
> The problem is the when the call terminate, the load stay on 1. If I 
> make 6 calls and hangup:
> 
> {
>                              "URI": "sip:5.6.7.8:5060",
>                              "state": "Active",
>                              "first_hit_counter": 6
>                          },
> 
> The calls never go to second Gateway and never change the load.
> 
> Any help is really appreciate.
> 
> Regards
> 



More information about the Users mailing list