[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openser-users
Subject:    Re: [SR-Users] Not working : Using $cfg(line) to print line number
From:       Denys Pozniak <denys.pozniak () gmail ! com>
Date:       2019-11-29 11:49:51
Message-ID: CA+x3AxppjaDoH=d3-7n-TtiSLkDtt+vGVxysekt7DvGYMdNCxA () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hello!
I think you missed corex module.

пт, 29 нояб. 2019 г. в 13:35, mahesh b <mahesh.b.2487@gmail.com>:

> Hi All,
>          Below is the syntax am using to print the line number in kamailio
> configuration file.
>
>  xlog("L_WARN","Hi Mahesh at line $cfg(line)\n");
>
> Unfortunately , when i do this looks like kamailio is not starting, Any
> help please regarding what am i missing here. I tried Xlogl as well, which
> doesnt print the line number by default in my setup.
>
>
> This is the details i had read to understand config file attributes :
>
> $cfg(key) - Config File Attributes
>
> Attributes related to configuration file.
>
> The key can be:
>
>    - line - return the current line in config
>    - name - return the name of current config file
>    - file - return the name of current config file
>    - route - return the name of routing block
>
> Example:
>
> send_reply("404", "Not found at line $cfg(line)")
>
> _______________________________________________
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>


-- 

BR,
Denys Pozniak

[Attachment #5 (text/html)]

<div dir="ltr">Hello!<div>I think you missed corex module.<br></div></div><br><div \
class="gmail_quote"><div dir="ltr" class="gmail_attr">пт, 29 нояб. 2019 г. в \
13:35, mahesh b &lt;<a \
href="mailto:mahesh.b.2487@gmail.com">mahesh.b.2487@gmail.com</a>&gt;:<br></div><blockquote \
class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid \
rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi All,<div>              Below is \
the syntax am using to print the line number in kamailio configuration \
file.</div><div><br></div><div>  xlog(&quot;L_WARN&quot;,&quot;Hi Mahesh at line \
$cfg(line)\n&quot;);<br></div><div><br></div><div>Unfortunately , when i do this \
looks like kamailio is not starting, Any help please regarding what am i missing \
here. I tried Xlogl as well, which doesnt print the line number by default in my \
setup.</div><div><br></div><div><br></div><div>This is the details i had read to \
understand config file attributes :</div><div><br></div><div><h2 \
id="gmail-m_5770603620423129739gmail-cfg_key_-_config_file_attributes" \
style="padding:0px;line-height:1.2;clear:left;margin:0px 0px \
0.666em;color:rgb(51,51,51);font-family:Arial,sans-serif">$cfg(key) - Config File \
Attributes</h2><div style="margin:0px;padding:0px;color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px"><p \
style="margin:0px 0px 1.4em;padding:0px">Attributes related to configuration \
file.</p><p style="margin:0px 0px 1.4em;padding:0px">The key can be:</p><ul \
style="margin:0px 0px 1.4em;padding:0px 0px 0px 1.5em;list-style:outside square"><li \
style="padding:0px;margin:0px 0px 0px 1.5em;color:rgb(153,153,153)"><div \
style="margin:0px;padding:0px;color:rgb(51,51,51)">line - return the current line in \
config</div></li><li style="padding:0px;margin:0px 0px 0px \
1.5em;color:rgb(153,153,153)"><div \
style="margin:0px;padding:0px;color:rgb(51,51,51)">name - return the name of current \
config file</div></li><li style="padding:0px;margin:0px 0px 0px \
1.5em;color:rgb(153,153,153)"><div \
style="margin:0px;padding:0px;color:rgb(51,51,51)">file - return the name of current \
config file</div></li><li style="padding:0px;margin:0px 0px 0px \
1.5em;color:rgb(153,153,153)"><div \
style="margin:0px;padding:0px;color:rgb(51,51,51)">route - return the name of routing \
block</div></li></ul><div><p style="margin:0px 0px \
1.4em;padding:0px">Example:</p><pre \
style="margin-top:0px;margin-bottom:1.4em;padding:0.7em \
1em;font-family:Consolas,&quot;Andale Mono WT&quot;,&quot;Andale \
Mono&quot;,&quot;Bitstream Vera Sans Mono&quot;,&quot;Nimbus Mono \
L&quot;,Monaco,&quot;Courier \
New&quot;,monospace;direction:ltr;background-color:rgb(251,250,249);border-radius:2px;overflow:auto;border:1px \
solid rgb(204,204,204)">send_reply<span style="color:rgb(102,204,102)">(</span><span \
style="color:rgb(255,0,0)">&quot;404&quot;</span><span \
style="color:rgb(102,204,102)">,</span> <span style="color:rgb(255,0,0)">&quot;Not \
found at line $cfg(line)&quot;</span><span \
style="color:rgb(102,204,102)">)</span></pre></div></div></div></div> \
_______________________________________________<br> Kamailio (SER) - Users Mailing \
List<br> <a href="mailto:sr-users@lists.kamailio.org" \
target="_blank">sr-users@lists.kamailio.org</a><br> <a \
href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" \
target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br> \
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" \
class="gmail_signature"><div dir="ltr"><br><div><div>BR,</div><div>Denys \
Pozniak<br></div><div><br></div><div><br></div></div></div></div>


[Attachment #6 (text/plain)]

_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic