I use remove_hf and append_hf to modify the RPID in the Request_Route,
which works fine, but then if I try it in Failure_Route I end up with
two RPID headers.
Is it possible the revert_uri() is doing something to it? If not, can
you just not do a remove/append like this? I checked to make sure the
remove_hf is returning true. I triple checked to make sure my variable
contains only one header.
Here are some snippets from my config:
route {
...
...
if (method=="INVITE") {
perl_exec("command", "0"); /*sets rpid and ouri vars*/
if (is_avp_set("$avp(rpid)")){
if(is_present_hf("Remote-Party-ID")){
remove_hf("Remote-Party-ID");
}
append_hf("$avp(rpid)");
}
avp_pushto("$ru","$avp(ouri)");
...
...
failure_route[1]{
if(method == "INVITE" ....blah blah blah
revert_uri();
perl_exec("command", "1"); /*sets rpid and ouri vars*/
if (is_avp_set("$avp(rpid)")){
if(is_present_hf("Remote-Party-ID")){
remove_hf("Remote-Party-ID");
}
append_hf("$avp(rpid)");
}
avp_pushto("$ru","$avp(ouri)");
...
...
Best regards,
Mik Cheez