Hello,
I am doing interop testing with Level3, and need to be able to rewrite the To: field in requests to match their requirements. I can fake the rewrites inside route[], but although the packets sent out look like they use the new "To:", the header is never parsed again, so the internal structures of SER still hold the former (incorrect) value. When a request hit failure_route[] (for example when a CANCEL is sent when an INVITE times out) the original, incorrect To: header is then sent (and there's no way to modify the content of the CANCEL from within failure_route[]).
Is there a standard way to alter the internally-stored value for To: (and From:, since I'm asking)? If not, could someone point me to the right place in the code to start adding this kind of feature?
Thanks, Stéphane Alnet
No standard way as it is not allowed according to the RFC. However, people use subst for various purposes and yes, you need to make sure that you change the header back and forth correctly (because your UAs may not like the changed To). CANCEL is a regular SIP messages handled by the main route (in loose route). g-)
Stéphane Alnet wrote:
Hello,
I am doing interop testing with Level3, and need to be able to rewrite the To: field in requests to match their requirements. I can fake the rewrites inside route[], but although the packets sent out look like they use the new "To:", the header is never parsed again, so the internal structures of SER still hold the former (incorrect) value. When a request hit failure_route[] (for example when a CANCEL is sent when an INVITE times out) the original, incorrect To: header is then sent (and there's no way to modify the content of the CANCEL from within failure_route[]).
Is there a standard way to alter the internally-stored value for To: (and From:, since I'm asking)? If not, could someone point me to the right place in the code to start adding this kind of feature?
Thanks, Stéphane Alnet