Am Montag, den 26.03.2007, 18:08 +0200 schrieb Michel Bensoussan:
Hello.
Is there a way to modify the contact header?
For example:
REGISTER REGISTER
UA -----------------------------------------------> openser
----------------------------------------------------> Registrar
IP:1.0.0.1 contact: ua(a)1.0.0.1
IP:1.0.0.2 contact: ua(a)1.0.0.2
The idea is to ensure that incoming call (INVITE) will path through the
openser.
Hello,
I have the same problem und tried this (won't work).
I think that the public ip address of the ua is the problem.
if(is_method("REGISTER") && uri!=myself )
{
xlog("L_ALERT", "CONTACT: $ct\n");
# trying 1
subst('/^Contact:(.*)@[a-zA-Z0-9.]+(.*)$/Contact:\1@1.0.0.2\2/ig');
# trying 2
if(remove_hf("Contact")) {
insert_hf("Contact:
<sip:bob@1.0.0.2;transport=udp>\r\n","CSeq");
}
# trying 3
# modification of fix_contact(), expand rfc1918nets to
# trying 4
#expansion of rfc1918nets[] in mediaproxy.c
# trying 5
#set src_ip to 1.0.0.2, then run fix_contact();
#does it make sense? if yes, how to do this?
xlog("L_ALERT", "CONTACT: $ct (FIXED?)\n");
}
Is there anyone out there that can help?
Thanks in advance,
Stefan Jenkner