Dear Sir:
I wrote a failure route for serial call mechanism, it help for no answer call ... but all these serial calls need to have a new CallerID, so I use replace_from for this purpose.
modparam("uac","from_restore_mode","auto")
failure_route[3] { log(1,"******* I'm failure_route[3] *******\n");
if (avp_pushto("$ru", "$avp(forward)")) { append_branch(); avp_delete("$avp(forward)"); uac_replace_from("sip:1234@$fd"); # change from header t_on_failure("3"); # try next , recursive
t_relay();
}
}
If only one forward number in AVP array , this code working fine, the issue will happen if multiple forward number trying, ( forward 2nd,3rd ...number) the UAC module will restore from header in 200 OK of its following message when a UA answered, we will have a duplicated "from header" in 200 OK (sending out opensips). It means we will have 2 "from" headers (in 200 OK) to caller, if 2nd forwarded callee answer.
Caller ---> Invite ---> opensips ----> UA 0, no answer ----> UA 1, no answer ---->UA 2, answer <----200 OK <---200OK<---
this 200ok will have 2 "from" header.
Most of UA just ignore redundant from header, but some can not. I think it should be UAC modules issue, anyone can help me?
best regards KK