<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p><tt>Hi, Dawid!</tt></p>
<p><tt>I have looked into the problem and also managed to come up
with a fix! Could you please go to your OpenSIPS 2.2 source code
directory, apply the below patch, recompile the dialog module
and see if it fixes the problem?<br>
</tt></p>
<p><tt>git apply <(base64 -d <<EOF<br>
ZGlmZiAtLWdpdCBhL21vZHVsZXMvZGlhbG9nL2RsZ19yZXBsaWNhdGlvbi5jIGIvbW9kdWxlcy9k<br>
aWFsb2cvZGxnX3JlcGxpY2F0aW9uLmMKaW5kZXggYTg0NTVhZi4uZGE2MmRiNiAxMDA2NDQKLS0t<br>
IGEvbW9kdWxlcy9kaWFsb2cvZGxnX3JlcGxpY2F0aW9uLmMKKysrIGIvbW9kdWxlcy9kaWFsb2cv<br>
ZGxnX3JlcGxpY2F0aW9uLmMKQEAgLTE4Miw3ICsxODIsNiBAQCBpbnQgZGxnX3JlcGxpY2F0ZWRf<br>
Y3JlYXRlKHN0cnVjdCBkbGdfY2VsbCAqY2VsbCwgc3RyICpmdGFnLCBzdHIgKnR0YWcsIGludCBz<br>
YWZlKQogCWRsZy0+bGVnc19ub1tETEdfTEVHXzIwME9LXSA9IERMR19GSVJTVF9DQUxMRUVfTEVH<br>
OwogCiAJLyogbGluayB0aGUgZGlhbG9nIGludG8gdGhlIGhhc2ggKi8KLQlkbGctPmhfaWQgPSBk<br>
X2VudHJ5LT5uZXh0X2lkKys7CiAJaWYgKCFkX2VudHJ5LT5maXJzdCkKIAkJZF9lbnRyeS0+Zmly<br>
c3QgPSBkX2VudHJ5LT5sYXN0ID0gZGxnOwogCWVsc2Ugewo=<br>
EOF<br>
)</tt></p>
<pre class="moz-signature" cols="72">Liviu Chircu
OpenSIPS Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
<div class="moz-cite-prefix">On 03.11.2016 11:09, Dawid Mielnik
wrote:<br>
</div>
<blockquote
cite="mid:CAOkGNoe5dXM38T8Bss1dhKOFx0nHL-0Z1YM=dqR6LrzPjjo6dA@mail.gmail.com"
type="cite">
<div dir="ltr">Anyone ?
<div><br>
</div>
<div>I have just upgraded to the latest 2.2 version form GIT and
am still experiencing this.</div>
<div><br>
</div>
<div>active server:</div>
<div><br>
</div>
<div>
<div>dialog:: hash=<b>2297:947327686</b>
dialog_id=9866487206598</div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre">        </span>state::
4</div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre">        </span>user_flags::
0</div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre">        </span>timestart::
1478162278</div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre">        </span>datestart::
2016-11-03 09:37:58</div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre">        </span>timeout::
1478183878</div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre">        </span>dateout::
2016-11-03 15:37:58</div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre">        </span>callid::
81140ODk1MmU1MGM3MzZkZjMyYjIzY2I1ZDExZTI4ZDFiNjY</div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre">        </span>from_uri::
<a class="moz-txt-link-abbreviated" href="mailto:sip:+48226522655@XXX.XXX.XXX.250">sip:+48226522655@XXX.XXX.XXX.250</a></div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre">        </span>to_uri::
<a class="moz-txt-link-abbreviated" href="mailto:sip:+48501657887@XXX.XXX.XXX.250">sip:+48501657887@XXX.XXX.XXX.250</a></div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre">        </span>caller_tag::
86343576</div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre">        </span>caller_contact::
<a class="moz-txt-link-abbreviated" href="mailto:sip:+48226522655@ZZZ.ZZZ.ZZZ.34:60603;rinstance=eab8d8723e64bbad">sip:+48226522655@ZZZ.ZZZ.ZZZ.34:60603;rinstance=eab8d8723e64bbad</a></div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre">        </span>callee_cseq::
0</div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre">        </span>caller_route_set:: </div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre">        </span>caller_bind_addr::
udp:XXX.XXX.XXX.250:5061</div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre">        </span>caller_sdp:: </div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre">        </span>CALLEES:: </div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre">                </span>callee:: </div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre">                        </span>callee_tag::
192571</div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre">                        </span>callee_contact::
sip:YYY.YYY.YYY.20:5060;transport=UDP</div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre">                        </span>caller_cseq::
1</div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre">                        </span>callee_route_set:: </div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre">                        </span>callee_bind_addr::
udp:XXX.XXX.XXX.250:5060</div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre">                        </span>callee_sdp::</div>
</div>
<div>...</div>
<div><br>
</div>
<div>standby server:</div>
<div><br>
</div>
<div>
<div>dialog:: hash=<b>2297:1952115624</b>
dialog_id=9867491994536</div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre">        </span>state::
4</div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre">        </span>user_flags::
0</div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre">        </span>timestart::
1478162278</div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre">        </span>datestart::
2016-11-03 09:37:58</div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre">        </span>timeout::
1478183877</div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre">        </span>dateout::
2016-11-03 15:37:57</div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre">        </span>callid::
81140ODk1MmU1MGM3MzZkZjMyYjIzY2I1ZDExZTI4ZDFiNjY</div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre">        </span>from_uri::
<a class="moz-txt-link-abbreviated" href="mailto:sip:+48226522655@XXX.XXX.XXX.250">sip:+48226522655@XXX.XXX.XXX.250</a></div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre">        </span>to_uri::
<a class="moz-txt-link-abbreviated" href="mailto:sip:+48501657887@XXX.XXX.XXX.250">sip:+48501657887@XXX.XXX.XXX.250</a></div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre">        </span>caller_tag::
86343576</div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre">        </span>caller_contact::
<a class="moz-txt-link-abbreviated" href="mailto:sip:+48226522655@ZZZ.ZZZ.ZZZ.34:60603;rinstance=eab8d8723e64bbad">sip:+48226522655@ZZZ.ZZZ.ZZZ.34:60603;rinstance=eab8d8723e64bbad</a></div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre">        </span>callee_cseq::
0</div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre">        </span>caller_route_set:: </div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre">        </span>caller_bind_addr::
udp:XXX.XXX.XXX.250:5061</div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre">        </span>caller_sdp:: </div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre">        </span>CALLEES:: </div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre">                </span>callee:: </div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre">                        </span>callee_tag::
192571</div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre">                        </span>callee_contact::
sip:YYY.YYY.YYY.20:5060;transport=UDP</div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre">                        </span>caller_cseq::
1</div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre">                        </span>callee_route_set:: </div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre">                        </span>callee_bind_addr::
udp:XXX.XXX.XXX.250:5060</div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre">                        </span>callee_sdp:: </div>
</div>
<div>...</div>
<div><br>
</div>
<div>After switch-over BYE is received on the standby server:</div>
<div><br>
</div>
<div>
<div>Nov 3 09:44:38.571442 DEB 10180 DBG:core:parse_msg: SIP
Request:</div>
<div>Nov 3 09:44:38.571471 DEB 10180 DBG:core:parse_msg:
method: <BYE></div>
<div>Nov 3 09:44:38.571475 DEB 10180 DBG:core:parse_msg:
uri: <sip:XXX.XXX.XXX.250:5061;did=9f8.6c217783></div>
<div>Nov 3 09:44:38.571479 DEB 10180 DBG:core:parse_msg:
version: <SIP/2.0></div>
</div>
<div>...</div>
<div>
<div>Nov 3 09:44:38.571809 DEB 10180
DBG:dialog:w_match_dialog: We found DID param in R-URI with
value of 9f8.6c217783<br>
</div>
<div>Nov 3 09:44:38.571812 DEB 10180 DBG:dialog:dlg_onroute:
route param is '9f8.6c217783' (len=12)</div>
<div>Nov 3 09:44:38.571814 DEB 10180 DBG:dialog:lookup_dlg:
<b>no dialog id=947327686 found on entry 2297</b></div>
<div>Nov 3 09:44:38.571816 DEB 10180 DBG:dialog:dlg_onroute:
unable to find dialog for BYE with route param
'9f8.6c217783'</div>
</div>
<div>...</div>
<div><br>
</div>
<div><br>
</div>
<div>Is this normal behaviour that dialog hash (and recently
added dialog id) are different on the replicated server ?</div>
<div><br>
</div>
<div>BR,</div>
<div>Dawid</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Wed, Oct 26, 2016 at 4:43 PM,
Dawid Mielnik <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:dawid.mielnik@gmail.com" target="_blank">dawid.mielnik@gmail.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">
<div>Hi All,</div>
<div><br>
</div>
<div>I have a reduntant OpenSIPS 2.2.1 setup with
clusterer, binary interface replication and a floating
IP. I am encountering a few niuances and am wondering
if I am doing something wrong or if there is a bug.</div>
<div><br>
</div>
<div>1) Replicated dialog hash id is different on the
standby server from the active server</div>
<div><br>
</div>
<div>active:</div>
<div><br>
</div>
<div>dialog:: hash=637:902131071</div>
<div><span class="m_-5262131814799374994gmail-Apple-tab-span" style="white-space:pre-wrap">        </span>state::
4</div>
<div><span class="m_-5262131814799374994gmail-Apple-tab-span" style="white-space:pre-wrap">        </span>user_flags::
0</div>
<div><span class="m_-5262131814799374994gmail-Apple-tab-span" style="white-space:pre-wrap">        </span>timestart::
1477413837</div>
<div><span class="m_-5262131814799374994gmail-Apple-tab-span" style="white-space:pre-wrap">        </span>datestart::
2016-10-25 18:43:57</div>
<div><span class="m_-5262131814799374994gmail-Apple-tab-span" style="white-space:pre-wrap">        </span>timeout::
1477435437</div>
<div><span class="m_-5262131814799374994gmail-Apple-tab-span" style="white-space:pre-wrap">        </span>dateout::
2016-10-26 00:43:57</div>
<div><span class="m_-5262131814799374994gmail-Apple-tab-span" style="white-space:pre-wrap">        </span>callid::
81140Mzk5ZjViNjY5YzI3MDI5NDMxM<wbr>DUwZTdlNmQ1MDBhNzg</div>
<div><span class="m_-5262131814799374994gmail-Apple-tab-span" style="white-space:pre-wrap">        </span>...</div>
<div><br>
</div>
<div>standby:</div>
<div><br>
</div>
<div>dialog:: hash=637:902131072</div>
<div><span class="m_-5262131814799374994gmail-Apple-tab-span" style="white-space:pre-wrap">        </span>state::
4</div>
<div><span class="m_-5262131814799374994gmail-Apple-tab-span" style="white-space:pre-wrap">        </span>user_flags::
0</div>
<div><span class="m_-5262131814799374994gmail-Apple-tab-span" style="white-space:pre-wrap">        </span>timestart::
1477413837</div>
<div><span class="m_-5262131814799374994gmail-Apple-tab-span" style="white-space:pre-wrap">        </span>datestart::
2016-10-25 18:43:57</div>
<div><span class="m_-5262131814799374994gmail-Apple-tab-span" style="white-space:pre-wrap">        </span>timeout::
1477435438</div>
<div><span class="m_-5262131814799374994gmail-Apple-tab-span" style="white-space:pre-wrap">        </span>dateout::
2016-10-26 00:43:58</div>
<div><span class="m_-5262131814799374994gmail-Apple-tab-span" style="white-space:pre-wrap">        </span>callid::
81140Mzk5ZjViNjY5YzI3MDI5NDMxM<wbr>DUwZTdlNmQ1MDBhNzg</div>
<div><span class="m_-5262131814799374994gmail-Apple-tab-span" style="white-space:pre-wrap">        </span>...</div>
<div><br>
</div>
<div>When a switch overoccurs during a dialog, and a
request is received on the second server the dialog
can not be matched by the DID param and has to fall
back to looking for other SIP elements.</div>
<div><br>
</div>
<div>DBG:dialog:lookup_dlg: no dialog id=902131071 found
on entry 637 </div>
<div>DBG:dialog:dlg_onroute: unable to find dialog for
BYE with route param 'd72.f7d65c53'</div>
<div><br>
</div>
<div>2) No CDR on the standby server after switch over</div>
<div><br>
</div>
<div>When a switch over occurs during a dialog CDR is
not generated at the end of the call (I have to do it
manually). I to not see any run_dlg_callbacks info in
debug logs although the replicated dialog seems to
have all the acc flags.</div>
<div><br>
</div>
<div>active:</div>
<div><br>
</div>
<div>dialog:: hash=637:902131071</div>
<div><span class="m_-5262131814799374994gmail-Apple-tab-span" style="white-space:pre-wrap">        </span>...</div>
<div><span class="m_-5262131814799374994gmail-Apple-tab-span" style="white-space:pre-wrap">                </span>values:: </div>
<div><span class="m_-5262131814799374994gmail-Apple-tab-span" style="white-space:pre-wrap">                        </span>accX_table::
acc</div>
<div><span class="m_-5262131814799374994gmail-Apple-tab-span" style="white-space:pre-wrap">                        </span>accX_flags::
\x00\x00\x07\x00\x00\x00\x02\<wbr>x00</div>
<div><span class="m_-5262131814799374994gmail-Apple-tab-span" style="white-space:pre-wrap">                        </span>accX_db::
\x07\x00\r\x0031.179.202.34\f\<wbr>x00<a
moz-do-not-send="true" href="tel:%2B48226522655"
value="+48226522655" target="_blank">+48226522655</a>\f\x00<a
moz-do-not-send="true" href="tel:%2B48226522655"
value="+48226522655" target="_blank">+<wbr>48226522655</a>\x01\x001\f\x00+<wbr>48501657778\f\x00+48501657778\<wbr>x02\x0024</div>
<div><span class="m_-5262131814799374994gmail-Apple-tab-span" style="white-space:pre-wrap">                        </span>accX_leg::
\x00\x00\x00\x00</div>
<div><span class="m_-5262131814799374994gmail-Apple-tab-span" style="white-space:pre-wrap">                        </span>accX_core::
\x06\x00INVITE\b\x0004027a21\<wbr>x01\x0030\<wbr>x0081140Mzk5ZjViNjY5YzI3MDI5ND<wbr>MxMDUwZTdlNmQ1MDBhNzg\x03\<wbr>x00200\x02\x00OK\x10\x00\xcd\<wbr>x8b\x0fX\x00\x00\x00\x00]\xb2\<wbr>x07\x00\x00\x00\x00\x00</div>
<div><span class="m_-5262131814799374994gmail-Apple-tab-span" style="white-space:pre-wrap">                        </span>...</div>
<div><span class="m_-5262131814799374994gmail-Apple-tab-span" style="white-space:pre-wrap">                        </span>accX_created::
\xcb\x8b\x0fX\x00\x00\x00\x00</div>
<div><span class="m_-5262131814799374994gmail-Apple-tab-span" style="white-space:pre-wrap">                        </span>...</div>
<div><span class="m_-5262131814799374994gmail-Apple-tab-span" style="white-space:pre-wrap">                        </span></div>
<div>standby:</div>
<div><br>
</div>
<div>dialog:: hash=637:902131072</div>
<div><span class="m_-5262131814799374994gmail-Apple-tab-span" style="white-space:pre-wrap">        </span>...</div>
<div><span class="m_-5262131814799374994gmail-Apple-tab-span" style="white-space:pre-wrap">                </span>values:: </div>
<div><span class="m_-5262131814799374994gmail-Apple-tab-span" style="white-space:pre-wrap">                        </span>accX_created::
\xcb\x8b\x0fX\x00\x00\x00\x00</div>
<div><span class="m_-5262131814799374994gmail-Apple-tab-span" style="white-space:pre-wrap">                        </span>...</div>
<div><span class="m_-5262131814799374994gmail-Apple-tab-span" style="white-space:pre-wrap">                        </span>accX_core::
\x06\x00INVITE\b\x0004027a21\<wbr>x01\x0030\<wbr>x0081140Mzk5ZjViNjY5YzI3MDI5ND<wbr>MxMDUwZTdlNmQ1MDBhNzg\x03\<wbr>x00200\x02\x00OK\x10\x00\xcd\<wbr>x8b\x0fX\x00\x00\x00\x00]\xb2\<wbr>x07\x00\x00\x00\x00\x00</div>
<div><span class="m_-5262131814799374994gmail-Apple-tab-span" style="white-space:pre-wrap">                        </span>accX_leg::
\x00\x00\x00\x00</div>
<div><span class="m_-5262131814799374994gmail-Apple-tab-span" style="white-space:pre-wrap">                        </span>accX_db::
\x07\x00\r\x0031.179.202.34\f\<wbr>x00<a
moz-do-not-send="true" href="tel:%2B48226522655"
value="+48226522655" target="_blank">+48226522655</a>\f\x00<a
moz-do-not-send="true" href="tel:%2B48226522655"
value="+48226522655" target="_blank">+<wbr>48226522655</a>\x01\x001\f\x00+<wbr>48501657778\f\x00+48501657778\<wbr>x02\x0024</div>
<div><span class="m_-5262131814799374994gmail-Apple-tab-span" style="white-space:pre-wrap">                        </span>accX_flags::
\x00\x00\x07\x00\x00\x00\x02\<wbr>x00</div>
<div><span class="m_-5262131814799374994gmail-Apple-tab-span" style="white-space:pre-wrap">                        </span>accX_table::
acc</div>
<div><span class="m_-5262131814799374994gmail-Apple-tab-span" style="white-space:pre-wrap">                        </span>...</div>
<div><span class="m_-5262131814799374994gmail-Apple-tab-span" style="white-space:pre-wrap">                        </span></div>
<div><br>
</div>
<div>My relevant config:</div>
<div><span class="m_-5262131814799374994gmail-Apple-tab-span" style="white-space:pre-wrap">                        </span></div>
<div>#### DIALOG module</div>
<div>loadmodule "dialog.so"</div>
<div><br>
</div>
<div>modparam("dialog", "dlg_match_mode", 1)</div>
<div>modparam("dialog", "default_timeout", 21600) # 6
hours timeout</div>
<div>modparam("dialog", "db_mode", 0)</div>
<div>modparam("dialog", "accept_replicated_dialogs", 1)</div>
<div>modparam("dialog", "replicate_dialogs_to", 1)</div>
<div>#modparam("dialog", "accept_replicated_profiles",
1)</div>
<div>#modparam("dialog", "replicate_profiles_to", 1)</div>
<div>modparam("dialog", "profiles_with_value",
"trunkCalls")</div>
<div>modparam("dialog", "options_ping_interval", 60)</div>
<div><br>
</div>
<div>#### CLUSTERER module</div>
<div>loadmodule "clusterer.so"</div>
<div>modparam("clusterer", "db_url",
"text:///usr/local/etc/<wbr>opensips")</div>
<div>modparam("clusterer", "server_id", 2) #2 or 1
depending on node</div>
<div><br>
</div>
<div><br>
</div>
<div><span class="m_-5262131814799374994gmail-Apple-tab-span" style="white-space:pre-wrap">        </span>#
for initial requests</div>
<div><span class="m_-5262131814799374994gmail-Apple-tab-span" style="white-space:pre-wrap">        </span>do_accounting("db",
"cdr|missed", "acc");</div>
<div><br>
</div>
<div><br>
</div>
<div>Has anyone experienced similar problems ? Is there
something that I am missing ?</div>
<div><br>
</div>
<div>Best regards,</div>
<div>Dawid</div>
<div><br>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
</body>
</html>