<html><body><div style="font-family: lucida console,sans-serif; font-size: 12pt; color: #000000"><div>Hello Everyone,</div><div>With PgSQL dialog module in cluster latest master 3.1-dev active/active setup tries insert duplicate data from each node.</div><div>This setup contain 3 vips for each node on LAN and WAN sides.</div><div><br data-mce-bogus="1"></div><div>/usr/sbin/opensips[1727986]: ERROR:db_postgres:db_postgres_submit_query: 0x7f4eb5e95e28 PQsendQuery Error: ERROR: duplicate key value violates unique constraint "dialog_pkey"#012DETAIL: Key (dlg_id)=(7546448396242) already exists.#012 Query:</div><div><br data-mce-bogus="1"></div><div>Might be some miss configuration, but can find what the issue </div><div><br data-mce-bogus="1"></div><div><div>#### Dialog</div><div>loadmodule "dialog.so"</div><div>#modparam("dialog", "db_url", "postgres:///opensips")</div><div>modparam("dialog", "db_mode", 2)</div><div>modparam("dialog","profiles_with_value","outbound; inbound")</div><div>modparam("dialog", "dlg_match_mode", 1)</div><div>modparam("dialog", "default_timeout", 3600)</div><div>modparam("dialog", "options_ping_interval", 900)</div><div>modparam("dialog", "profiles_with_value", "caller ; domain")</div><div>modparam("dialog", "dialog_replication_cluster", 1)</div><div><br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div><div> if(!has_totag() && is_method("INVITE") && !has_body("application/csta+xml")) {</div><div><br></div><div> create_dialog();</div><div><span style="white-space:pre"> </span>topology_hiding();</div><div><br></div><div> ### Set profile ###</div><div> ### Set profile ###</div><div> set_dlg_profile("caller",$fU@$fd);</div><div> set_dlg_profile("domain",$fd);</div><div><br></div><div> get_profile_size("caller",$fU@$fd,$var(ccaller));</div><div> get_profile_size("caller",$fd,$var(cdomain));</div><div> xlog("Number of calls from user $fU@$fd is $var(ccaller)");</div><div> xlog("Number of calls from domain $fd is $var(cdomain)");</div><div><br></div><div><br></div><div><span style="white-space:pre"> </span>xlog("Got request on ip addr [$socket_in(ip)] and call dir $avp(DLG_dir)\n");</div><div><span style="white-space:pre"> </span># Wan route</div><div><span style="white-space:pre"> </span>$var(ip_lst) = $shv(vip_wan_lst);</div><div><span style="white-space:pre"> </span>route(SET_SOURCE_SOCKET);</div><div><span style="white-space:pre"> </span>if($avp(DLG_dir)=="topbx") {</div><div> <span style="white-space:pre"> </span>switch($(avp(req_ip){s.select,3,.})) {</div><div> <span style="white-space:pre"> </span>case "38":</div><div> <span style="white-space:pre"> </span>set_dlg_sharing_tag("vip1");</div><div> <span style="white-space:pre"> </span>xlog("[$rm] Set dialog tag vip1 ~> $(avp(req_ip){s.select,3,.})\n");</div><div> <span style="white-space:pre"> </span>break;</div><div> <span style="white-space:pre"> </span>case "39":</div><div> <span style="white-space:pre"> </span>set_dlg_sharing_tag("vip2");</div><div> <span style="white-space:pre"> </span>xlog("[$rm] Set dialog tag vip2 ~> $(avp(req_ip){s.select,3,.})\n");</div><div> <span style="white-space:pre"> </span>break;</div><div> <span style="white-space:pre"> </span>case "40":</div><div> <span style="white-space:pre"> </span>set_dlg_sharing_tag("vip3");</div><div> <span style="white-space:pre"> </span>xlog("[$rm] Set dialog tag vip3 ~> $(avp(req_ip){s.select,3,.})\n");</div><div> <span style="white-space:pre"> </span>break;</div><div> <span style="white-space:pre"> </span>default:</div><div> <span style="white-space:pre"> </span>xlog("[$rm] Unknown last octet ~> $(avp(req_ip){s.select,3,.})\n");</div><div> <span style="white-space:pre"> </span>}</div><div><span style="white-space:pre"> </span>}</div><div>}</div><div><br data-mce-bogus="1"></div><div>Any help thank you, volga629</div></div></div></div></body></html>