<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>The question was about the tcpops function, because that one
printed the logs.</p>
<p>Cheers,<br>
Daniel<br>
</p>
<div class="moz-cite-prefix">On 04.05.21 15:15, David Villasmil
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAFGRPVoF19UuGUkZu3io=aBDcg_or1qraC+nbRv0sV5cA0utdw@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">I was using it like:
<div><br>
</div>
<div>$var(conid) = $(hdr(Route){uri.param,wsconnid}{<a
href="http://s.int" moz-do-not-send="true">s.int</a>})<br>
</div>
<div><br clear="all">
<div>
<div dir="ltr" class="gmail_signature"
data-smartmail="gmail_signature">
<div dir="ltr">
<div>Regards,</div>
<div><br>
</div>
David Villasmil
<div>email: <a
href="mailto:david.villasmil.work@gmail.com"
target="_blank" moz-do-not-send="true">david.villasmil.work@gmail.com</a></div>
<div>phone: +34669448337</div>
</div>
</div>
</div>
<br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Tue, May 4, 2021 at 7:24 AM
Daniel-Constantin Mierla <<a
href="mailto:miconda@gmail.com" moz-do-not-send="true">miconda@gmail.com</a>>
wrote:<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>
<p>Hello,</p>
<p>you have to show how you use the function and pass the
parameters to it.</p>
<p>Cheers,<br>
Daniel<br>
</p>
<div>On 04.05.21 00:27, David Villasmil wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">That did the trick (and adding the s.init)
<div><br>
</div>
<div>
<div>$var(conid) =
$(hdr(Route){nameaddr.uri}{uri.param,wsconnid}{<a
href="http://s.int" target="_blank"
moz-do-not-send="true">s.int</a>});<br>
</div>
</div>
<div><br>
</div>
<div>Now, i understand uri.param returning and extra
">".</div>
<div><br>
</div>
<div>but now i'd really like to understand why
$var(whatever) which contains "4" would result in:<br>
</div>
<div><br>
</div>
<div>ERROR: <core> [core/sr_module.c:1638]:
get_int_fparam(): Could not convert PV to int<br>
ERROR: tcpops [tcpops_mod.c:374]: w_tcp_conid_state():
invalid parameter 'conid' (must be a number)<br>
</div>
<div><br>
</div>
<div>?</div>
<div><br>
</div>
<div><br clear="all">
<div>
<div dir="ltr">
<div dir="ltr">
<div>Regards,</div>
<div><br>
</div>
David Villasmil
<div>email: <a
href="mailto:david.villasmil.work@gmail.com"
target="_blank" moz-do-not-send="true">david.villasmil.work@gmail.com</a></div>
<div>phone: +34669448337</div>
</div>
</div>
</div>
<br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Mon, May 3, 2021 at
11:03 PM Ovidiu Sas <<a
href="mailto:osas@voipembedded.com" target="_blank"
moz-do-not-send="true">osas@voipembedded.com</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px
0px 0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">You should try
something like this:<br>
$var(wsconnid) =
$(hdr(Route){nameaddr.uri}{uri.param,wsconnid})<br>
First you need to extract the URI, and then the URI
parameter.<br>
<br>
The param.value transformation is expecting a true
param list, not uri<br>
or nameaddress.<br>
<br>
Regards,<br>
Ovidiu Sas<br>
<br>
On Mon, May 3, 2021 at 3:29 PM David Villasmil<br>
<<a href="mailto:david.villasmil.work@gmail.com"
target="_blank" moz-do-not-send="true">david.villasmil.work@gmail.com</a>>
wrote:<br>
><br>
> Hello guys,<br>
><br>
> I'm possible using this wrong, but here it is;<br>
> I need to get a previously set parameter to rr,
named "wsconnid":<br>
><br>
> $var(wsconnid) =
$(hdr(Route){param.value,wsconnid})<br>
> xlog("L_ERR", "Connection ID parameter:
$var(wsconnid)");<br>
><br>
> And i'm getting:<br>
><br>
> May 3 19:24:45 ip-10-231-32-37
/usr/sbin/kamailio[10015]: ERROR: <script>: WS
Connection ID 13><br>
> May 3 19:24:49 ip-10-231-32-37
/usr/sbin/kamailio[10014]: ERROR: <script>: Got
an OPTIONS We now need to get the connection id from
rr<br>
><br>
> This is an example:<br>
> Route: <a moz-do-not-send="true"><sip:10.231.32.37;r2=on;lr;wsconnid=13></a><br>
><br>
> The function is returning "13>" instead of
"13".<br>
><br>
> Thanks all,<br>
><br>
> David Villasmil<br>
> email: <a
href="mailto:david.villasmil.work@gmail.com"
target="_blank" moz-do-not-send="true">david.villasmil.work@gmail.com</a><br>
> phone: +34669448337<br>
>
__________________________________________________________<br>
> Kamailio - Users Mailing List - Non Commercial
Discussions<br>
> * <a href="mailto:sr-users@lists.kamailio.org"
target="_blank" moz-do-not-send="true">sr-users@lists.kamailio.org</a><br>
> Important: keep the mailing list in the
recipients, do not reply only to the sender!<br>
> Edit mailing list options or unsubscribe:<br>
> * <a
href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users"
rel="noreferrer" target="_blank"
moz-do-not-send="true">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br>
<br>
<br>
-- <br>
VoIP Embedded, Inc.<br>
<a href="http://www.voipembedded.com" rel="noreferrer"
target="_blank" moz-do-not-send="true">http://www.voipembedded.com</a><br>
<br>
__________________________________________________________<br>
Kamailio - Users Mailing List - Non Commercial
Discussions<br>
* <a href="mailto:sr-users@lists.kamailio.org"
target="_blank" moz-do-not-send="true">sr-users@lists.kamailio.org</a><br>
Important: keep the mailing list in the recipients, do
not reply only to the sender!<br>
Edit mailing list options or unsubscribe:<br>
* <a
href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users"
rel="noreferrer" target="_blank"
moz-do-not-send="true">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote>
</div>
<br>
<fieldset></fieldset>
<pre>__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
* <a href="mailto:sr-users@lists.kamailio.org" target="_blank" moz-do-not-send="true">sr-users@lists.kamailio.org</a>
Important: keep the mailing list in the recipients, do not reply only to the sender!
Edit mailing list options or unsubscribe:
* <a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" target="_blank" moz-do-not-send="true">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
</blockquote>
<pre cols="72">--
Daniel-Constantin Mierla -- <a href="http://www.asipto.com" target="_blank" moz-do-not-send="true">www.asipto.com</a>
<a href="http://www.twitter.com/miconda" target="_blank" moz-do-not-send="true">www.twitter.com/miconda</a> -- <a href="http://www.linkedin.com/in/miconda" target="_blank" moz-do-not-send="true">www.linkedin.com/in/miconda</a>
Kamailio Advanced Training - Online
May 17-20, 2021 (Europe Timezone) - June 7-10, 2021 (America Timezone)
* <a href="https://www.asipto.com/sw/kamailio-advanced-training-online/" target="_blank" moz-do-not-send="true">https://www.asipto.com/sw/kamailio-advanced-training-online/</a></pre>
</div>
</blockquote>
</div>
</blockquote>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla -- <a class="moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a>
<a class="moz-txt-link-abbreviated" href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a class="moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda">www.linkedin.com/in/miconda</a>
Kamailio Advanced Training - Online
May 17-20, 2021 (Europe Timezone) - June 7-10, 2021 (America Timezone)
* <a class="moz-txt-link-freetext" href="https://www.asipto.com/sw/kamailio-advanced-training-online/">https://www.asipto.com/sw/kamailio-advanced-training-online/</a></pre>
</body>
</html>