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@example.org] DEBUG: uac [replace.c:325]: replacement uri is [sip:b@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.
Andreas
Hello,
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@example.org] DEBUG: uac [replace.c:325]: replacement uri is [sip:b@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.
Cheers, Daniel
Hi,
On 07/04/2012 09:42 PM, Daniel-Constantin Mierla wrote:
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.
Ok, I'll have a look at it tomorrow and push a fix.
Andreas
Hi,
The attached patch does the trick for me, but I'd rather like to have a second opinion on it for any potential side effects before pushing it.
The point here is that the fixup function didn't change (beside the name) between 3.1 and 3.3, however 3.1 used dedicated w_replace_from1() and w_replace_from2(), whereas 3.3 uses one unified w_replace_from(), which breaks the behavior the fixup function is providing.
Thanks, Andreas
On 07/05/2012 12:32 AM, Andreas Granig wrote:
Hi,
On 07/04/2012 09:42 PM, Daniel-Constantin Mierla wrote:
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.
Ok, I'll have a look at it tomorrow and push a fix.
Andreas
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Hello,
On 7/6/12 1:36 AM, Andreas Granig wrote:
Hi,
The attached patch does the trick for me, but I'd rather like to have a second opinion on it for any potential side effects before pushing it.
looks ok, go ahead and push it in master and then backport it.
The point here is that the fixup function didn't change (beside the name) between 3.1 and 3.3, however 3.1 used dedicated w_replace_from1() and w_replace_from2(), whereas 3.3 uses one unified w_replace_from(), which breaks the behavior the fixup function is providing.
I see, thanks for clarifications.
Cheers, Daniel
Thanks, Andreas
On 07/05/2012 12:32 AM, Andreas Granig wrote:
Hi,
On 07/04/2012 09:42 PM, Daniel-Constantin Mierla wrote:
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.
Ok, I'll have a look at it tomorrow and push a fix.
Andreas
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users