[SR-Users] Re: No access to variables within timer route

2023-11-30 Thread dries--- via sr-users
So the initial idea was to prolonge the expiry of the redis key within the timer. The expiration would be set to a value a bit higher than the timer interval. At each timer iteration, the key would be renewed. That way, if a call teardown occurs because of an unexpected event (so no BYE/CANCEL),

[SR-Users] Re: No access to variables within timer route

2023-11-30 Thread Ben Kaufman via sr-users
ssage- From: dries--- via sr-users Sent: Thursday, November 30, 2023 8:30 AM To: sr-users@lists.kamailio.org Cc: dr...@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 u

[SR-Users] Re: No access to variables within timer route

2023-11-30 Thread dries--- via sr-users
Hi Ben, I'll try my best to explain the use case here. I have a direct trunk between our Asterisk and Kamailio servers. My goal is that when an agent is already in call, he doesn't get prompted with another incoming call on either of his devices. So Asterisk is supposed to perform a redis chec

[SR-Users] Re: No access to variables within timer route

2023-11-30 Thread Ben Kaufman via sr-users
oute). -Original Message- From: dries--- via sr-users Sent: Wednesday, November 29, 2023 3:36 PM To: sr-users@lists.kamailio.org Cc: dr...@degendt.com Subject: [SR-Users] Re: No access to variables within timer route CAUTION: This email originated from outside the organization. Do not cl

[SR-Users] Re: No access to variables within timer route

2023-11-29 Thread dries--- via sr-users
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

[SR-Users] Re: No access to variables within timer route

2023-11-29 Thread Alex Balashov via sr-users
Hi, It is important to know that the scope of $var(...) is per-process[1], and timer functions run in a different process. When REFRESH_CALLSTATE_TIMER runs, it is not in response to any particular SIP message or call, and it does not know the context of any particular SIP message or call.