Discussion:
[SR-Users] Recommendation for toggling MSILO m_store auto-notification reply on/off
Anthony Messina
2014-09-06 00:39:52 UTC
Permalink
Using Kamailio 4.2-dev and MSILO, is it possible to "toggle" the auto-
notification reply MESSAGE using something similar to the following where
"$var(msilo_reply)" is emtpy at startup (or are there suggestions for a better
method):

modparam("msilo", "from_address", "$var(msilo_reply)")
...

if(CONDITION WHERE I WANT THE AUTO-REPLY RETURNS POSITIVE) {
$var(msilo_reply)="$rU-***@public.gmane.org";
}
m_store($rU)
...


My use case is that I would like the auto-notification reply to occur in some
instances, but not others. I also do not want to create a loop where the
auto-notification replies are also stored. I was originally using a simple
test: if(src_ip!=myself), but I have begun to use the IMC module as well as
the EXEC module and these MESSAGEs appear to originate from "myself."

Looking at the MSILO documentation I see there is "extra_hdrs(string)," but
this appears to be designed to add headers to dumped MESSAGEs. I was hoping
there would be a way to add a custom header to the auto-notification, on which
I could filter/drop generated replies earlier in the route, but it doesn't
appear that this exists.

My preference for the best-case scenario would be to control the generation of
the auto-notification reply in the first place rather than having to add a
control to detect the reply and drop it.

Thanks in advance for any recommendations.
--
Anthony - https://messinet.com/ - https://messinet.com/~amessina/gallery
8F89 5E72 8DF0 BCF0 10BE 9967 92DC 35DC B001 4A4E
Daniel-Constantin Mierla
2014-09-08 13:04:38 UTC
Permalink
I don't recall any commit adding such feature, but should be easy to add
a new parameter to m_store() to control this behaviour -- it requires
writing some c code, though.

Cheers,
Daniel
Post by Anthony Messina
Using Kamailio 4.2-dev and MSILO, is it possible to "toggle" the auto-
notification reply MESSAGE using something similar to the following where
"$var(msilo_reply)" is emtpy at startup (or are there suggestions for a better
modparam("msilo", "from_address", "$var(msilo_reply)")
...
if(CONDITION WHERE I WANT THE AUTO-REPLY RETURNS POSITIVE) {
}
m_store($rU)
...
My use case is that I would like the auto-notification reply to occur in some
instances, but not others. I also do not want to create a loop where the
auto-notification replies are also stored. I was originally using a simple
test: if(src_ip!=myself), but I have begun to use the IMC module as well as
the EXEC module and these MESSAGEs appear to originate from "myself."
Looking at the MSILO documentation I see there is "extra_hdrs(string)," but
this appears to be designed to add headers to dumped MESSAGEs. I was hoping
there would be a way to add a custom header to the auto-notification, on which
I could filter/drop generated replies earlier in the route, but it doesn't
appear that this exists.
My preference for the best-case scenario would be to control the generation of
the auto-notification reply in the first place rather than having to add a
control to detect the reply and drop it.
Thanks in advance for any recommendations.
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
--
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Next Kamailio Advanced Trainings 2014 - http://www.asipto.com
Sep 22-25, Berlin, Germany
Anthony Messina
2014-09-08 22:01:50 UTC
Permalink
I don't recall any commit adding such feature, but should be easy to add a
new parameter to m_store() to control this behaviour -- it requires writing
some c code, though.
Cheers,
Daniel
Using Kamailio 4.2-dev and MSILO, is it possible to "toggle" the auto-
notification reply MESSAGE using something similar to the following where
"$var(msilo_reply)" is emtpy at startup (or are there suggestions for a
modparam("msilo", "from_address", "$var(msilo_reply)")
...
if(CONDITION WHERE I WANT THE AUTO-REPLY RETURNS POSITIVE) {
}
m_store($rU)
...
Thanks, Daniel. In the mean time, is it possible to alter the setting of a
modparam at runtime as I suggested above? Or is *this* the ability that must
be coded?
--
Anthony - https://messinet.com/ - https://messinet.com/~amessina/gallery
8F89 5E72 8DF0 BCF0 10BE 9967 92DC 35DC B001 4A4E
Loading...