[OpenSIPS-Devel] Proposal for change in add_diversion function

Saúl Ibarra Corretgé saul at ag-projects.com
Tue May 29 14:18:35 CEST 2012


Hi all,

I'd like to make a change to the add_diversion function of the diversions module and I'd like some feedback, in case my proposed change could cause trouble to anyone.

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:

uri = &msg->first_line.u.request.uri;

This means that if the request URI was modified since the message was received, the new URI won'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.

Would anyone oppose to setting the *current* RURI instead? That is, take the URI from msg->parsed_uri.

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.

Thoughts?


Thanks and regards,

--
Saúl Ibarra Corretgé
AG Projects






More information about the Devel mailing list