<div dir="ltr">I would suggest that you change the DBMS to something a little less complicated than Cassandra, MySQL for example, make your tests again and see if you can reproduce this.<div><br></div><div>In case you can't, and you get to work everything with the DBMS you chose, it would mean that you have found a bug in the cassandra module.</div>
<div><br></div><div>I personally have been experimenting with db_cassandra, and it works quite well for some scenarios, and it does not at all for others. Also, take into account that you can't really maintain the Kamailio tables using the built-in scripts (kamctl) when using Cassandra as a backend. It does not work because Cassandra uses CQL that resembles SQL, but has a very limited functionality and they look alike only syntactically. </div>
<div><br></div><div>Regards,</div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Feb 24, 2014 at 7:19 AM, jay binks <span dir="ltr"><<a href="mailto:jaybinks@gmail.com" target="_blank">jaybinks@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">So poking round the code for the dialog module....  <div>Im not sure what im missing here.</div><div><br>
</div><div><br></div><div>get_profile_size dosnt care bout the state of a dialog... so you get ALL dialogs that are in the hash table.<br>

</div><div class="gmail_extra">( which is interesting if you want to use dialog module to enforce channel limits etc )</div><div class="gmail_extra"><br></div><div class="gmail_extra">So you go... OK...  kamailio only expects to have "ACTIVE" dialogs in the hash table... kewl..</div>


<div class="gmail_extra">lets assume that to be the case.</div><div class="gmail_extra"><br></div><div class="gmail_extra">but then in dlg_db_handler.c , <span style="white-space:pre-wrap">load_dialog_info_from_db loads all dialogs from the DB, regardless of state.</span></div>


<div class="gmail_extra"><span style="white-space:pre-wrap">so all dialogs in the DB ( ones that didnt get deleted yet... but were in state 5 ) get re-created in kamailio</span></div><div class="gmail_extra">

<span style="white-space:pre-wrap">upon startup.</span></div><div class="gmail_extra"><span style="white-space:pre-wrap"><br></span></div><div class="gmail_extra">what this means is...</div>

<div class="gmail_extra">( assume starting with empty DB )</div><div class="gmail_extra"><br></div><div class="gmail_extra">I start kamailio, make some calls... they get synced to the DB.</div><div class="gmail_extra">I end the calls,  kamailio removes from dialogs module internal hash, but the sync to DB hasnt happened yet.</div>


<div class="gmail_extra"><br></div><div class="gmail_extra">I kill kamailio ( or crash .. whatever )....  restart kamailio and it re-loads all those dialogs</div><div class="gmail_extra">and thinks they are still active calls.</div>


<div class="gmail_extra"><br></div><div class="gmail_extra">Im SURE Im missing something here, because it seems to be VERY common to use dialogs for channel limiting..</div><div class="gmail_extra">maybe not so much using cassandra db behind the scenes, but as of yet ... Im still yet to find anything that makes me thing this is db_cassandra mis-behaving.</div>


<div class="gmail_extra"><br></div><div class="gmail_extra">if im wrong, please point me in the right direction.</div><div class="gmail_extra"><br></div><div class="gmail_extra">Jay</div><div class="gmail_extra"><br></div>


<div class="gmail_extra"><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On 24 February 2014 17:54, jay binks <span dir="ltr"><<a href="mailto:jaybinks@gmail.com" target="_blank">jaybinks@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div class="">


<div dir="ltr">Am I REALLY the only person who has ever run into this !?</div></div><div class="gmail_extra"><div><div><br><br><div class="gmail_quote"><div class="">On 19 February 2014 14:08, jay binks <span dir="ltr"><<a href="mailto:jaybinks@gmail.com" target="_blank">jaybinks@gmail.com</a>></span> wrote:<br>



</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">Hi all, im using the dialog module with db_cassandra backend..<div>
<div class="h5"><div>


I dont believe this issue is related to cassandra, but its worth mentioning anyways.</div><div><br></div><div>so... I run kamailio, make calls, see dialogs in the DB..</div><div>and I Can use "kamctl mi dlg_list" and see that dialogs go away when I hangup a call..</div>



<div><br></div><div>When I query the DB Backend, I still see the queries, but they have a state of 5.</div><div>I Initially thought this was a bug, but it seems dialogs in state 5 get cleaned up after a period.</div><div>



so I moved on.<br></div><div><br></div><div>now , lets restart kamailio..</div><div>kamailio loads all dialogs on startup, after kamailio starts I call "kamctl mi dlg_list" again, and it shows all my dialogs from the DB.   they DO show as "State 5"</div>



<div>but for some reason, these dialogs appear to stick around for a long time, and the bigger issue it causes me is that my channel limiting ( using get_profile_size ) seems to consider these dialogs ( in state 5 ) as being active calls.  </div>



<div><br></div><div>Please someone point me in the right direction... :)</div><div><br></div><div>what am I doing wrong ?</div><div>( or is this a bug somewhere )</div><div><br></div><div>Sincerely<font color="#888888"><br>



</font></div><font color="#888888"><br>Jay</font></div></div></div></blockquote></div><br><br clear="all"><span class="HOEnZb"><font color="#888888"><div><br></div></font></span></div></div><span class="HOEnZb"><font color="#888888"><span><font color="#888888">-- <br>
Sincerely<br><br>Jay</font></span></font></span></div></blockquote></div><span class="HOEnZb"><font color="#888888">
<br><br clear="all"><div><br></div>-- <br>Sincerely<br><br>Jay</font></span></div></div>
<br>_______________________________________________<br>
sr-dev mailing list<br>
<a href="mailto:sr-dev@lists.sip-router.org">sr-dev@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>Carlos<div><a href="http://caruizdiaz.com" target="_blank">http://caruizdiaz.com</a></div><div>+595981146623</div>
</div>