From the rtimer documentation overview:
The module executes route blocks on a timer base. It
can create new timer processes and execute many route blocks on same timer.
A static faked SIP message is given as parameter to called functions, so all functions
available for REQUEST_ROUTE can be used.
It runs in it's own processes, and as Alex noted $var() is per process. It's not
clear if the process re-spawns so setting a variable inside the timer action will be
retained through multiple executions or not.
As for $avp()s, along with $xavp()s and their assorted variants, these are scoped to a SIP
transaction, and the timer shouldn't be handling a transaction.
Shared variables and hashtables should be available inside this route, though.
It might be good to clarify what your goal is (why you expect the variables to have values
in this route).
-----Original Message-----
From: dries--- via sr-users <sr-users(a)lists.kamailio.org>
Sent: Wednesday, November 29, 2023 3:36 PM
To: sr-users(a)lists.kamailio.org
Cc: dries(a)degendt.com
Subject: [SR-Users] Re: No access to variables within timer route
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.
Sorry, please ignore the variable name typo in the "REFRESH_CALLSTATE_TIMER"
route in my initial post.
The issue still stands however.
route[REFRESH_CALLSTATE_TIMER] {
xlog("L_INFO", "Testvariable: $var(testvar)\n"); }
I've also tried enabling the timer on start as well as attempting to use $avp
instead. All called variables within the route are either 0 or null?
__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions To unsubscribe send an email to
sr-users-leave(a)lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the sender!
Edit mailing list options or unsubscribe: