I tried to skip topos stripping based on R-URI hostpart like this:
event_route[topos:msg-outgoing] {
xinfo("******** at topos:msg-outgoing with $rd\n"); if ($rd == "example.com") drop; }
and got this to syslog:
Mar 2 18:35:59 lab /usr/bin/sip-proxy[22441]: INFO: <script>: ******** at topos:msg-outgoing with kamailio.org
Where does $rd == kamailio.org come from, since R-URI hostpart of the request does not have that domain?
Or is it so that $rd cannot be used in that event route?
-- Juha
That's a route block executed with an internal sip request. There is another one with the request to be sent out, see the readme of the module.
Cheers, Daniel
On 02.03.21 17:40, Juha Heinanen wrote:
I tried to skip topos stripping based on R-URI hostpart like this:
event_route[topos:msg-outgoing] {
xinfo("******** at topos:msg-outgoing with $rd\n"); if ($rd == "example.com") drop;
}
and got this to syslog:
Mar 2 18:35:59 lab /usr/bin/sip-proxy[22441]: INFO: <script>: ******** at topos:msg-outgoing with kamailio.org
Where does $rd == kamailio.org come from, since R-URI hostpart of the request does not have that domain?
Or is it so that $rd cannot be used in that event route?
-- Juha
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Daniel-Constantin Mierla writes:
That's a route block executed with an internal sip request. There is another one with the request to be sent out, see the readme of the module.
I had read README and also had corresponding
event_route[topos:msg-sending] { xinfo("******** at topos:msg-sending with $rd\n"); if ($rd == "example.com") drop; }
but did not get any topos:msg-sending messages to syslog.
According to README the default is that both of them are executed:
3.9. event_mode (int)
Control what event_route blocks to be executed. It is a bitmask of: 1 - execute event_route[topos:outgoing]; 2 - execute event_route[topos:sending].
Default value is 3 (execute both event_route blocks).
-- Juha
I added
modparam("topos", "event_mode", 2)
and now event_route[topos:msg-sending] got executed with read $rd.
So looks like README has a bug in it.
-- Juha
The code initialize the parameter to execute both of them. Do you still have the outgoing event route in config? If yes, check maybe it does a drop.
Cheers,
daniel
On 02.03.21 18:55, Juha Heinanen wrote:
I added
modparam("topos", "event_mode", 2)
and now event_route[topos:msg-sending] got executed with read $rd.
So looks like README has a bug in it.
-- Juha
Daniel-Constantin Mierla writes:
The code initialize the parameter to execute both of them. Do you still have the outgoing event route in config? If yes, check maybe it does a drop.
I did the test again and now I got both messages to syslog when event_mode is not set:
Mar 3 13:35:44 lab sip-proxy[9986]: INFO: {1 48073 INVITE ed856c31330d068e} <script>: ******** at topos:msg-outgoing Mar 3 13:35:44 lab sip-proxy[9986]: INFO: {1 48073 INVITE ed856c31330d068e} <script>: ******** at topos:msg-sending
So something must have been wrong in yesterday's test.
-- Juha