[OpenSIPS-Users] Dispatcher within a K8s environment
hunterj91 at hotmail.com
Tue Aug 23 21:24:52 UTC 2022
I have a query around dispatcher behaviour, I am running 3.2 in a k8s environment.
I have 2 freeswitch instances defined in a destination set, both of which are pods.
As people may be aware its fun implementing in k8s as pods can restart and disappear at times so I ideally want this reflected in the cache and output of opensips-cli -x mi ds_list where I was hoping the freeswitch entries would be defined but with a state of probing or inactive.
With my current setup, when restarting opensips for example, I have the dispatcher table populated in postgres db , and if opensips cant resolve the URI it wont load it into cache, like wise if opensips is running and freeswitch pod drops, I see this in the logs;
Aug 23 21:22:01  ERROR:dispatcher:add_dest2list: could not resolve freeswitch-opensips-deployment-1.freeswitch-opensips, skipping it
Aug 23 21:22:01  WARNING:dispatcher:ds_load_data: failed to add destination <sip:freeswitch-opensips-deployment-1.freeswitch-opensips:5070;transport=tcp> in group 10
I therefore don’t see it listed in cache when I run ds_list.
Does anyone know if its possible to tweak dispatcher to always load the database entries into cache at startup, and also set their status to probing/inactive if not reachable due to a resolving issue as above?
My dispatcher settings are;
#### Dynamic routing
modparam("dispatcher", "db_url", "postgres://x.x.x.x/opensips")
modparam("dispatcher", "ds_probing_mode", 1)
modparam("dispatcher", "ds_probing_threshhold", 1)
modparam("dispatcher", "persistent_state", 0)
modparam("dispatcher", "ds_ping_interval", 5)
modparam("dispatcher", "table_name", "dispatcher")
modparam("dispatcher", "cluster_id", 1)
Hope that makes sense!
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Users