[OpenSIPS-Devel] calculating of hash_id in dialog module

Alex Massover alex at jajah.com
Thu Sep 4 09:30:14 CEST 2008


Hi Bogdan!

We need a hash_entry:hash_id pair to disconnect calls with dlg_end_dlg(). But for a big installation parsing the output of MI command is super slow, because we need to parse the whole list of dialogs.
DB table is better, but also it's a huge overhead. Currently we use DB but looking for a smother way.

For example calculating hash_entry:hash_id from external application will be good enough for us.
We are able to calculate hash_entry using core_hash() (writing a small program in C that #include[s] "hash_func.h" from OpenSIPS source), but wonder if there's a way to calculate hash_id based on callid, to_tag and from_tag or hash_id also depend on some internal states of hash table, so it's impossible to calculate it from external application?

For a long term maybe it worth to export hash_entry:hash_id pair to the config file with pseudo-variable (I think dialog module even writes hash_entry:hash_id to the debug log)? Or any other simple way to get it for future use? IMHO it's strange that dialog module exports dlg_end_dlg(), but it requires using a DB and making queries to find out the input parameters.

--
Best Regards,
Alex Massover

-----Original Message-----
From: devel-bounces at lists.opensips.org [mailto:devel-bounces at lists.opensips.org] On Behalf Of Bogdan-Andrei Iancu
Sent: Wednesday, September 03, 2008 9:11 PM
To: Dror Wald
Cc: devel at lists.opensips.org
Subject: Re: [OpenSIPS-Devel] calculating of hash_id in dialog module

Hi Dror,

the algorithm to calculate the hash is a bit complicated to be fast
described.
May i ask why do you need to do this?  because you can take this info
from DB table or MI command.

Regards,
Bogdan



 
 
************************************************************************************
This footnote confirms that this email message has been scanned by
PineApp Mail-SeCure for the presence of malicious code, vandals & computer viruses.
************************************************************************************






More information about the Devel mailing list