Hi,<br>
<br>
I'm using 5.2.0~dev4+0~20180408010333.1091+xenial now.<br>
The dialog without the failover is correctly deleted now:<br>
<br>
kamcmd> dlg.list<br>
{<br>
h_entry: 93<br>
h_id: 9163<br>
ref: 2<br>
call-id: w6HWT0d6EZaVY3Lt1dIi0auvX1sq7Ctl<br>
from_uri: sip:0409828030@proxy.alex.cloud.evox.it<br>
to_uri: sip:390409828030@proxy.alex.cloud.evox.it<br>
state: 4<br>
start_ts: 1523271041<br>
init_ts: 1523271041<br>
end_ts: 0<br>
timeout: 1523271228<br>
lifetime: 187<br>
dflags: 512<br>
sflags: 0<br>
iflags: 1<br>
caller: {<br>
tag: 3OHIzRviWKofH8StpnwRPFZhLB8zNs4o<br>
contact: sip:0409828030@172.16.21.154:55236;ob<br>
cseq: 31843<br>
route_set: <sip:172.16.234.85;lr=on;ftag=3OHIzRviWKofH8StpnwRPFZhLB8zNs4o;did=d5.39a1><br>
socket: udp:172.16.234.89:5060<br>
}<br>
callee: {<br>
tag: as497536f9<br>
contact: sip:39390409828030@172.16.201.101:5060<br>
cseq: 0<br>
route_set: <sip:172.16.234.85;lr=on;ftag=3OHIzRviWKofH8StpnwRPFZhLB8zNs4o;did=d5.49a1><br>
socket: udp:172.16.234.89:5060<br>
}<br>
profiles: {<br>
}<br>
variables: {<br>
{<br>
ru: sip:39390409828030@carrier1.cloud.evox.it<br>
}<br>
{<br>
du: sip:172.16.234.85:5060<br>
}<br>
{<br>
cgrSupplier: carrier1.cloud.evox.it<br>
}<br>
{<br>
cgrSuppliers: carrier1.cloud.evox.it,carrier2.cloud.evox.it,carrier3.cloud.evox.it<br>
}<br>
{<br>
cgrCallip: 172.16.21.154<br>
}<br>
{<br>
cgrDestination: 39390409828030<br>
}<br>
{<br>
cgrAccount: 0409828030<br>
}<br>
{<br>
cgrTenant: evox.it<br>
}<br>
{<br>
cgrReqType: *prepaid<br>
}<br>
{<br>
calleeNumber: 39390409828030<br>
}<br>
{<br>
au: 0409828030<br>
}<br>
{<br>
authType: subscriber<br>
}<br>
{<br>
cgrSubsystems: "cgr_subsystems":"*resources;*suppliers;*accounts"<br>
}<br>
{<br>
originalSourceIP: 172.16.21.154<br>
}<br>
}<br>
}<br>
<br>
During failover the second kamailio istance loads the dialog but than<br>
it is not deleted and remains in kamailio even after the call ends via<br>
client.<br>
<br>
The first instance has this dialog during the call:<br>
kamcmd> dlg.list<br>
{<br>
h_entry: 3812<br>
h_id: 3301<br>
ref: 3<br>
call-id: 0GqZ1kdvtCKeDrh2l5.ctzGd5tc0KX6G<br>
from_uri: sip:0409828030@proxy.alex.cloud.evox.it<br>
to_uri: sip:390409828030@proxy.alex.cloud.evox.it<br>
state: 4<br>
start_ts: 1523271151<br>
init_ts: 1523271150<br>
end_ts: 0<br>
timeout: 1523271338<br>
lifetime: 187<br>
dflags: 512<br>
sflags: 0<br>
iflags: 1<br>
caller: {<br>
tag: FMn4o4AlYFAxYTkK89SYVksQbaYTfjvY<br>
contact: sip:0409828030@172.16.21.154:55236;ob<br>
cseq: 16653<br>
route_set: <sip:172.16.234.85;lr=on;ftag=FMn4o4AlYFAxYTkK89SYVksQbaYTfjvY;did=4ee.fca><br>
socket: udp:172.16.234.89:5060<br>
}<br>
callee: {<br>
tag: as0ef32d6d<br>
contact: sip:39390409828030@172.16.201.101:5060<br>
cseq: 0<br>
route_set: <sip:172.16.234.85;lr=on;ftag=FMn4o4AlYFAxYTkK89SYVksQbaYTfjvY;did=4ee.0da><br>
socket: udp:172.16.234.89:5060<br>
}<br>
profiles: {<br>
}<br>
variables: {<br>
{<br>
ru: sip:39390409828030@carrier1.cloud.evox.it<br>
}<br>
{<br>
du: sip:172.16.234.85:5060<br>
}<br>
{<br>
cgrSupplier: carrier1.cloud.evox.it<br>
}<br>
{<br>
cgrSuppliers: carrier1.cloud.evox.it,carrier2.cloud.evox.it,carrier3.cloud.evox.it<br>
}<br>
{<br>
cgrCallip: 172.16.21.154<br>
}<br>
{<br>
cgrDestination: 39390409828030<br>
}<br>
{<br>
cgrAccount: 0409828030<br>
}<br>
{<br>
cgrTenant: evox.it<br>
}<br>
{<br>
cgrReqType: *prepaid<br>
}<br>
{<br>
calleeNumber: 39390409828030<br>
}<br>
{<br>
au: 0409828030<br>
}<br>
{<br>
authType: subscriber<br>
}<br>
{<br>
cgrSubsystems: "cgr_subsystems":"*resources;*suppliers;*accounts"<br>
}<br>
{<br>
originalSourceIP: 172.16.21.154<br>
}<br>
}<br>
}<br>
<br>
After that I kill that instance (call still ongoing) and the second<br>
one has no dialogs before I call the function  dlg_db_load_callid($ci)<br>
obviously.<br>
After loading the dialog from db (with the function<br>
dlg_db_load_callid) the dialog remains on kamailio even after the call<br>
ended:<br>
<br>
kamcmd> dlg.list<br>
{<br>
h_entry: 3812<br>
h_id: 3301<br>
ref: 2<br>
call-id: 0GqZ1kdvtCKeDrh2l5.ctzGd5tc0KX6G<br>
from_uri: sip:0409828030@proxy.alex.cloud.evox.it<br>
to_uri: sip:390409828030@proxy.alex.cloud.evox.it<br>
state: 4<br>
start_ts: 1523271151<br>
init_ts: 1523271225<br>
end_ts: 0<br>
timeout: 1523271337<br>
lifetime: 187<br>
dflags: 0<br>
sflags: 0<br>
iflags: 1<br>
caller: {<br>
tag: FMn4o4AlYFAxYTkK89SYVksQbaYTfjvY<br>
contact: sip:0409828030@172.16.21.154:55236;ob<br>
cseq: 16653<br>
route_set: <sip:172.16.234.85;lr=on;ftag=FMn4o4AlYFAxYTkK89SYVksQbaYTfjvY;did=4ee.fca><br>
socket:<br>
}<br>
callee: {<br>
tag: as0ef32d6d<br>
contact: sip:39390409828030@172.16.201.101:5060<br>
cseq: 0<br>
route_set: <sip:172.16.234.85;lr=on;ftag=FMn4o4AlYFAxYTkK89SYVksQbaYTfjvY;did=4ee.0da><br>
socket:<br>
}<br>
profiles: {<br>
}<br>
variables: {<br>
{<br>
originalSourceIP: 172.16.21.154<br>
}<br>
{<br>
cgrSubsystems: "cgr_subsystems":"*resources;*suppliers;*accounts"<br>
}<br>
{<br>
authType: subscriber<br>
}<br>
{<br>
au: 0409828030<br>
}<br>
{<br>
calleeNumber: 39390409828030<br>
}<br>
{<br>
cgrReqType: *prepaid<br>
}<br>
{<br>
cgrTenant: evox.it<br>
}<br>
{<br>
cgrAccount: 0409828030<br>
}<br>
{<br>
cgrDestination: 39390409828030<br>
}<br>
{<br>
cgrCallip: 172.16.21.154<br>
}<br>
{<br>
cgrSuppliers: carrier1.cloud.evox.it,carrier2.cloud.evox.it,carrier3.cloud.evox.it<br>
}<br>
{<br>
cgrSupplier: carrier1.cloud.evox.it<br>
}<br>
{<br>
du: sip:172.16.234.85:5060<br>
}<br>
{<br>
ru: sip:39390409828030@carrier1.cloud.evox.it<br>
}<br>
}<br>
}<br>
--<br>
Aleksandar Sošić<br>
alex.sosic(at)gmail<dot>com<br>
<br>
<br>
On Mon, Apr 9, 2018 at 10:41 AM, Daniel-Constantin Mierla<br>
<notifications@github.com> wrote:<br>
> Can you try with latest version and paste again the dialog list rpc output?<br>
> Over the weekend I pushed a patch to print the reference counter value for<br>
> the dialog.<br>
><br>
> Do you use other modules that need dialog?<br>
><br>
> —<br>
> You are receiving this because you were mentioned.<br>
> Reply to this email directly, view it on GitHub, or mute the thread.<br>


