Martin Hoffmann wrote:
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]
That's why there is a dedicated function which puts the original from uri into a Record_route parameter and keeps track of mangling From header. I'm using it in auto mode without problems. (IIRC the cancel still has to be rewritten manually)
Of course a simple regexp wont work.
regards klaus
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. _______________________________________________ Serusers mailing list Serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers