[SR-Users] Manipulate From header

Henning Westerholt henning.westerholt at 1und1.de
Mon May 23 10:45:58 CEST 2011


On Friday 20 May 2011, alex pappas wrote:
> I'm trying to change the From uri and Dsplay but without sucess.
> 
> My config is as follow:
> 
> if(dp_translate("1111",
> "$avp(s:frm_user_name)/$avp(s:test_frm_user_name)"))  --> i'm sending
> 2112202701 and I get back corectly 701 {
>                         $avp(s:display) = $avp(s:test_frm_user_name);
>                         $avp(s:fu_uri) = "sip:" +
> $avp(s:test_frm_user_name) + "@" + $fd;
> 
>                         xlog("alx ------- The avp(s:display):
> $avp(s:display) ---- avp(s:fu_uri)=$avp(s:fu_uri)  ----------\n");  --> I
> see values  701 and sip:701 at my_IP_address
> 
>                        
> uac_replace_from("$avp(s:display)","$avp(s:fu_uri)"); Here I log the fu
> and I see that nothing has changed..
> 
>                  }

Hi Alex,

i guess your changes to the from header are not visible because they are not 
applied yet. They should be visible on the message that is send out to the 
network, have you looked to a trace? Otherwise you could use the 
apply_msg_change method, then it should be also visible:
http://www.kamailio.org/docs/modules/3.1.x/modules/textopsx.html#msg_apply_changes

Cheers,

Henning



More information about the sr-users mailing list