Closed 123srikanth closed 2 years ago
It seems that your destination is in probing mode. From the documentation: When an address is marked as inactive or probing, it will be ignored by ds_select_dst() and ds_select_domain().
This is not a bug. Please post questions to the mailing list.
I'm posting to mailing list but I'm not getting any response since past 2 weeks. can you please tell me what can I do
later I have updated the status to active
{ "PARTITIONS": [ { "name": "default", "SETS": [ { "id": 1, "Destinations": [ { "URI": "sip:15.207.211.82", "state": "Active", "first_hit_counter": 0, "socket": "udp:172.31.10.74:5060" } ] } ] } ] }
and the error I'm getting is this
Failed trunk 13.235.183.239/
"I was also facing a similar type of issue. I found a solution that may be helpful. The issue was that I was unable to add a destination in the dispatcher from the OpenSIPS control panel. Adding a destination directly in the database doesn't work sometimes. The reason is that the code for adding a destination in the dispatcher is not syncing with the control panel version 9.3.4. Although it works fine for the 3.3 version of the control panel. The solution is to open /var/www/html/opensips-cp/web/tools/system/dispatcher/apply_changes.php and update the query as follows:
$sql = "INSERT INTO ".$table." (setid, destination, socket, state, weight, attrs, probe_mode, description) VALUES (?, ?, ?, ?, ?, ?, ?, ?)";
There was a very small mistake where the number of question marks was 7 earlier. It should be 8 for version 9.3.4."
Hi there,
I'm a beginner to opensips and I want to do load balancing using dispatcher. I want to make the calls come to opensips server from current asterisk server and from opensips I'm trying to dispatch the calls to other two server having FreePBX setup. But here I'm able to get the calls to opensips from current asterisk server but the dispatcher is not able to forward the calls to other servers. In the logs I could see that there are no available destinations coming even after inserting the destinations in dispatcher database. Can you please let me know what change I have to make in the script to make it work.
{ "PARTITIONS": [ { "name": "default", "SETS": [ { "id": 1, "Destinations": [ { "URI": "sip:15.207.211.82:5260", "state": "Probing", "first_hit_counter": 0, "socket": "udp:172.31.10.74:5060" } ] } ] } ] }
#
OpenSIPS loadbalancer script
by OpenSIPS Solutions team@opensips-solutions.com
#
This script was generated via "make menuconfig", from
the "Load Balancer" scenario.
You can enable / disable more features / functionalities by
re-generating the scenario with different options.
#
Please refer to the Core CookBook at:
https://opensips.org/Resources/DocsCookbooks
for a explanation of possible statements, functions and parameters.
#
####### Global Parameters #########
/ uncomment the following lines to enable debugging / debug_mode=yes
debug=3 log_level=3 xlog_level=3 log_stderror=no log_facility=LOG_LOCAL0
udp_workers=4
/ uncomment the next line to enable the auto temporary blacklisting of not available destinations (default disabled) /
disable_dns_blacklist=no
/ uncomment the next line to enable IPv6 lookup after IPv4 dns lookup failures (default disabled) / dns_try_ipv6=yes
socket=udp:172.31.10.74:5060 # CUSTOMIZE ME socket=tcp:172.31.10.74:5060 # CUSTOMIZE ME
####### Modules Section ########
set module path
mpath="/usr/lib/x86_64-linux-gnu/opensips/modules/"
HTTPD module
loadmodule "httpd.so" modparam("httpd", "port", 8888) modparam("httpd","ip","127.0.0.1")
SIGNALING module
loadmodule "signaling.so"
StateLess module
loadmodule "sl.so"
Transaction Module
loadmodule "tm.so" modparam("tm", "fr_timeout", 5) modparam("tm", "fr_inv_timeout", 30) modparam("tm", "restart_fr_on_each_reply", 0) modparam("tm", "onreply_avp_mode", 1)
Record Route Module
loadmodule "rr.so" / do not append from tag to the RR (no need for this script) / modparam("rr", "append_fromtag", 0)
MAX ForWarD module
loadmodule "maxfwd.so"
SIP MSG OPerationS module
loadmodule "sipmsgops.so"
FIFO Management Interface
loadmodule "mi_fifo.so" modparam("mi_fifo", "fifo_name", "/tmp/opensips_fifo") modparam("mi_fifo", "fifo_mode", 0666)
MYSQL module
loadmodule "db_mysql.so"
AVPOPS module
loadmodule "avpops.so"
ACCounting module
loadmodule "acc.so" / what special events should be accounted ? / modparam("acc", "early_media", 0) modparam("acc", "report_cancels", 0) / by default we do not adjust the direct of the sequential requests. if you enable this parameter, be sure to enable "append_fromtag" in "rr" module / modparam("acc", "detect_direction", 0) modparam("acc", "db_url", "mysql://opensips:opensipsrw@localhost/opensips") # CUSTOMIZE ME
DISPATCHER module
loadmodule "dispatcher.so" modparam("dispatcher", "db_url", "mysql://opensips:opensipsrw@localhost/opensips") # CUSTOMIZE ME modparam("dispatcher", "ds_ping_method", "INFO") modparam("dispatcher", "ds_ping_maxfwd", 2) modparam("dispatcher", "ds_probing_sock", "udp:192.168.1.100:5077") modparam("dispatcher", "ds_probing_threshhold", 3) modparam("dispatcher", "ds_probing_mode", 1) modparam("dispatcher", "ds_probing_list", "1,2,3") modparam("dispatcher", "options_reply_codes", "501, 403") modparam("dispatcher", "dst_avp", "$avp(ds_dst_failover)") modparam("dispatcher", "grp_avp", "$avp(ds_grp_failover)") modparam("dispatcher", "cnt_avp", "$avp(ds_cnt_failover)") modparam("dispatcher", "sock_avp", "$avp(ds_sock_failover)") modparam("dispatcher", "pvar_algopattern", "$stat(load%u)") modparam("dispatcher", "persistent_state", 1)
modparam("dispatcher", "ds_ping_interval", 30)
additional params added
modparam("dispatcher", "table_name", "dispatcher") modparam("dispatcher", "setid_col", "setid") modparam("dispatcher", "destination_col", "destination") modparam("dispatcher", "state_col", "state") modparam("dispatcher", "weight_col", "weight") modparam("dispatcher", "priority_col", "priority") modparam("dispatcher", "attrs_col", "attrs") modparam("dispatcher", "socket_col", "socket")
MI_HTTP module
loadmodule "mi_http.so"
loadmodule "proto_udp.so"
loadmodule "proto_tcp.so"
####### Routing Logic ########
main request routing logic
route{
}
route[RELAY] { if (!t_relay()) { sl_reply_error(); } exit; }
failure_route[GW_FAILOVER] { if (t_was_cancelled()) { exit; }
}