Saul,<div><br></div><div> The new behavior would indeed be desirable in cases such as enum. Another solution might be to add an optional parameter to add_diversion for using the newly rewritten ruri. This may work more fluidly with older code that relies on the current behavior.</div>
<div><br clear="all">Regards,<br>--Rudy<br>Dynamic Packet<br>Toll-Free: 888.929.VOIP ( 8647 )<br>
<br><br><div class="gmail_quote">On Tue, May 29, 2012 at 8:18 AM, Saúl Ibarra Corretgé <span dir="ltr">&lt;<a href="mailto:saul@ag-projects.com" target="_blank">saul@ag-projects.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi all,<br>
<br>
I&#39;d like to make a change to the add_diversion function of the diversions module and I&#39;d like some feedback, in case my proposed change could cause trouble to anyone.<br>
<br>
Right now the aforementioned function inserts the original request URI of the message as the indication of who made the diversion. It does so as follows:<br>
<br>
uri = &amp;msg-&gt;first_line.u.request.uri;<br>
<br>
This means that if the request URI was modified since the message was received, the new URI won&#39;t be set in the diversion header, the old one will. In cases where ENUM is involved, for example, one could want to see the real URI after the ENUM resolution.<br>

<br>
Would anyone oppose to setting the *current* RURI instead? That is, take the URI from msg-&gt;parsed_uri.<br>
<br>
As an alternative, we could keep the current behavior and add a module parameter (diverter_avp) where one could set the URI he wanted to see in the diversion header, and use the current approach if the AVP is not set.<br>

<br>
Thoughts?<br>
<br>
<br>
Thanks and regards,<br>
<br>
--<br>
Saúl Ibarra Corretgé<br>
AG Projects<br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
</blockquote></div><br></div>