Discussion:
[SR-Users] Add custom parameter to To: header, and then recover it
Alex Villací­s Lasso
2014-09-05 22:51:37 UTC
Permalink
What functions exist (if any), to add custom parameters to the From: and To: headers?
Alex Balashov
2014-09-05 23:39:39 UTC
Permalink
Post by Alex Villací­s Lasso
What functions exist (if any), to add custom parameters to the From: and To: headers?
I don't know that there are any functions to do that per se. But what
you could do is extract the existing From header value, remove the From
header, and append your own parameters to it:

$var(new_from) = $hdr(From) + ";yourparam=yourval";
remove_hf("From");
append_hf("From: $var(new_from)\r\n");

Now, as to whether you actually want to be modifying From and To
unilaterally, which of course breaks RFC 3261 and is definitely not
something proxies should do, that's another matter. I would say don't do it.
--
Alex Balashov - Principal
Evariste Systems LLC
Tel: +1-678-954-0670
Web: http://www.evaristesys.com/, http://www.alexbalashov.com/

Please be kind to the English language:

http://www.entrepreneur.com/article/232906
Loading...