Following up here. Shouldn't event_route[tm:local-response] be executed for every
locally generated request, not just the first few after Kamailio start?
Kaufman
From: Kaufman <bkaufman(a)bcmone.com>
Sent: Wednesday, July 5, 2023 11:14 AM
To: Kamailio (SER) - Users Mailing List <sr-users(a)lists.kamailio.org>
Subject: [SR-Users] event_route[tm:local-response] only executes a few times
CAUTION: This email originated from outside the organization. Do not click links or open
attachments unless you recognize the sender and know the content is safe.
Hello,
I'm writing a 302 redirect server and wanting to capture some events on all replies,
so I'm trying to do this in event_route[tm:local-response], but I noticed that the
event route is only called a few times for the first few requests, and then never gets
executed again. This is the simplest case in which I can reproduce the issue:
#!KAMAILIO
loadmodule "pv"
loadmodule "tm"
loadmodule "xlog"
route {
xinfo("[$rm $ci-$cs] Src:[$si:$sp] RURI:[$ru] To:[$tu] From:[$fu]\n");
t_send_reply("404", "Not Found");
exit;
}
event_route[tm:local-response] {
xcrit("[$rm $ci-$cs] tm:local-response replied locally\n");
}
If I start Kamailio with kamailio -ddDDeE it has 8 children. If I use sipp to send 10
requests, this is what I see in the kamailio logs. The critical line in the event route is
only printed four times. This is tested on 5.7.0 and 5.6.4
9(66) INFO: <script>: [INVITE 1-14@172.26.0.3-1<mailto:1-14@172.26.0.3-1>]
Src:[172.26.0.3:5060] RURI:[sip:service@172.26.0.2:5060] To:[sip:service@172.26.0.2:5060]
From:[sip:sipp@172.26.0.3:5060]
9(66) CRITICAL: <script>: [INVITE 1-14@172.26.0.3-1<mailto:1-14@172.26.0.3-1>]
tm:local-response replied locally
10(67) INFO: <script>: [ACK 1-14@172.26.0.3-1<mailto:1-14@172.26.0.3-1>]
Src:[172.26.0.3:5060] RURI:[sip:service@172.26.0.2:5060] To:[sip:service@172.26.0.2:5060]
From:[sip:sipp@172.26.0.3:5060]
11(68) INFO: <script>: [INVITE 2-14@172.26.0.3-1<mailto:2-14@172.26.0.3-1>]
Src:[172.26.0.3:5060] RURI:[sip:service@172.26.0.2:5060] To:[sip:service@172.26.0.2:5060]
From:[sip:sipp@172.26.0.3:5060]
11(68) CRITICAL: <script>: [INVITE
2-14@172.26.0.3-1<mailto:2-14@172.26.0.3-1>] tm:local-response replied locally
12(69) INFO: <script>: [ACK 2-14@172.26.0.3-1<mailto:2-14@172.26.0.3-1>]
Src:[172.26.0.3:5060] RURI:[sip:service@172.26.0.2:5060] To:[sip:service@172.26.0.2:5060]
From:[sip:sipp@172.26.0.3:5060]
13(70) INFO: <script>: [INVITE 3-14@172.26.0.3-1<mailto:3-14@172.26.0.3-1>]
Src:[172.26.0.3:5060] RURI:[sip:service@172.26.0.2:5060] To:[sip:service@172.26.0.2:5060]
From:[sip:sipp@172.26.0.3:5060]
13(70) CRITICAL: <script>: [INVITE
3-14@172.26.0.3-1<mailto:3-14@172.26.0.3-1>] tm:local-response replied locally
14(71) INFO: <script>: [ACK 3-14@172.26.0.3-1<mailto:3-14@172.26.0.3-1>]
Src:[172.26.0.3:5060] RURI:[sip:service@172.26.0.2:5060] To:[sip:service@172.26.0.2:5060]
From:[sip:sipp@172.26.0.3:5060]
15(72) INFO: <script>: [INVITE 4-14@172.26.0.3-1<mailto:4-14@172.26.0.3-1>]
Src:[172.26.0.3:5060] RURI:[sip:service@172.26.0.2:5060] To:[sip:service@172.26.0.2:5060]
From:[sip:sipp@172.26.0.3:5060]
15(72) CRITICAL: <script>: [INVITE
4-14@172.26.0.3-1<mailto:4-14@172.26.0.3-1>] tm:local-response replied locally
16(73) INFO: <script>: [ACK 4-14@172.26.0.3-1<mailto:4-14@172.26.0.3-1>]
Src:[172.26.0.3:5060] RURI:[sip:service@172.26.0.2:5060] To:[sip:service@172.26.0.2:5060]
From:[sip:sipp@172.26.0.3:5060]
9(66) INFO: <script>: [INVITE 5-14@172.26.0.3-1<mailto:5-14@172.26.0.3-1>]
Src:[172.26.0.3:5060] RURI:[sip:service@172.26.0.2:5060] To:[sip:service@172.26.0.2:5060]
From:[sip:sipp@172.26.0.3:5060]
10(67) INFO: <script>: [ACK 5-14@172.26.0.3-1<mailto:5-14@172.26.0.3-1>]
Src:[172.26.0.3:5060] RURI:[sip:service@172.26.0.2:5060] To:[sip:service@172.26.0.2:5060]
From:[sip:sipp@172.26.0.3:5060]
11(68) INFO: <script>: [INVITE 6-14@172.26.0.3-1<mailto:6-14@172.26.0.3-1>]
Src:[172.26.0.3:5060] RURI:[sip:service@172.26.0.2:5060] To:[sip:service@172.26.0.2:5060]
From:[sip:sipp@172.26.0.3:5060]
12(69) INFO: <script>: [ACK 6-14@172.26.0.3-1<mailto:6-14@172.26.0.3-1>]
Src:[172.26.0.3:5060] RURI:[sip:service@172.26.0.2:5060] To:[sip:service@172.26.0.2:5060]
From:[sip:sipp@172.26.0.3:5060]
13(70) INFO: <script>: [INVITE 7-14@172.26.0.3-1<mailto:7-14@172.26.0.3-1>]
Src:[172.26.0.3:5060] RURI:[sip:service@172.26.0.2:5060] To:[sip:service@172.26.0.2:5060]
From:[sip:sipp@172.26.0.3:5060]
14(71) INFO: <script>: [ACK 7-14@172.26.0.3-1<mailto:7-14@172.26.0.3-1>]
Src:[172.26.0.3:5060] RURI:[sip:service@172.26.0.2:5060] To:[sip:service@172.26.0.2:5060]
From:[sip:sipp@172.26.0.3:5060]
15(72) INFO: <script>: [INVITE 8-14@172.26.0.3-1<mailto:8-14@172.26.0.3-1>]
Src:[172.26.0.3:5060] RURI:[sip:service@172.26.0.2:5060] To:[sip:service@172.26.0.2:5060]
From:[sip:sipp@172.26.0.3:5060]
16(73) INFO: <script>: [ACK 8-14@172.26.0.3-1<mailto:8-14@172.26.0.3-1>]
Src:[172.26.0.3:5060] RURI:[sip:service@172.26.0.2:5060] To:[sip:service@172.26.0.2:5060]
From:[sip:sipp@172.26.0.3:5060]
9(66) INFO: <script>: [INVITE 9-14@172.26.0.3-1<mailto:9-14@172.26.0.3-1>]
Src:[172.26.0.3:5060] RURI:[sip:service@172.26.0.2:5060] To:[sip:service@172.26.0.2:5060]
From:[sip:sipp@172.26.0.3:5060]
10(67) INFO: <script>: [ACK 9-14@172.26.0.3-1<mailto:9-14@172.26.0.3-1>]
Src:[172.26.0.3:5060] RURI:[sip:service@172.26.0.2:5060] To:[sip:service@172.26.0.2:5060]
From:[sip:sipp@172.26.0.3:5060]
11(68) INFO: <script>: [INVITE 10-14@172.26.0.3-1<mailto:10-14@172.26.0.3-1>]
Src:[172.26.0.3:5060] RURI:[sip:service@172.26.0.2:5060] To:[sip:service@172.26.0.2:5060]
From:[sip:sipp@172.26.0.3:5060]
12(69) INFO: <script>: [ACK 10-14@172.26.0.3-1<mailto:10-14@172.26.0.3-1>]
Src:[172.26.0.3:5060] RURI:[sip:service@172.26.0.2:5060] To:[sip:service@172.26.0.2:5060]
From:[sip:sipp@172.26.0.3:5060]
Kaufman