<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<font face="monospace">Your DP rule is doing nothing, as
transformation - it is matching everything and returning it as
output..so not sure what are your expectations here.<br>
<br>
Regards,<br>
</font>
<pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="moz-txt-link-freetext" href="https://www.opensips-solutions.com">https://www.opensips-solutions.com</a>
OpenSIPS Summit 27-30 Sept 2022, Athens
<a class="moz-txt-link-freetext" href="https://www.opensips.org/events/Summit-2022Athens/">https://www.opensips.org/events/Summit-2022Athens/</a></pre>
<div class="moz-cite-prefix">On 8/29/22 4:59 PM, Антон Ершов wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAMp8X_vCaLU8wBSuWDOq+cW9FjUph26w4CPjN3dpzy9NdBjnOw@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">
<div>maybe it is so.<br>
</div>
<div>but where can you go wrong with this simple rule<br>
</div>
<div><br>
</div>
"id" "dpid" "pr" "match_op" "match_exp" "match_flags"
"subst_exp" "repl_exp" "timerec" "disabled" "attrs"<br>
1 0 0 1 ".*" 0 "^(.*)$" "\1" 0 "test"<br>
<div><br>
</div>
<div>/usr/sbin/opensips[30317]: DBG:dialplan:dp_translate_f:
dpid is 0 partition is default<br>
/usr/sbin/opensips[30317]: DBG:dialplan:dp_translate_f: input
is "00139939484"<br>
/usr/sbin/opensips[30317]: DBG:dialplan:dp_translate_f:
checking with dpid 0<br>
/usr/sbin/opensips[30317]: DBG:dialplan:test_match:
test_match:[0] "00139939484"<br>
/usr/sbin/opensips[30317]: DBG:dialplan:translate: Regex
operator testing. Got result: 0<br>
/usr/sbin/opensips[30317]: DBG:dialplan:translate: Found a
matching rule 0x7f00fee33698: pr 0, match_exp .*<br>
/usr/sbin/opensips[30317]: DBG:dialplan:translate: the rule's
attrs are test<br>
/usr/sbin/opensips[30317]: DBG:dialplan:translate: the copied
attributes are: test<br>
/usr/sbin/opensips[30317]: DBG:dialplan:test_match:
test_match:[0] "00139939484"<br>
/usr/sbin/opensips[30317]: DBG:dialplan:test_match:
test_match:[1] "00139939484"<br>
</div>
<div>/usr/sbin/opensips[30317]: DBG:dialplan:dp_translate_f:
input "00139939484" with dpid 0 => output "00139939484"<br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">пн, 29 авг. 2022 г. в 16:43,
Bogdan-Andrei Iancu <<a href="mailto:bogdan@opensips.org"
moz-do-not-send="true">bogdan@opensips.org</a>>:<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> <font face="monospace">Hi,<br>
<br>
No quotes are added by the dialplan module at all. I think
out value inherited the quotes from the input value, the
From Display Name, which may be a quoted value.<br>
<br>
Regards,<br>
</font>
<pre cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a href="https://www.opensips-solutions.com" target="_blank" moz-do-not-send="true">https://www.opensips-solutions.com</a>
OpenSIPS Summit 27-30 Sept 2022, Athens
<a href="https://www.opensips.org/events/Summit-2022Athens/" target="_blank" moz-do-not-send="true">https://www.opensips.org/events/Summit-2022Athens/</a></pre>
<div>On 8/29/22 3:35 PM, Антон Ершов wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">Hello friends!<br>
<div><br>
</div>
<div>In version: opensips 3.2.8 (x86_64/linux)</div>
<div>I observe strange behavior of the dialplan
module. the value returned to the $var(out) variable
is wrapped in quotes. In version 3.2.5 no such
behavior was observed. this forces you to do
additional work with the result obtained in order to
use it further.<br>
</div>
<div><br>
</div>
<div>my config </div>
<div>if (dp_translate(0, $fn, $var(dp_out),
$var(dp_attrs))) {</div>
xlog("L_INFO", "$ci translated to var $var(dp_out)
with attributes: '$var(dp_attrs)'\n");
<div> ...</div>
<div>} </div>
<div><br>
</div>
<div>show in console </div>
<div><br>
</div>
<div>/usr/sbin/opensips[30318]:
287b5bea-26c4-11ed-abcd-016f252b0962 translated to var
"000012345" with attributes: 'test'<br>
</div>
<div><br>
</div>
<div>as you can see the value is wrapped in quotes<br>
</div>
<div>if you try to use the value of the variable in some
other place, for example in uac_replace. quotation
marks are also present<br>
</div>
</div>
<br>
<fieldset></fieldset>
<pre>_______________________________________________
Users mailing list
<a href="mailto:Users@lists.opensips.org" target="_blank" moz-do-not-send="true">Users@lists.opensips.org</a>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank" moz-do-not-send="true">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
</div>
</blockquote>
</div>
</blockquote>
<br>
</body>
</html>