Ohh, my mistake, I wanted to say to replace % with $. But $Hi is not
available, but I guess is the same as $Ri (local ip where the sip
message was received, on which kamailio is listening).
For older versions, you can load xlog from modules_s instead from
modules_k and keep %. From v4.0, modules_s/xlog became modules/xprint.
Cheers,
Daniel
On 11/11/13 11:36 AM, Oliver Roth wrote:
Sorry -- I didn't get that ...
We use Kamailio 3.3.x so xprint is not available (I guess)
The other solution I did not understand.
I need to get the systemname or the system-ip address Kamailio is
running on.
- replace % with %, load pv and xlog modules, replace selects @name
with $sel(name), avps with $avp(name)
Can you make an example how to get the systems ip address / or name?
Thanks in advance
Oli
*Von:*sr-users-bounces@lists.sip-router.org
[mailto:sr-users-bounces@lists.sip-router.org] *Im Auftrag von
*Daniel-Constantin Mierla
*Gesendet:* Montag, 11. November 2013 08:54
*An:* Kamailio (SER) - Users Mailing List
*Betreff:* Re: [SR-Users] implemented specifiers not processed
Hello,
you are using the (old) SER-style specfiers. There are two options:
- replace % with %, load pv and xlog modules, replace selects @name
with $sel(name), avps with $avp(name)
- use xprint module and replace xlog() with appropriate new function name
Cheers,
Daniel
On 11/10/13 1:01 PM, Oliver Roth wrote:
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
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users(a)lists.sip-router.org <mailto:sr-users@lists.sip-router.org>
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
--
Daniel-Constantin Mierla -http://www.asipto.com
http://twitter.com/#!/miconda <http://twitter.com/#%21/miconda>
-http://www.linkedin.com/in/miconda
Kamailio Advanced Trainings - Berlin, Nov 25-28
- more details about Kamailio trainings
athttp://www.asipto.com -
--
Daniel-Constantin Mierla -
http://www.asipto.com
http://twitter.com/#!/miconda -
http://www.linkedin.com/in/miconda
Kamailio Advanced Trainings - Berlin, Nov 25-28
- more details about Kamailio trainings at
http://www.asipto.com -