<div dir="ltr"><div>Hello Henning,</div><div>I looked at htable and usrloc modules, I just got some ideas from them. It seems good. I could implement fork_sync_timer in my module and do some specific process in interval times. That's greats.</div><div>Thank you again.</div><div>With Best Regards. Mojtaba<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Jan 20, 2019 at 11:24 PM Mojtaba <<a href="mailto:mespio@gmail.com">mespio@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><div dir="auto"></div>Sure. I just thought i would keep the list.<div dir="auto">I will look around it to give some ideas.</div><div dir="auto">Thanks again<br><div class="gmail_quote" dir="auto"><div dir="ltr">On Sun, 20 Jan 2019, 23:15 Henning Westerholt, <<a href="mailto:hw@kamailio.org" rel="noreferrer noreferrer" target="_blank">hw@kamailio.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Am Sonntag, 20. Januar 2019, 17:57:33 CET schrieb Mojtaba:<br>
> Hello Henning,<br>
> <br>
> Thank you for replying.Sure. It would be useful. Thanks<br>
> Using htable module is good idea, But if i want not to use htable module<br>
> and save part of SIP Messagre in memory , How do i impelement auto-expire<br>
> after afew time?<br>
> With regards.<br>
<br>
Hello Mojtaba,<br>
<br>
please keep the list in CC.<br>
<br>
The htable module support this memory storage and also auto-expiration out of <br>
the box. :-)<br>
<br>
You can find (a bit complicated) example in the usrloc module. A starting <br>
point for the expiration logic can be the delete_ucontact(..) function there. <br>
You need to store the SIP message data in a proper data structure like a list <br>
or a hash table.<br>
<br>
Best regards,<br>
<br>
Henning<br>
<br>
> On Sun, 20 Jan 2019, 18:47 Henning Westerholt, <<a href="mailto:hw@kamailio.org" rel="noreferrer noreferrer noreferrer" target="_blank">hw@kamailio.org</a>> wrote:<br>
> > Am Samstag, 19. Januar 2019, 10:43:09 CET schrieb Mojtaba:<br>
> > > Sorry for my mistake in subject!<br>
> > > "Give me suggestions for module implementation", anyway,<br>
> > > Give me suggestions for duplication detection algorithm?<br>
> > <br>
> > Hello Mojtaba,<br>
> > <br>
> > just to give you an idea: you can access and store parts of the message in<br>
> > memory with e.g. the htable module. Then you can compare it during the<br>
> > route<br>
> > block with the new incoming message and reject it.<br>
> > <br>
> > I found this old discussion thread about a similar topic:<br>
> > <a href="https://lists.kamailio.org/pipermail/users/2009-February/021906.html" rel="noreferrer noreferrer noreferrer noreferrer" target="_blank">https://lists.kamailio.org/pipermail/users/2009-February/021906.html</a><br>
> > <br>
> > You can of course also implement this in a module, but in this case it<br>
> > would<br>
> > not be necessary.<br>
> > <br>
> > Maybe this is helpful for your as well.<br>
<br>
-- <br>
Henning Westerholt - <a href="https://skalatan.de/blog/" rel="noreferrer noreferrer noreferrer noreferrer" target="_blank">https://skalatan.de/blog/</a><br>
Kamailio services - <a href="https://skalatan.de/services" rel="noreferrer noreferrer noreferrer noreferrer" target="_blank">https://skalatan.de/services</a><br>
Kamailio security assessment - <a href="https://skalatan.de/de/assessment" rel="noreferrer noreferrer noreferrer noreferrer" target="_blank">https://skalatan.de/de/assessment</a><br>
</blockquote></div></div></div>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature">--Mojtaba Esfandiari.S</div>