Hello,
We've been using the uac_replace_from function to anonymize the From header to anonymous@anonymous.invalidmailto:anonymous@anonymous.invalid. 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
Hello,
We’ve been using the uac_replace_from function to anonymize the From header to anonymous@anonymous.invalidmailto:anonymous@anonymous.invalid. 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
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.comhttps://gilawa.com/
From: sr-users sr-users-bounces@lists.kamailio.org On Behalf Of Grant Bagdasarian Sent: Thursday, March 5, 2020 3:13 PM To: Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org 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 anonymous@anonymous.invalidmailto:anonymous@anonymous.invalid. 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
Hello,
adding that one thing to watch is if the dialog record is still available or it was removed when the 200ok is handled, especially if it doesn't happen all the time, maybe it is a delayed response...
Cheers, Daniel
On 06.03.20 10:23, Henning Westerholt wrote:
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 sr-users-bounces@lists.kamailio.org *On Behalf Of *Grant Bagdasarian *Sent:* Thursday, March 5, 2020 3:13 PM *To:* Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org *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 anonymous@anonymous.invalid mailto:anonymous@anonymous.invalid. 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 sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
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:anonymous@anonymous.invalid;tag=U9etF1ae4rtgQ From: sip:1234556789@1.1.1.1:5060;tag=0d608960
Kamailio -> Callee SIP/2.0 200 OK From: sip:123456789@1.1.1.1:5060;tag=0d608960 To: sip:1111111111@1.1.1.2;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:anonymous@anonymous.invalid"); uac_replace_to("", "$tu");
Regards,
Grant
From: Henning Westerholt hw@skalatan.de Sent: vrijdag 6 maart 2020 10:24 To: Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org Cc: Grant Bagdasarian grant.bagdasarian@cm.com 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.comhttps://gilawa.com/
From: sr-users <sr-users-bounces@lists.kamailio.orgmailto:sr-users-bounces@lists.kamailio.org> On Behalf Of Grant Bagdasarian Sent: Thursday, March 5, 2020 3:13 PM To: Kamailio (SER) - Users Mailing List <sr-users@lists.kamailio.orgmailto:sr-users@lists.kamailio.org> 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 anonymous@anonymous.invalidmailto:anonymous@anonymous.invalid. 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