Hi all
Having some problems with the following part of the script in a timer:
We have some kamailios running doing more or less the same job - they are used by a loadbalancer kamailio. Actually I wanted to check the ip or systemname of the current system do perform some actions depending on the used kamailio - based on a timer
route[CDRS] { sql_query("ca","call kamailio_cdrs()","rb"); sql_query("ca","call kamailio_rating()","rb"); xlog("timer routine: time is %TF\n"); xlog("L_ERR", "time [%Tf] method <%rm> r-uri <%ru> 2nd via <%{via[1]}>\n");
xlog("L_INFO", "CDRS- rated Host %Hi");
if %Hi = ipOfGateway1 then do something else if %Hi = ipOfGateway2 then do something different }
What I get in log
Nov 10 12:54:12 sipgw21 /usr/sbin/kamailio[16231]: ERROR: <script>: timer routine: time is %TF Nov 10 12:54:12 sipgw21 /usr/sbin/kamailio[16231]: ERROR: <script>: time [%Tf] method <%rm> r-uri <%ru> 2nd via <%{via[1]}> Nov 10 12:54:24 sipgw21 /usr/sbin/kamailio[16231]: INFO: <script>: CDRS- rated Host %Hi
The %-variables are not processed ... what am I doing wrong??
Thanks Oli