[SR-Users] Kamailio PCSCF route logic
Henning Westerholt
hw at gilawa.com
Wed Mar 30 08:48:20 CEST 2022
Hello,
check out the different functions in this module: https://kamailio.org/docs/modules/5.5.x/modules/nathelper.html#nathelper.set_contact_alias
Cheers,
Henning
--
Henning Westerholt - https://skalatan.de/blog/
Kamailio services - https://gilawa.com<https://gilawa.com/>
From: sr-users <sr-users-bounces at lists.kamailio.org> On Behalf Of Weiqi Yao
Sent: Tuesday, March 29, 2022 8:10 PM
To: Kamailio (SER) - Users Mailing List <sr-users at lists.kamailio.org>
Subject: [SR-Users] Kamailio PCSCF route logic
Hello community,
We made some modifications to Kamailio PCSCF sample cfg file, so when PCSCF receiving an tcp SUBSCRIBE message it add ;transport=tcp to the end of Contact URI. Below is what we added the route block right after if (is_method("INVITE|SUBSCRIBE")) logic
if (is_method("SUBSCRIBE") && proto=='tcp') {
$var(original_contact_header) = $ct;
$var(new_contact_header) = $(var(original_contact_header){re.subst,/(.*:.*)(>);/\1;transport=tcp>/g});
remove_hf("Contact");
append_hf("Contact: $var(new_contact_header)\r\n");
msg_apply_changes();
}
We did see the ;transport=tcp been added but we also seeing a bad line ;alias=[...] is added before the To: line
[cid:image001.png at 01D84412.E75E59D0]
Does anyone know what function might cause this ;alias been added before To: line?
BR,
Weiqi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20220330/b91e5520/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 6922 bytes
Desc: image001.png
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20220330/b91e5520/attachment.png>
More information about the sr-users
mailing list