<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you commented.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/issues/1274#issuecomment-379713515">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AF36ZQN58txjKdurgljPfoJ3618CpWrTks5tmz6AgaJpZM4QAl53">mute the thread</a>.<img src="https://github.com/notifications/beacon/AF36ZZ0rnMwX5J_ob_g7PoJcO6m2nMqMks5tmz6AgaJpZM4QAl53.gif" height="1" width="1" alt="" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/kamailio/kamailio/issues/1274#issuecomment-379713515"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>

<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/kamailio/kamailio","title":"kamailio/kamailio","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/kamailio/kamailio"}},"updates":{"snippets":[{"icon":"PERSON","message":"@alexsosic in #1274: Hi,\n\nI'm using 5.2.0~dev4+0~20180408010333.1091+xenial now.\nThe dialog without the failover is correctly deleted now:\n\nkamcmd\u003e dlg.list\n{\nh_entry: 93\nh_id: 9163\nref: 2\ncall-id: w6HWT0d6EZaVY3Lt1dIi0auvX1sq7Ctl\nfrom_uri: sip:0409828030@proxy.alex.cloud.evox.it\nto_uri: sip:390409828030@proxy.alex.cloud.evox.it\nstate: 4\nstart_ts: 1523271041\ninit_ts: 1523271041\nend_ts: 0\ntimeout: 1523271228\nlifetime: 187\ndflags: 512\nsflags: 0\niflags: 1\ncaller: {\ntag: 3OHIzRviWKofH8StpnwRPFZhLB8zNs4o\ncontact: sip:0409828030@172.16.21.154:55236;ob\ncseq: 31843\nroute_set: \u003csip:172.16.234.85;lr=on;ftag=3OHIzRviWKofH8StpnwRPFZhLB8zNs4o;did=d5.39a1\u003e\nsocket: udp:172.16.234.89:5060\n}\ncallee: {\ntag: as497536f9\ncontact: sip:39390409828030@172.16.201.101:5060\ncseq: 0\nroute_set: \u003csip:172.16.234.85;lr=on;ftag=3OHIzRviWKofH8StpnwRPFZhLB8zNs4o;did=d5.49a1\u003e\nsocket: udp:172.16.234.89:5060\n}\nprofiles: {\n}\nvariables: {\n{\nru: sip:39390409828030@carrier1.cloud.evox.it\n}\n{\ndu: sip:172.16.234.85:5060\n}\n{\ncgrSupplier: carrier1.cloud.evox.it\n}\n{\ncgrSuppliers: carrier1.cloud.evox.it,carrier2.cloud.evox.it,carrier3.cloud.evox.it\n}\n{\ncgrCallip: 172.16.21.154\n}\n{\ncgrDestination: 39390409828030\n}\n{\ncgrAccount: 0409828030\n}\n{\ncgrTenant: evox.it\n}\n{\ncgrReqType: *prepaid\n}\n{\ncalleeNumber: 39390409828030\n}\n{\nau: 0409828030\n}\n{\nauthType: subscriber\n}\n{\ncgrSubsystems: \"cgr_subsystems\":\"*resources;*suppliers;*accounts\"\n}\n{\noriginalSourceIP: 172.16.21.154\n}\n}\n}\n\nDuring failover the second kamailio istance loads the dialog but than\nit is not deleted and remains in kamailio even after the call ends via\nclient.\n\nThe first instance has this dialog during the call:\nkamcmd\u003e dlg.list\n{\nh_entry: 3812\nh_id: 3301\nref: 3\ncall-id: 0GqZ1kdvtCKeDrh2l5.ctzGd5tc0KX6G\nfrom_uri: sip:0409828030@proxy.alex.cloud.evox.it\nto_uri: sip:390409828030@proxy.alex.cloud.evox.it\nstate: 4\nstart_ts: 1523271151\ninit_ts: 1523271150\nend_ts: 0\ntimeout: 1523271338\nlifetime: 187\ndflags: 512\nsflags: 0\niflags: 1\ncaller: {\ntag: FMn4o4AlYFAxYTkK89SYVksQbaYTfjvY\ncontact: sip:0409828030@172.16.21.154:55236;ob\ncseq: 16653\nroute_set: \u003csip:172.16.234.85;lr=on;ftag=FMn4o4AlYFAxYTkK89SYVksQbaYTfjvY;did=4ee.fca\u003e\nsocket: udp:172.16.234.89:5060\n}\ncallee: {\ntag: as0ef32d6d\ncontact: sip:39390409828030@172.16.201.101:5060\ncseq: 0\nroute_set: \u003csip:172.16.234.85;lr=on;ftag=FMn4o4AlYFAxYTkK89SYVksQbaYTfjvY;did=4ee.0da\u003e\nsocket: udp:172.16.234.89:5060\n}\nprofiles: {\n}\nvariables: {\n{\nru: sip:39390409828030@carrier1.cloud.evox.it\n}\n{\ndu: sip:172.16.234.85:5060\n}\n{\ncgrSupplier: carrier1.cloud.evox.it\n}\n{\ncgrSuppliers: carrier1.cloud.evox.it,carrier2.cloud.evox.it,carrier3.cloud.evox.it\n}\n{\ncgrCallip: 172.16.21.154\n}\n{\ncgrDestination: 39390409828030\n}\n{\ncgrAccount: 0409828030\n}\n{\ncgrTenant: evox.it\n}\n{\ncgrReqType: *prepaid\n}\n{\ncalleeNumber: 39390409828030\n}\n{\nau: 0409828030\n}\n{\nauthType: subscriber\n}\n{\ncgrSubsystems: \"cgr_subsystems\":\"*resources;*suppliers;*accounts\"\n}\n{\noriginalSourceIP: 172.16.21.154\n}\n}\n}\n\nAfter that I kill that instance (call still ongoing) and the second\none has no dialogs before I call the function  dlg_db_load_callid($ci)\nobviously.\nAfter loading the dialog from db (with the function\ndlg_db_load_callid) the dialog remains on kamailio even after the call\nended:\n\nkamcmd\u003e dlg.list\n{\nh_entry: 3812\nh_id: 3301\nref: 2\ncall-id: 0GqZ1kdvtCKeDrh2l5.ctzGd5tc0KX6G\nfrom_uri: sip:0409828030@proxy.alex.cloud.evox.it\nto_uri: sip:390409828030@proxy.alex.cloud.evox.it\nstate: 4\nstart_ts: 1523271151\ninit_ts: 1523271225\nend_ts: 0\ntimeout: 1523271337\nlifetime: 187\ndflags: 0\nsflags: 0\niflags: 1\ncaller: {\ntag: FMn4o4AlYFAxYTkK89SYVksQbaYTfjvY\ncontact: sip:0409828030@172.16.21.154:55236;ob\ncseq: 16653\nroute_set: \u003csip:172.16.234.85;lr=on;ftag=FMn4o4AlYFAxYTkK89SYVksQbaYTfjvY;did=4ee.fca\u003e\nsocket:\n}\ncallee: {\ntag: as0ef32d6d\ncontact: sip:39390409828030@172.16.201.101:5060\ncseq: 0\nroute_set: \u003csip:172.16.234.85;lr=on;ftag=FMn4o4AlYFAxYTkK89SYVksQbaYTfjvY;did=4ee.0da\u003e\nsocket:\n}\nprofiles: {\n}\nvariables: {\n{\noriginalSourceIP: 172.16.21.154\n}\n{\ncgrSubsystems: \"cgr_subsystems\":\"*resources;*suppliers;*accounts\"\n}\n{\nauthType: subscriber\n}\n{\nau: 0409828030\n}\n{\ncalleeNumber: 39390409828030\n}\n{\ncgrReqType: *prepaid\n}\n{\ncgrTenant: evox.it\n}\n{\ncgrAccount: 0409828030\n}\n{\ncgrDestination: 39390409828030\n}\n{\ncgrCallip: 172.16.21.154\n}\n{\ncgrSuppliers: carrier1.cloud.evox.it,carrier2.cloud.evox.it,carrier3.cloud.evox.it\n}\n{\ncgrSupplier: carrier1.cloud.evox.it\n}\n{\ndu: sip:172.16.234.85:5060\n}\n{\nru: sip:39390409828030@carrier1.cloud.evox.it\n}\n}\n}\n--\nAleksandar Sošić\nalex.sosic(at)gmail\u003cdot\u003ecom\n\n\nOn Mon, Apr 9, 2018 at 10:41 AM, Daniel-Constantin Mierla\n\u003cnotifications@github.com\u003e wrote:\n\u003e Can you try with latest version and paste again the dialog list rpc output?\n\u003e Over the weekend I pushed a patch to print the reference counter value for\n\u003e the dialog.\n\u003e\n\u003e Do you use other modules that need dialog?\n\u003e\n\u003e —\n\u003e You are receiving this because you were mentioned.\n\u003e Reply to this email directly, view it on GitHub, or mute the thread.\n"}],"action":{"name":"View Issue","url":"https://github.com/kamailio/kamailio/issues/1274#issuecomment-379713515"}}}</script>