<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="color:rgb(0,0,0);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="color:rgb(0,0,0);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="color:rgb(0,0,0);white-space:pre-wrap">upon startup.</span></div><div class="gmail_extra"><span style="color:rgb(0,0,0);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 dir="ltr">Am I REALLY the only person who has ever run into this !?</div><div class="gmail_extra"><div><div><br><br><div class="gmail_quote">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>


<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>


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></blockquote></div><br><br clear="all"><div><br></div></div></div><span><font color="#888888">-- <br>Sincerely<br><br>Jay</font></span></div></blockquote></div>
<br><br clear="all"><div><br></div>-- <br>Sincerely<br><br>Jay</div></div>