[OpenSIPS-Users] $avp and MESSAGE
Flavio Goncalves
flavio at asteriskguide.com
Thu Jan 3 10:36:23 CET 2013
Hi
AVPs are tied to transactions, after the processing the avp is cleaned, you
can't test for duplicate messages in this way. I suggest you check the core
functions cache_store() and cache_fetch(). You can save in memory the
call-id of each message ($ci) and if it is duplicated, drop.
Flavio E. Goncalves
2013/1/1 Dragomir Haralambiev <goup2010 at gmail.com>
> Hello,
>
> My opensips receive a lot of a same messages.
> I try to fix this with follow part of script.
> Why not working?
>
> if (is_method("MESSAGE")) {
>
> if ( $avp(receive_message) == $ci ) {
> xlog("L_ERR", "I receive already this MESSAGE");
> exit;
> }
> $avp(receive_message) = $ci;
> .............................
> }
>
> Regards,
> PlayMen
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20130103/890b6e90/attachment.htm>
More information about the Users
mailing list