Hi Henning,

I've performed the test also with the latest stable 5.3.2, with the same 
results.
As far as I can tell, Kamailio is failing to alter the URI.
As for debugging mode, I've checked the logs, and I think the dialog variables 
(storing the original uri) are removed as soon as the BYE is received from the 
callee. For the BYE received by Kamailio from the callee, I do see the uac 
module restoring the original uri, but no log lines for the 200 OK being sent 
back to the callee.
However, I'm not sure, since I'm only human and can never be fast enough to 
check the output of dlg.list command. The dialog stays alive for some time 
though (after the BYE).

Below a trimmed version of the flow of messages. Had to replace some values, 
could have made a mistake somewhere, but I hope you get the picture.

Callee -> Kamailio
BYE
To: <sip:[email protected]>;tag=U9etF1ae4rtgQ
From: <sip:[email protected]:5060>;tag=0d608960

Kamailio -> Callee
SIP/2.0 200 OK
From: <sip:[email protected]:5060>;tag=0d608960
To: <sip:[email protected]>;tag=U9etF1ae4rtgQ

While writing this mail, I tried to also call the uac_replace_to function right 
after calling the uac_replace_from function, and now the To header is correctly 
replaced in the 200OK of the BYE (sent by callee).

I guess since the Callee (UA) switches the From and To header, Kamailio isn't 
able to replace it correctly when the callee initiates the BYE request, but 
this seems to fix it.
I'll have to do some more tests to see if the values are replaced/restored 
correctly during reINVITEs.

uac_replace_from("", "sip:[email protected]");
uac_replace_to("", "$tu");

Regards,

Grant

From: Henning Westerholt <[email protected]>
Sent: vrijdag 6 maart 2020 10:24
To: Kamailio (SER) - Users Mailing List <[email protected]>
Cc: Grant Bagdasarian <[email protected]>
Subject: RE: uac_replace_from in 200 OK of BYE


[EXTERNAL EMAIL]
Hi Grant,

Are you saying the Kamailio is failing to alter the URI or does the User Agent 
does something wrong?

Check the Kamailio log files if maybe the dialog module tracking does not work 
correctly here. Last year I did some work in this area, in my experience it 
should work ok also with the dialog module support.

If you can easily reproduce it, you can also do a test call in debugging mode, 
you will get more information about the uac logic in the log files.

Last thing - consider upgrading to a 5.2 or 5.3 based release, as 5.1 branch is 
end of life.

Cheers,

Henning

--
Henning Westerholt - https://skalatan.de/blog/
Kamailio services - https://gilawa.com<https://gilawa.com/>

From: sr-users 
<[email protected]<mailto:[email protected]>>
 On Behalf Of Grant Bagdasarian
Sent: Thursday, March 5, 2020 3:13 PM
To: Kamailio (SER) - Users Mailing List 
<[email protected]<mailto:[email protected]>>
Subject: [SR-Users] uac_replace_from in 200 OK of BYE

Hello,

We've been using the uac_replace_from function to anonymize the From header to 
[email protected]<mailto:[email protected]>. The uac module 
makes use of the dialog module for restoring the original URI.
Everything works fine, except when the callee sends the BYE request (replaced 
uri is present in To header): the 200 OK received by the callee of the BYE 
suddenly contains the original URI in the To header.

We're running Kamailio 5.1.
Is this a known bug or limitation of the uac module?
Any way to have this replaced correctly (preferably automatically by uac 
module)?

Regards,

Grant
_______________________________________________
Kamailio (SER) - Users Mailing List
[email protected]
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

Reply via email to