[Serusers] modify the From header

Martin Hoffmann hn at nvnc.de
Tue Dec 5 10:02:04 CET 2006


Andreas Heise wrote:
> 
> I don't know if the UAC module is available for SER,
> but in OpenSER you could try something like this......
> 
> if(from_uri=~".*@localhost.localdomain")
> {
> uac_replace_from("*$fn* ","sip:*$fU*@128.242.111.222:5060");
> };

One should mention that doing this is in violation of RFC 3261. A proxy
is not allowed to mess with the From- or To-URI. In practice, you should
be carefull with this, still. I don't know what the function mentioned
does exactly, but if a voice gateway of a certain well-known provider of
networking equipment receives a response with a different From- or
To-URI than what it put in the request, it will simply drop your
response.[0]

The best answer to the original question IMHO is: Don't do it.

Regards,
Martin

[0] Disclaimer: At least it did about two years ago. But SBCs in general
    are very picky with this kind of stuff.



More information about the sr-users mailing list