Dear All,

I'm getting the From/To header inconsistnet after a uac_replace_from/to, I'm
using uac_replace_from/to one time in the main Route, and and another on a
BranchRoute after got a failure in the first branch.

As i could understand in the UAC documentation it's not possible to call the
replace function more then once in a branch, but it's not may case I'm
creating a new branch on the failure route, and calling the replace from the
branch route, follow the script snippet bellow [1]:

The request generated for the second GW (Branch route) generates the From/To
header wrongly, the header becomes the first branch value concatenated with
the second branch value, see bellow:

From: *sip:[email protected] <sip%[email protected]>
sip:[email protected] <sip%[email protected]>*
;tag=BSHdtMPF6bZNkSKa7YW3PsS1hWtAdLJC.
To: *sip:[email protected] <sip%[email protected]>**
sip:[email protected] <sip%[email protected]>*.

The red values are the first branch values, and the blue values are the
second branch values.

Does anybody has some idea to help me? Am I making something wrong?

[1] -------------------------------------------------
route{
  ...
  uac_replace_from("", "sip:$avp(s:from)@$fd");
  uac_replace_to("", "sip:$avp(s:to)@$td");
  ...

  if (!t_relay()) {
    sl_reply_error();
  };
}


failure_route[1] {
  t_on_branch("1");
  if(!next_routing()) {
    t_reply("$err.rcode", "$err.rreason");
    exit;
  }
  append_branch();

  if (!t_relay()) {
    sl_reply_error();
  };
}

branch_route[1] {
  ...
  uac_replace_from("", "sip:$avp(s:from)@$fd");
  uac_replace_to("", "sip:$avp(s:to)@$td");
  ...
}

Best regards,

Antonio Anderson Souza
Voice Technology
http://www.antonioams.com
_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to