[Devel] uac_replace_from + avp = garbage in from display

Urtho junk at urtho.net
Fri Mar 10 16:51:49 CET 2006


Hi,

Thanks for the last fix. :)

Below is part of my routing script called during INVITE processing.
i:13 is display name
i:14 is phone number

#CLIR route
route[10] {
  if (isflagset(20))
    return;
  if (is_user_in("From", "clir")) {
    uac_replace_from("anonymous","sip:anonymous@$fd");
    append_hf("Remote-Party-ID: \"anonymous\" <sip:anonymous@$fd>;screen=yes;privacy=full;party=calling;id-type=subscriber\r\n", "Contact");
  } else {
    uac_replace_from("\"$avp(i:13)\"","sip:$avp(i:14)@$fd");
    append_hf("Remote-Party-ID: \"$avp(i:13)\" <sip:$avp(i:14)@$fd>;screen=yes;privacy=off;party=calling;id-type=subscriber\r\n", "Contact");
    if (is_gflag("16"))
      xlog("L_INFO","[10-UACREPLACE-FROM:\"$avp(i:13)\" <sip:$avp(i:14)@$fd>]-[F:$fU@$si T:$tU]\n");
  }
}

Now I place a call from '"urtho3" <sip:urtho3 at 192.168.14.129>' and:

tcpdump shows:
1)From: "urtho3" <sip:urtho3 at 192.168.14.129>;tag=6Gw9W6AJLCKhkaju
2)From: sip:0112233443 at 1 <sip:0112233443 at 192.168.14.129>;tag=6Gw9W6AJLCKhkaju
        ^^^^^^^^^^^^^^^^

syslog shows:
Mar 10 16:09:47 XXX: [ID 197553 local7.info] [10-UACREPLACE-FROM:"Urtho Test 3" <sip:0112233443 at 192.168.14.129>]-[F:urtho3 at 192.168.16.198 T:0112233441]

So AVP value is ok but display is overwritten with garbage.

This  happens  ONLY  if  uac_replace_from  is  called  with  $avp as a
parameter. Static parameters work just fine :

1)From: "urtho3" <sip:urtho3 at 192.168.14.129>;tag=oszGxXtXCC2Vratg
2)From: "foo" <sip:0112233443 at 192.168.14.129>;tag=oszGxXtXCC2Vratg

I am not sure which CVS update is responsible but -dev12 is ok.

Urtho,

p.s.

I  have more on uac_replace_from not restoring From or making TO: null
in  branching  on  busy/timeout  scenario  but I have to create a test
case.




More information about the Devel mailing list