<div dir="ltr">hi!<div>You may try to use  " msg_apply_changes()";</div><div><br></div><div><div>    if ( is_method('PUBLISH') ){</div><div>        replace_body_all("sip:300", "sip:3000000");</div><div>        msg_apply_changes();</div><div>        handle_publish();</div><div>    }</div></div><div><br></div><div>if you use  pua_dialogi</div><div> msg_apply_changes()<br></div><div><br></div><div>Bye the way, some presence parameters you may set via AVPs before processing, like</div><div><div>modparam("pua_dialoginfo", "use_pubruri_avps", 1)</div><div>modparam("pua_dialoginfo", "pubruri_caller_avp", "$avp(puburis_caller)")</div><div>modparam("pua_dialoginfo", "pubruri_callee_avp", "$avp(puburis_callee)")</div></div><div><br></div><div><br></div><div><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">2017-12-26 15:34 GMT+03:00 Володимир Іванець <span dir="ltr"><<a href="mailto:volodyaivanets@gmail.com" target="_blank">volodyaivanets@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello!<div><br></div><div>I am trying to modify PUBLISH packet before handle_publish function execution. The best what I could think of is to make all required changes, update Destination URI to the Kamailio itself and then send it. In this case Kamailio will receive another PUBLISH packet with modified values.</div><div><br></div><div>I was wondering someone knows cleaner way of achieving this.</div><div><br></div><div>Thanks!</div></div>
<br>______________________________<wbr>_________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/<wbr>cgi-bin/mailman/listinfo/sr-<wbr>users</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Savolainen Dmitri</div></div></div></div></div>
</div>