<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hello,</p>
<p>you have to put this from the perspective of: changes to the SIP
message (headers and body) are not immediately reflected. So even
if you do a replace or subst operation, changes are not visible.
If you do remove_hf() or append_hf(), it happens the same.</p>
<p>The FAQ has an entry for it:</p>
<p> -
<a class="moz-txt-link-freetext" href="https://www.kamailio.org/wiki/tutorials/faq/main#why_changes_made_to_headers_or">https://www.kamailio.org/wiki/tutorials/faq/main#why_changes_made_to_headers_or</a></p>
<p>$fu/U/d used to be read only, we made them r/w for convenience,
as a variable based operation instead of uac_replace_from().<br>
</p>
<p>The r-uri variables ($ru, $rU, $rd, ...) are not pointing to the
SIP message buffer, there is a special field (and buffer) inside
the internal structure of Kamailio, that's why changes to it are
visible. The corresponding variables pointing to the SIP message
buffer are $ou, $oU, ...<br>
</p>
Cheers,<br>
Daniel<br>
<br>
<div class="moz-cite-prefix">On 13.06.18 23:05, Karthik Srinivasan
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAHUhqa9LbYtiUM4=ON+=DtnnPanZMrwgzcOr++e4iCRGmR2deQ@mail.gmail.com">
<div dir="ltr">Henning,
<div><br>
</div>
<div>Thanks for the explanation. This does clear it up for me.</div>
<div><br>
</div>
<div>Do you happen to know if there is a list of pseudo vars
that fall under the non special case? (a list for those
psedo vars where msg_apply_changes needs to be called for the
update to be reflected while in routing file processing that
is.)</div>
<div><br>
</div>
<div>Thanks,</div>
<div><br>
</div>
<div>Karthik</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Wed, Jun 13, 2018 at 1:39 PM,
Henning Westerholt <span dir="ltr"><<a
href="mailto:hw@kamailio.org" target="_blank"
moz-do-not-send="true">hw@kamailio.org</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">Am
Mittwoch, 13. Juni 2018, 20:28:13 CEST schrieb Alex
Balashov:<br>
> On Wed, Jun 13, 2018 at 01:26:07PM -0500, Karthik
Srinivasan wrote:<br>
> > Could you explain why we need to call this
function when manipulating $fU<br>
> > ?<br>
> <br>
> Some PV manipulations work that way, others don't.
:-) "Because<br>
> Kamailio".<br>
<br>
Don't want to dig into to much technical details here..<br>
<br>
But to give a bit more context, the Kamailio architecture
related to SIP <br>
message processing is optimized to avoid re-parsing of the
message during <br>
configuration processing. This works with so called
"lumps" which are more or <br>
less like a programming patch file (e.g. change, delete
parts). This lumps are <br>
applied shortly before sending the message out or if you
call <br>
msg_apply_changes().<br>
<br>
Some parts of the SIP message are accessed directly,
because they are "more <br>
important" (like the request URI) are handled specially,
some like the From <br>
user are done like a normal SIP header part as described
above.<br>
<br>
For a bit more details and to look into the details, have
a look to the <br>
dbg_sip_msg([log_level], [facility]) function in the
debugger module.<br>
<br>
Best regards,<br>
<br>
Henning<br>
<br>
</blockquote>
</div>
<br>
</div>
</div>
<!--'"--><br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Kamailio (SER) - Users Mailing List
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a>
<a class="moz-txt-link-freetext" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
</blockquote>
<br>
<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 World Conference -- <a class="moz-txt-link-abbreviated" href="http://www.kamailioworld.com">www.kamailioworld.com</a></pre>
</body>
</html>