<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hello,</p>
<p>Seems, there is a need to specify xmlns forcefully</p>
<p>As it's working when I do <br>
</p>
<p><font face="Courier New, Courier, monospace">$var(body) =
$(rb{s.rm,xmlns="urn:ietf:params:xml:ns:dialog-info"});</font></p>
<p>So, I do need or to specify namespace or to remove this line from
XML. But if someone can comment on this (cause XML is a world on
it's own) I'd be really grateful.<br>
</p>
<pre class="moz-signature" cols="72">Regards,
Igor</pre>
<div class="moz-cite-prefix">Le 10.02.2022 à 16:25, Igor Olhovskiy a
écrit :<br>
</div>
<blockquote type="cite"
cite="mid:12dc4e05-90a4-b597-acdd-11347066218b@gmail.com">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<p>Hello<br>
</p>
<p>Just to add, when I'm trying to dump $rb to logs, I'm getting
this line</p>
<pre><?xml version="1.0"?>#012<dialog-info xmlns="urn:ietf:params:xml:ns:dialog-info" version="0" state="full" entity=<a class="moz-txt-link-rfc2396E" href="sip:88881@dev.company" moz-do-not-send="true">"sip:88881@dev.company"</a>>#012 <dialog id="f-XGMVyeO0" direction="recipient">#012 <state>terminated</state>#012 </dialog>#012</dialog-info></pre>
<p>So, I expect problem is in this <font face="Courier New,
Courier, monospace">#012 </font>+ extra spaces. Is there a
way to clean it up in an easy way?<br>
</p>
<pre class="moz-signature" cols="72">Regards,
Igor</pre>
<div class="moz-cite-prefix">Le 10.02.2022 à 16:01, Igor Olhovskiy
a écrit :<br>
</div>
<blockquote type="cite"
cite="mid:266e84de-3069-12bd-e472-8e12edf460cd@gmail.com">
<meta http-equiv="content-type" content="text/html;
charset=UTF-8">
<p>Hello,</p>
<p>I'm trying to get state of endpoint from PUBLISH message in a
most simple way using <font face="Courier New, Courier,
monospace">xmlops</font> module</p>
<p>Trying to make this</p>
<pre>$xml(body=>doc) = $rb;
log("L_ERR", "$rU is now in state $xml(body=>xpath:/dialog-info/dialog/state)\n");</pre>
<p>XML in PUBLISH itself</p>
<pre><?xml version="1.0"?>
<dialog-info xmlns="urn:ietf:params:xml:ns:dialog-info" version="0" state="full" entity=<a class="moz-txt-link-rfc2396E" href="sip:88881@dev.company" moz-do-not-send="true">"sip:88881@dev.company"</a>>
<dialog id="v6qmEYf5yI" direction="initiator">
<state>confirmed</state>
</dialog>
</dialog-info></pre>
<p><br>
</p>
<p>Actual text in log is <br>
</p>
<pre>... <script>: 88881 is now in state
</pre>
<p>Means it's empty. <font face="Courier New, Courier,
monospace">xmlops</font> module is loaded with no
parameters. Tried also string <br>
</p>
<pre>$xml(body=>xpath:/dialog-info/dialog/state/text())
</pre>
<p>-> same result<br>
</p>
<p>What am I missing here?</p>
<p>kamailio 5.4.6<br>
</p>
<pre class="moz-signature" cols="72">--
Thanks in advance,
Igor</pre>
</blockquote>
</blockquote>
</body>
</html>