[SR-Users] Removing display-name with uac_replace_from

Daniel-Constantin Mierla miconda at gmail.com
Wed Jul 4 21:42:23 CEST 2012


On 7/4/12 3:14 PM, Andreas Granig wrote:
> Hi,
> in kamailio 3.3, doing
>    uac_replace_from("", "$var(myuri)");
> doesn't remove the old Display part anymore (although the documentation
> still says it should), the debug log is:
> DEBUG: uac [uac.c:499]: dsp=(nil) (len=0) , uri=0x7fff87f6b840 (len=28)
> DEBUG: uac [replace.c:324]: uri to replace [sip:a at example.org]
> DEBUG: uac [replace.c:325]: replacement uri is [sip:b at example.org]
> DEBUG: uac [replace.c:383]: encode
> is=<UEtlSyomCD8kIi8/SnlZMzNyS29QS2VLanBKeg--> len=40
> So no hint that the old display is being removed. When doing
>    uac_replace_from("foo", "$var(myuri)");
> then there's an additional line like this:
> DEBUG: uac [replace.c:284]: removing display ["olddisplay"]
> which is missing when I put an empty string in the first parameter.

quick look into the sources shows that fixup makes the display parameter 
null if its length is 0 -- perhaps introduced in the patch that unified 
the fixup to work also for replacing the To header display. If you have 
time and urgent need, you can push a fix for it asap, otherwise I will 
look at it once getting some spare time out of traveling.


Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio Advanced Training, Seattle, USA, Sep 23-26, 2012 - http://asipto.com/u/katu
Kamailio Practical Workshop, Netherlands, Sep 10-12, 2012 - http://asipto.com/u/kpw

More information about the sr-users mailing list