[sr-dev] Give me a suggest for module implementation

Mojtaba mespio at gmail.com
Mon Jan 21 11:28:15 CET 2019


Hello Henning,
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.
Thank you again.
With Best Regards. Mojtaba

On Sun, Jan 20, 2019 at 11:24 PM Mojtaba <mespio at gmail.com> wrote:

> Sure. I just thought i would keep the list.
> I will look around it to give some ideas.
> Thanks again
> On Sun, 20 Jan 2019, 23:15 Henning Westerholt, <hw at kamailio.org> wrote:
>
>> Am Sonntag, 20. Januar 2019, 17:57:33 CET schrieb Mojtaba:
>> > Hello Henning,
>> >
>> > Thank you for replying.Sure. It would be useful. Thanks
>> > Using htable module is good idea, But if i want not to use htable module
>> > and save part of SIP Messagre in memory , How do i impelement
>> auto-expire
>> > after afew time?
>> > With regards.
>>
>> Hello Mojtaba,
>>
>> please keep the list in CC.
>>
>> The htable module support this memory storage and also auto-expiration
>> out of
>> the box. :-)
>>
>> You can find (a bit complicated) example in the usrloc module. A starting
>> point for the expiration logic can be the delete_ucontact(..) function
>> there.
>> You need to store the SIP message data in a proper data structure like a
>> list
>> or a hash table.
>>
>> Best regards,
>>
>> Henning
>>
>> > On Sun, 20 Jan 2019, 18:47 Henning Westerholt, <hw at kamailio.org> wrote:
>> > > Am Samstag, 19. Januar 2019, 10:43:09 CET schrieb Mojtaba:
>> > > > Sorry for my mistake in subject!
>> > > > "Give me suggestions for module implementation", anyway,
>> > > > Give me suggestions for duplication detection algorithm?
>> > >
>> > > Hello Mojtaba,
>> > >
>> > > just to give you an idea: you can access and store parts of the
>> message in
>> > > memory with e.g. the htable module. Then you can compare it during the
>> > > route
>> > > block with the new incoming message and reject it.
>> > >
>> > > I found this old discussion thread about a similar topic:
>> > > https://lists.kamailio.org/pipermail/users/2009-February/021906.html
>> > >
>> > > You can of course also implement this in a module, but in this case it
>> > > would
>> > > not be necessary.
>> > >
>> > > Maybe this is helpful for your as well.
>>
>> --
>> Henning Westerholt - https://skalatan.de/blog/
>> Kamailio services - https://skalatan.de/services
>> Kamailio security assessment - https://skalatan.de/de/assessment
>>
>

-- 
--Mojtaba Esfandiari.S
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20190121/91704f53/attachment.html>


More information about the sr-dev mailing list