<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
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).<br>
<br>
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.<br>
<br>
Cheers,<br>
Daniel<br>
<br>
<div class="moz-cite-prefix">On 11/11/13 11:36 AM, Oliver Roth
wrote:<br>
</div>
<blockquote
cite="mid:9314C4E9F7F36E4486505CD440491717309D865E@TKEXC-clean.telco.triotel.ch"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<meta name="Generator" content="Microsoft Word 15 (filtered
medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
color:black;
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
pre
{mso-style-priority:99;
mso-style-link:"HTML Vorformatiert Zchn";
margin:0cm;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";
color:black;}
span.E-MailFormatvorlage17
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:windowtext;}
span.HTMLVorformatiertZchn
{mso-style-name:"HTML Vorformatiert Zchn";
mso-style-priority:99;
mso-style-link:"HTML Vorformatiert";
font-family:Consolas;
color:black;
mso-fareast-language:EN-US;}
span.E-MailFormatvorlage20
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal"><span style="color:#1F497D" lang="EN-GB">Sorry
– I didn’t get that …<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D" lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D" lang="EN-GB">We
use Kamailio 3.3.x so xprint is not available (I guess)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D" lang="EN-GB">The
other solution I did not understand.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D" lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D" lang="EN-GB">I
need to get the systemname or the system-ip address Kamailio
is running on.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D" lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">- replace % with %, load
pv and xlog modules, replace selects @name with $sel(name),
avps with $avp(name)</span><span style="color:#1F497D"
lang="EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D" lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D" lang="EN-GB">Can
you make an example how to get the systems ip address / or
name?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D" lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D" lang="EN-GB">Thanks
in advance<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D" lang="EN-GB">Oli<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D" lang="EN-GB"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1
1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span
style="color:windowtext;mso-fareast-language:DE-CH"
lang="DE">Von:</span></b><span
style="color:windowtext;mso-fareast-language:DE-CH"
lang="DE"> <a class="moz-txt-link-abbreviated" href="mailto:sr-users-bounces@lists.sip-router.org">sr-users-bounces@lists.sip-router.org</a>
[<a class="moz-txt-link-freetext" href="mailto:sr-users-bounces@lists.sip-router.org">mailto:sr-users-bounces@lists.sip-router.org</a>]
<b>Im Auftrag von </b>Daniel-Constantin Mierla<br>
<b>Gesendet:</b> Montag, 11. November 2013 08:54<br>
<b>An:</b> Kamailio (SER) - Users Mailing List<br>
<b>Betreff:</b> Re: [SR-Users] implemented specifiers
not processed<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-bottom:12.0pt">Hello,<br>
<br>
you are using the (old) SER-style specfiers. There are two
options:<br>
- replace % with %, load pv and xlog modules, replace selects
@name with $sel(name), avps with $avp(name)<br>
- use xprint module and replace xlog() with appropriate new
function name<br>
<br>
Cheers,<br>
Daniel<span
style="font-size:12.0pt;mso-fareast-language:DE-CH"><o:p></o:p></span></p>
<div>
<p class="MsoNormal">On 11/10/13 1:01 PM, Oliver Roth wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal">Hi all<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"><span
style="color:#1F497D;mso-fareast-language:DE-CH"
lang="EN-GB">Having some problems with the following part
of the script in a timer:</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-GB"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-GB">We have some kamailios
running doing more or less the same job – they are used by
a loadbalancer kamailio.</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-GB">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
</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-GB"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-GB">route[CDRS] {</span><o:p></o:p></p>
<p class="MsoNormal" style="text-indent:35.4pt"><span
lang="EN-GB">sql_query("ca","call kamailio_cdrs()","rb");</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-GB">
sql_query("ca","call kamailio_rating()","rb");</span><o:p></o:p></p>
<p class="MsoNormal" style="text-indent:35.4pt"><span
lang="EN-GB">xlog("timer routine: time is %TF\n");</span><o:p></o:p></p>
<p class="MsoNormal" style="text-indent:35.4pt"><span
lang="EN-GB">xlog("L_ERR", "time [%Tf] method <%rm>
r-uri <%ru> 2nd via <%{via[1]}>\n");</span><o:p></o:p></p>
<p class="MsoNormal" style="text-indent:35.4pt"><span
lang="EN-GB"> </span><o:p></o:p></p>
<p class="MsoNormal" style="text-indent:35.4pt"><span
lang="EN-GB">xlog("L_INFO", "CDRS- rated Host %Hi");</span><o:p></o:p></p>
<p class="MsoNormal" style="text-indent:35.4pt"><span
lang="EN-GB"> </span><o:p></o:p></p>
<p class="MsoNormal" style="text-indent:35.4pt"><span
lang="EN-GB">if %Hi = ipOfGateway1 then do something</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-GB"> else
if %Hi = ipOfGateway2 then do something different</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-GB">}</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-GB"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-GB"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-GB">What I get in log</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-GB"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-GB">Nov 10 12:54:12
sipgw21 /usr/sbin/kamailio[16231]: ERROR: <script>:
timer routine: time is
</span><span style="color:red" lang="EN-GB">%TF</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-GB">Nov 10 12:54:12
sipgw21 /usr/sbin/kamailio[16231]: ERROR: <script>:
time
</span><span style="color:red" lang="EN-GB">[%Tf</span><span
lang="EN-GB">] method <%rm> r-uri <%ru> 2nd
via <%{via[1]}></span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-GB">Nov 10 12:54:24
sipgw21 /usr/sbin/kamailio[16231]: INFO: <script>:
CDRS- rated Host
</span><span style="color:red" lang="EN-GB">%Hi</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-GB"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-GB"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-GB">The %-variables are
not processed … what am I doing wrong??</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-GB"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-GB">Thanks</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-GB">Oli</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-GB"> </span><o:p></o:p></p>
<p class="MsoNormal"><span
style="font-size:12.0pt;font-family:"Times New
Roman","serif";mso-fareast-language:DE-CH"><br>
<br>
<br>
<o:p></o:p></span></p>
<pre>_______________________________________________<o:p></o:p></pre>
<pre>SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<o:p></o:p></pre>
<pre><a moz-do-not-send="true" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><o:p></o:p></pre>
<pre><a moz-do-not-send="true" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><o:p></o:p></pre>
</blockquote>
<p class="MsoNormal"><span
style="font-size:12.0pt;font-family:"Times New
Roman","serif";mso-fareast-language:DE-CH"><br>
<br>
<o:p></o:p></span></p>
<pre>-- <o:p></o:p></pre>
<pre>Daniel-Constantin Mierla - <a moz-do-not-send="true" href="http://www.asipto.com">http://www.asipto.com</a><o:p></o:p></pre>
<pre><a moz-do-not-send="true" href="http://twitter.com/#%21/miconda">http://twitter.com/#!/miconda</a> - <a moz-do-not-send="true" href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a><o:p></o:p></pre>
<pre>Kamailio Advanced Trainings - Berlin, Nov 25-28<o:p></o:p></pre>
<pre> - more details about Kamailio trainings at <a moz-do-not-send="true" href="http://www.asipto.com">http://www.asipto.com</a> -<o:p></o:p></pre>
</div>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla - <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
<a class="moz-txt-link-freetext" href="http://twitter.com/#!/miconda">http://twitter.com/#!/miconda</a> - <a class="moz-txt-link-freetext" href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a>
Kamailio Advanced Trainings - Berlin, Nov 25-28
- more details about Kamailio trainings at <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a> -
</pre>
</body>
</html>