Hello all
We are using topos in kamailio 5.5.6 to hide topology to some SIP-Servers.
Now, I am trying to modify the User-Agent header of OPTIONS sent by
Dispatcher Module, how is this possible?
I tried something like this, because insert_hf or remove_hf does not
work in event_route:
# Branch cleanup
branch_route[MANAGE_CLEANUP] {
remove_hf("User-Agent");
insert_hf("User-Agent: Test\r\n");
return;
}
# topos route
event_route[topos:msg-sending] {
# Topology hiding for some hosts
if (is_request() and $sndto(ip)=="1.1.1.1") {
if (is_method("OPTIONS")) {
t_on_branch("MANAGE_CLEANUP");
t_relay();
}
} else {
# No topology hiding for other hosts...
drop;
}
}
But the branch-route is never called. I got two errors in Log:
Apr 4 12:17:27 kamailio /usr/sbin/kamailio[32174]: CRITICAL: <core>
[core/ip_addr.c:234]: ip_addr2sbuf(): unknown address family 0
Apr 4 12:17:27 kamailio /usr/sbin/kamailio[32174]: ERROR: tm
[t_fwd.c:1752]: t_forward_nonack(): no branches for forwarding
Any hints how to achieve this?
Regards
Stefan