<div dir="ltr">Daniel,<div><br></div><div>I appreciate the information. Than you very much.</div><div><br></div><div>Karthik</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jun 14, 2018 at 1:18 AM, Daniel-Constantin Mierla <span dir="ltr"><<a href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div 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="m_3465803037540450010moz-txt-link-freetext" href="https://www.kamailio.org/wiki/tutorials/faq/main#why_changes_made_to_headers_or" target="_blank">https://www.kamailio.org/wiki/<wbr>tutorials/faq/main#why_<wbr>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="m_3465803037540450010moz-cite-prefix">On 13.06.18 23:05, Karthik Srinivasan
wrote:<br>
</div>
<blockquote type="cite">
<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">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="m_3465803037540450010mimeAttachmentHeader"></fieldset>
<br>
<pre>______________________________<wbr>_________________
Kamailio (SER) - Users Mailing List
<a class="m_3465803037540450010moz-txt-link-abbreviated" href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a>
<a class="m_3465803037540450010moz-txt-link-freetext" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">https://lists.kamailio.org/<wbr>cgi-bin/mailman/listinfo/sr-<wbr>users</a><span class="HOEnZb"><font color="#888888">
</font></span></pre><span class="HOEnZb"><font color="#888888">
</font></span></blockquote><span class="HOEnZb"><font color="#888888">
<br>
<pre class="m_3465803037540450010moz-signature" cols="72">--
Daniel-Constantin Mierla -- <a class="m_3465803037540450010moz-txt-link-abbreviated" href="http://www.asipto.com" target="_blank">www.asipto.com</a>
<a class="m_3465803037540450010moz-txt-link-abbreviated" href="http://www.twitter.com/miconda" target="_blank">www.twitter.com/miconda</a> -- <a class="m_3465803037540450010moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda" target="_blank">www.linkedin.com/in/miconda</a>
Kamailio World Conference -- <a class="m_3465803037540450010moz-txt-link-abbreviated" href="http://www.kamailioworld.com" target="_blank">www.kamailioworld.com</a></pre>
</font></span></div>
</blockquote></div><br></div>